OGS
VectorMatrixAssembler.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <vector>
14
17
18namespace NumLib
19{
20class LocalToGlobalIndexMap;
21} // namespace NumLib
22
23namespace ProcessLib
24{
25
26class LocalAssemblerInterface;
27
33{
34public:
35 explicit VectorMatrixAssembler(
36 AbstractJacobianAssembler& jacobian_assembler);
37
38 void preAssemble(const std::size_t mesh_item_id,
39 LocalAssemblerInterface& local_assembler,
40 const NumLib::LocalToGlobalIndexMap& dof_table,
41 const double t, double const dt, const GlobalVector& x);
42
45 void assemble(
46 std::size_t const mesh_item_id,
47 LocalAssemblerInterface& local_assembler,
48 std::vector<NumLib::LocalToGlobalIndexMap const*> const& dof_tables,
49 double const t, double const dt, std::vector<GlobalVector*> const& x,
50 std::vector<GlobalVector*> const& x_prev, int const process_id,
52
56 std::size_t const mesh_item_id,
57 LocalAssemblerInterface& local_assembler,
58 std::vector<NumLib::LocalToGlobalIndexMap const*> const& dof_tables,
59 const double t, double const dt, std::vector<GlobalVector*> const& x,
60 std::vector<GlobalVector*> const& x_prev, int const process_id,
61 GlobalVector* b, GlobalMatrix* Jac);
62
63private:
64 // temporary data only stored here in order to avoid frequent memory
65 // reallocations.
66 std::vector<double> _local_M_data;
67 std::vector<double> _local_K_data;
68 std::vector<double> _local_b_data;
69 std::vector<double> _local_Jac_data;
70
73
75};
76
77} // namespace ProcessLib
Global vector based on Eigen vector.
Definition EigenVector.h:25
Base class for Jacobian assemblers.
void assemble(std::size_t const mesh_item_id, LocalAssemblerInterface &local_assembler, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, double const t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalMatrix *M, GlobalMatrix *K, GlobalVector *b)
VectorMatrixAssembler(AbstractJacobianAssembler &jacobian_assembler)
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)
Assembly::LocalMatrixOutput _local_output
AbstractJacobianAssembler & _jacobian_assembler
Used to assemble the Jacobian.
void assembleWithJacobian(std::size_t const mesh_item_id, LocalAssemblerInterface &local_assembler, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalVector *b, GlobalMatrix *Jac)
Writes local matrices to disk for debugging purposes.