OGS
VectorMatrixAssembler.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <vector>
17
18namespace NumLib
19{
20class LocalToGlobalIndexMap;
21} // NumLib
22
23namespace ProcessLib
24{
25struct CoupledSolutionsForStaggeredScheme;
26
27class LocalAssemblerInterface;
28
34{
35public:
36 explicit VectorMatrixAssembler(
37 std::unique_ptr<AbstractJacobianAssembler>&& jacobian_assembler);
38
39 void preAssemble(const std::size_t mesh_item_id,
40 LocalAssemblerInterface& local_assembler,
41 const NumLib::LocalToGlobalIndexMap& dof_table,
42 const double t, double const dt, const GlobalVector& x);
43
46 void assemble(std::size_t const mesh_item_id,
47 LocalAssemblerInterface& local_assembler,
48 std::vector<std::reference_wrapper<
49 NumLib::LocalToGlobalIndexMap>> const& dof_tables,
50 double const t, double const dt,
51 std::vector<GlobalVector*> const& x,
52 std::vector<GlobalVector*> const& xdot, int const process_id,
54
58 std::size_t const mesh_item_id,
59 LocalAssemblerInterface& local_assembler,
60 std::vector<
61 std::reference_wrapper<NumLib::LocalToGlobalIndexMap>> const&
62 dof_tables,
63 const double t, double const dt, std::vector<GlobalVector*> const& x,
64 std::vector<GlobalVector*> const& xdot, int const process_id,
66
67private:
68 // temporary data only stored here in order to avoid frequent memory
69 // reallocations.
70 std::vector<double> _local_M_data;
71 std::vector<double> _local_K_data;
72 std::vector<double> _local_b_data;
73 std::vector<double> _local_Jac_data;
74
76 std::unique_ptr<AbstractJacobianAssembler> _jacobian_assembler;
77};
78
79} // namespace ProcessLib
Global vector based on Eigen vector.
Definition: EigenVector.h:28
std::unique_ptr< AbstractJacobianAssembler > _jacobian_assembler
Used to assemble the Jacobian.
void assemble(std::size_t const mesh_item_id, LocalAssemblerInterface &local_assembler, std::vector< std::reference_wrapper< NumLib::LocalToGlobalIndexMap > > const &dof_tables, double const t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &xdot, int const process_id, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b)
VectorMatrixAssembler(std::unique_ptr< AbstractJacobianAssembler > &&jacobian_assembler)
void assembleWithJacobian(std::size_t const mesh_item_id, LocalAssemblerInterface &local_assembler, std::vector< std::reference_wrapper< NumLib::LocalToGlobalIndexMap > > const &dof_tables, const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &xdot, int const process_id, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b, GlobalMatrix &Jac)
void preAssemble(const std::size_t mesh_item_id, LocalAssemblerInterface &local_assembler, const NumLib::LocalToGlobalIndexMap &dof_table, const double t, double const dt, const GlobalVector &x)
static const double t