OGS
|
Assembles the Jacobian matrix using two different Jacobian assemblers and compares the assembled local Jacobian matrices.
If the provided tolerances are exceeded, debugging information is logged in the form of a Python script.
Definition at line 31 of file CompareJacobiansJacobianAssembler.h.
#include <CompareJacobiansJacobianAssembler.h>
Public Member Functions | |
CompareJacobiansJacobianAssembler (std::unique_ptr< AbstractJacobianAssembler > &&asm1, std::unique_ptr< AbstractJacobianAssembler > &&asm2, double abs_tol, double rel_tol, bool fail_on_error, std::string const &log_file_path) | |
void | assembleWithJacobian (LocalAssemblerInterface &local_assembler, double const t, double const dt, std::vector< double > const &local_x, std::vector< double > const &local_x_prev, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data) override |
std::unique_ptr< AbstractJacobianAssembler > | copy () const override |
Public Member Functions inherited from ProcessLib::AbstractJacobianAssembler | |
virtual void | assembleWithJacobianForStaggeredScheme (LocalAssemblerInterface &, double const, double const, Eigen::VectorXd const &, Eigen::VectorXd const &, int const, std::vector< double > &, std::vector< double > &) |
virtual | ~AbstractJacobianAssembler ()=default |
Private Attributes | |
std::unique_ptr< AbstractJacobianAssembler > | _asm1 |
std::unique_ptr< AbstractJacobianAssembler > | _asm2 |
double const | _abs_tol |
double const | _rel_tol |
bool const | _fail_on_error |
Whether to abort if the tolerances are exceeded. | |
std::ofstream | _log_file |
std::size_t | _counter = 0 |
|
inline |
Definition at line 34 of file CompareJacobiansJacobianAssembler.h.
References _log_file.
|
overridevirtual |
Assembles the Jacobian, the matrices \(M\) and \(K\), and the vector \(b\).
Implements ProcessLib::AbstractJacobianAssembler.
Definition at line 127 of file CompareJacobiansJacobianAssembler.cpp.
References _abs_tol, _asm1, _asm2, _counter, _fail_on_error, _log_file, _rel_tol, OGS_FATAL, MathLib::toMatrix(), MathLib::toVector(), and WARN().
|
overridevirtual |
Implements ProcessLib::AbstractJacobianAssembler.
Definition at line 348 of file CompareJacobiansJacobianAssembler.cpp.
References OGS_FATAL.
|
private |
Definition at line 69 of file CompareJacobiansJacobianAssembler.h.
Referenced by assembleWithJacobian().
|
private |
Definition at line 65 of file CompareJacobiansJacobianAssembler.h.
Referenced by assembleWithJacobian().
|
private |
Definition at line 66 of file CompareJacobiansJacobianAssembler.h.
Referenced by assembleWithJacobian().
|
private |
Counter used for identifying blocks in the _log_file
. It is incremented upon each call of the assembly routine, i.e., for each element in each iteration etc.
Definition at line 82 of file CompareJacobiansJacobianAssembler.h.
Referenced by assembleWithJacobian().
|
private |
Whether to abort if the tolerances are exceeded.
Definition at line 73 of file CompareJacobiansJacobianAssembler.h.
Referenced by assembleWithJacobian().
|
private |
Path where a Python script will be placed, which contains information about exceeded tolerances and assembled local matrices.
Definition at line 77 of file CompareJacobiansJacobianAssembler.h.
Referenced by CompareJacobiansJacobianAssembler(), and assembleWithJacobian().
|
private |
Definition at line 70 of file CompareJacobiansJacobianAssembler.h.
Referenced by assembleWithJacobian().