![]() |
OGS
|
|
Assembles the Jacobian matrix using central differences.
Definition at line 18 of file CentralDifferencesJacobianAssembler.h.
#include <CentralDifferencesJacobianAssembler.h>
Public Member Functions | |
| CentralDifferencesJacobianAssembler (std::vector< double > &&absolute_epsilons) | |
| void | assembleWithJacobian (LocalAssemblerInterface &local_assembler, double const t, double const dt, std::vector< double > const &local_x_data, std::vector< double > const &local_x_prev_data, 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::vector< double > | _local_M_data |
| std::vector< double > | _local_K_data |
| std::vector< double > | _local_b_data |
| std::vector< double > | _local_x_perturbed_data |
Additional Inherited Members | |
| Protected Attributes inherited from ProcessLib::AbstractJacobianAssembler | |
| std::vector< int > | non_deformation_component_ids_ |
| std::vector< double > const | absolute_epsilons_ |
|
explicit |
Constructs a new instance.
| absolute_epsilons | perturbations of the variable components used for evaluating the finite differences. |
absolute_epsilons defines the "number of
components" of the local solution vector (This is not the number of elements of the vector!). Therefore the size of the local solution vector must be divisible by the size of absolute_epsilons. This is the only consistency check performed. It is not checked whether said "number of components" is sensible. E.g., one could pass one epsilon per node, which would be valid but would not make sense at all. Definition at line 13 of file CentralDifferencesJacobianAssembler.cpp.
References ProcessLib::AbstractJacobianAssembler::AbstractJacobianAssembler().
|
overridevirtual |
Assembles the Jacobian, the matrices \(M\) and \(K\), and the vector \(b\). For the assembly the assemble() method of the given local_assembler is called several times and the Jacobian is built from finite differences. The number of calls of the assemble() method is \(2N+1\) if \(N\) is the size of local_x_data.
Implements ProcessLib::AbstractJacobianAssembler.
Definition at line 19 of file CentralDifferencesJacobianAssembler.cpp.
References _local_b_data, _local_K_data, _local_M_data, _local_x_perturbed_data, ProcessLib::LocalAssemblerInterface::assemble(), MathLib::createZeroedMatrix(), MathLib::createZeroedVector(), ProcessLib::LocalAssemblerInterface::getNumberOfVectorElementsForDeformation(), ProcessLib::AbstractJacobianAssembler::getVariableComponentEpsilonsView(), ProcessLib::AbstractJacobianAssembler::non_deformation_component_ids_, MathLib::toMatrix(), and MathLib::toVector().
|
overridevirtual |
Implements ProcessLib::AbstractJacobianAssembler.
Definition at line 172 of file CentralDifferencesJacobianAssembler.cpp.
|
private |
Definition at line 61 of file CentralDifferencesJacobianAssembler.h.
Referenced by assembleWithJacobian().
|
private |
Definition at line 60 of file CentralDifferencesJacobianAssembler.h.
Referenced by assembleWithJacobian().
|
private |
Definition at line 59 of file CentralDifferencesJacobianAssembler.h.
Referenced by assembleWithJacobian().
|
private |
Definition at line 62 of file CentralDifferencesJacobianAssembler.h.
Referenced by assembleWithJacobian().