OGS
CentralDifferencesJacobianAssembler.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <memory>
14
16
17namespace BaseLib
18{
19class ConfigTree;
20} // namespace BaseLib
21
22namespace ProcessLib
23{
27{
28public:
42 std::vector<double>&& absolute_epsilons);
43
55 double const t, double const dt,
56 std::vector<double> const& local_x_data,
57 std::vector<double> const& local_x_prev_data,
58 std::vector<double>& local_b_data,
59 std::vector<double>& local_Jac_data) override;
60
61 std::unique_ptr<AbstractJacobianAssembler> copy() const override;
62
63private:
64 std::vector<double> const _absolute_epsilons;
65
66 // temporary data only stored here in order to avoid frequent memory
67 // reallocations.
68 std::vector<double> _local_M_data;
69 std::vector<double> _local_K_data;
70 std::vector<double> _local_b_data;
71 std::vector<double> _local_x_perturbed_data;
72};
73
74std::unique_ptr<CentralDifferencesJacobianAssembler>
76
77} // namespace ProcessLib
Base class for Jacobian assemblers.
Assembles the Jacobian matrix using central differences.
CentralDifferencesJacobianAssembler(std::vector< double > &&absolute_epsilons)
std::unique_ptr< AbstractJacobianAssembler > copy() const override
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< CentralDifferencesJacobianAssembler > createCentralDifferencesJacobianAssembler(BaseLib::ConfigTree const &config)