![]() |
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 24 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 | |
| AbstractJacobianAssembler (std::vector< double > const &&absolute_epsilons) | |
| 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 |
| void | checkPerturbationSize (int const max_non_deformation_dofs_per_node) const |
| void | setNonDeformationComponentIDs (std::vector< int > const &non_deformation_component_ids) |
| void | setNonDeformationComponentIDsNoSizeCheck (std::vector< int > const &non_deformation_component_ids) |
| auto | getVariableComponentEpsilonsView () const |
| auto | isPerturbationEnabled () const |
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 |
Additional Inherited Members | |
| Protected Attributes inherited from ProcessLib::AbstractJacobianAssembler | |
| std::vector< int > | non_deformation_component_ids_ |
| std::vector< double > const | absolute_epsilons_ |
|
inline |
Definition at line 27 of file CompareJacobiansJacobianAssembler.h.
References _abs_tol, _asm1, _asm2, _fail_on_error, _log_file, and _rel_tol.
|
overridevirtual |
Assembles the Jacobian, the matrices \(M\) and \(K\), and the vector \(b\).
Implements ProcessLib::AbstractJacobianAssembler.
Definition at line 120 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 341 of file CompareJacobiansJacobianAssembler.cpp.
References OGS_FATAL.
|
private |
Definition at line 62 of file CompareJacobiansJacobianAssembler.h.
Referenced by CompareJacobiansJacobianAssembler(), and assembleWithJacobian().
|
private |
Definition at line 58 of file CompareJacobiansJacobianAssembler.h.
Referenced by CompareJacobiansJacobianAssembler(), and assembleWithJacobian().
|
private |
Definition at line 59 of file CompareJacobiansJacobianAssembler.h.
Referenced by CompareJacobiansJacobianAssembler(), and 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 75 of file CompareJacobiansJacobianAssembler.h.
Referenced by assembleWithJacobian().
|
private |
Whether to abort if the tolerances are exceeded.
Definition at line 66 of file CompareJacobiansJacobianAssembler.h.
Referenced by CompareJacobiansJacobianAssembler(), and assembleWithJacobian().
|
private |
Path where a Python script will be placed, which contains information about exceeded tolerances and assembled local matrices.
Definition at line 70 of file CompareJacobiansJacobianAssembler.h.
Referenced by CompareJacobiansJacobianAssembler(), and assembleWithJacobian().
|
private |
Definition at line 63 of file CompareJacobiansJacobianAssembler.h.
Referenced by CompareJacobiansJacobianAssembler(), and assembleWithJacobian().