OGS
SteadyStateDiffusion.cpp
Go to the documentation of this file.
1
12
13#include <cassert>
14
16
17namespace ProcessLib
18{
19namespace SteadyStateDiffusion
20{
22 std::string name,
23 MeshLib::Mesh& mesh,
24 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
25 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
26 unsigned const integration_order,
27 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&&
28 process_variables,
29 SteadyStateDiffusionData&& process_data,
30 SecondaryVariableCollection&& secondary_variables,
31 std::unique_ptr<ProcessLib::SurfaceFluxData>&& surfaceflux)
32 : Process(std::move(name), mesh, std::move(jacobian_assembler), parameters,
33 integration_order, std::move(process_variables),
34 std::move(secondary_variables)),
35 _process_data(std::move(process_data)),
36 _surfaceflux(std::move(surfaceflux))
37{
38}
39
41 NumLib::LocalToGlobalIndexMap const& dof_table,
42 MeshLib::Mesh const& mesh,
43 unsigned const integration_order)
44{
45 ProcessLib::createLocalAssemblers<LocalAssemblerData>(
46 mesh.getDimension(), mesh.getElements(), dof_table, _local_assemblers,
47 NumLib::IntegrationOrder{integration_order}, mesh.isAxiallySymmetric(),
49
51 "darcy_velocity",
55 getIntPtDarcyVelocity));
56}
57
59 const double t, double const dt, std::vector<GlobalVector*> const& x,
60 std::vector<GlobalVector*> const& x_prev, int const process_id,
62{
63 DBUG("Assemble SteadyStateDiffusion.");
64
65 std::vector<NumLib::LocalToGlobalIndexMap const*> dof_table = {
67 // Call global assembler for each local assembly item.
70 getActiveElementIDs(), dof_table, t, dt, x, x_prev, process_id, &M, &K,
71 &b);
72}
73
75 const double t, double const dt, std::vector<GlobalVector*> const& x,
76 std::vector<GlobalVector*> const& x_prev, int const process_id,
78{
79 DBUG("AssembleWithJacobian SteadyStateDiffusion.");
80
81 std::vector<NumLib::LocalToGlobalIndexMap const*> dof_table = {
83 // Call global assembler for each local assembly item.
86 _local_assemblers, getActiveElementIDs(), dof_table, t, dt, x, x_prev,
87 process_id, &b, &Jac);
88}
89
90} // namespace SteadyStateDiffusion
91} // namespace ProcessLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
Global vector based on Eigen vector.
Definition EigenVector.h:25
bool isAxiallySymmetric() const
Definition Mesh.h:137
std::vector< Element * > const & getElements() const
Get the element-vector for the mesh.
Definition Mesh.h:109
unsigned getDimension() const
Returns the dimension of the mesh (determined by the maximum dimension over all elements).
Definition Mesh.h:88
std::vector< std::size_t > const & getActiveElementIDs() const
Definition Process.h:167
SecondaryVariableCollection _secondary_variables
Definition Process.h:370
VectorMatrixAssembler _global_assembler
Definition Process.h:377
std::unique_ptr< NumLib::LocalToGlobalIndexMap > _local_to_global_index_map
Definition Process.h:368
NumLib::Extrapolator & getExtrapolator() const
Definition Process.h:208
Handles configuration of several secondary variables from the project file.
void addSecondaryVariable(std::string const &internal_name, SecondaryVariableFunctions &&fcts)
void initializeConcreteProcess(NumLib::LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh, unsigned const integration_order) override
Process specific initialization called by initialize().
std::vector< std::unique_ptr< SteadyStateDiffusionLocalAssemblerInterface > > _local_assemblers
SteadyStateDiffusion(std::string name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, unsigned const integration_order, std::vector< std::vector< std::reference_wrapper< ProcessVariable > > > &&process_variables, SteadyStateDiffusionData &&process_data, SecondaryVariableCollection &&secondary_variables, std::unique_ptr< ProcessLib::SurfaceFluxData > &&surfaceflux)
void assembleWithJacobianConcreteProcess(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) override
void assembleConcreteProcess(const double 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) override
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)
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)
SecondaryVariableFunctions makeExtrapolator(const unsigned num_components, NumLib::Extrapolator &extrapolator, LocalAssemblerCollection const &local_assemblers, typename NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >::IntegrationPointValuesMethod integration_point_values_method)
static void executeSelectedMemberDereferenced(Object &object, Method method, Container const &container, std::vector< std::size_t > const &active_container_ids, Args &&... args)