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