OGS
CreateLocalAssemblers.h
Go to the documentation of this file.
1
10#pragma once
11
12#include <vector>
13
14#include "BaseLib/Logging.h"
17
18namespace ProcessLib
19{
20namespace LIE
21{
22namespace HydroMechanics
23{
24namespace detail
25{
26template <int GlobalDim,
27 template <typename, typename, int>
28 class LocalAssemblerMatrixImplementation,
29 template <typename, typename, int>
30 class LocalAssemblerMatrixNearFractureImplementation,
31 template <typename, typename, int>
32 class LocalAssemblerFractureImplementation,
33 typename LocalAssemblerInterface, typename... ExtraCtorArgs>
35 NumLib::LocalToGlobalIndexMap const& dof_table,
36 std::vector<MeshLib::Element*> const& mesh_elements,
37 std::vector<std::unique_ptr<LocalAssemblerInterface>>& local_assemblers,
38 NumLib::IntegrationOrder const integration_order,
39 ExtraCtorArgs&&... extra_ctor_args)
40{
41 // Shape matrices initializer
43 LocalAssemblerInterface, LocalAssemblerMatrixImplementation,
44 LocalAssemblerMatrixNearFractureImplementation,
45 LocalAssemblerFractureImplementation, GlobalDim, ExtraCtorArgs...>;
46
47 DBUG("Create local assemblers for HydroMechanics with LIE.");
48 // Populate the vector of local assemblers.
49 local_assemblers.resize(mesh_elements.size());
50
51 LocalDataInitializer initializer(dof_table, integration_order);
52
53 DBUG("Calling local assembler builder for all mesh elements.");
55 initializer, mesh_elements, local_assemblers,
56 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
57}
58
59} // namespace detail
60
72template <int GlobalDim,
73 template <typename, typename, int>
74 class LocalAssemblerMatrixImplementation,
75 template <typename, typename, int>
76 class LocalAssemblerMatrixNearFractureImplementation,
77 template <typename, typename, int>
78 class LocalAssemblerFractureImplementation,
79 typename LocalAssemblerInterface, typename... ExtraCtorArgs>
81 std::vector<MeshLib::Element*> const& mesh_elements,
82 NumLib::LocalToGlobalIndexMap const& dof_table,
83 std::vector<std::unique_ptr<LocalAssemblerInterface>>& local_assemblers,
84 NumLib::IntegrationOrder const integration_order,
85 ExtraCtorArgs&&... extra_ctor_args)
86{
88 GlobalDim, LocalAssemblerMatrixImplementation,
89 LocalAssemblerMatrixNearFractureImplementation,
90 LocalAssemblerFractureImplementation>(
91 dof_table, mesh_elements, local_assemblers, integration_order,
92 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
93}
94
95} // namespace HydroMechanics
96} // namespace LIE
97} // namespace ProcessLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
void createLocalAssemblers(NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< MeshLib::Element * > const &mesh_elements, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, NumLib::IntegrationOrder const integration_order, ExtraCtorArgs &&... extra_ctor_args)
void createLocalAssemblers(std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, NumLib::IntegrationOrder const integration_order, ExtraCtorArgs &&... extra_ctor_args)
static void transformDereferenced(F const &f, C const &c, Data &data, Args_ &&... args)