OGS
LocalAssemblerFactoryForDimGreaterEqualN.h
Go to the documentation of this file.
1
11#pragma once
12
13#include "EnabledElements.h"
15
16namespace ProcessLib
17{
25template <int MinElementDim,
26 typename LocalAssemblerInterface,
27 template <typename /* shp fct */, int /* global dim */>
28 class LocalAssemblerImplementation,
29 NumLib::IntegrationMethodProvider IntegrationMethodProvider,
30 int GlobalDim,
31 typename... ConstructorArgs>
33 : public GenericLocalAssemblerFactory<LocalAssemblerInterface,
34 IntegrationMethodProvider,
35 ConstructorArgs...>
36{
38 IntegrationMethodProvider,
39 ConstructorArgs...>;
40
42 {
43 template <typename ElementTraits>
44 constexpr bool operator()(ElementTraits*) const
45 {
46 if constexpr (GlobalDim < ElementTraits::ShapeFunction::DIM)
47 {
48 return false;
49 }
50
51 return ElementTraits::Element::dimension >= MinElementDim;
52 }
53 };
54
55public:
57 NumLib::LocalToGlobalIndexMap const& dof_table,
58 IntegrationMethodProvider const& integration_method_provider)
59 : Base{dof_table, integration_method_provider}
60 {
61 using EnabledElementTraits =
62 decltype(BaseLib::TMP::filter<EnabledElementTraitsLagrange>(
63 std::declval<IsElementEnabled>()));
64
65 BaseLib::TMP::foreach<EnabledElementTraits>(
66 [this]<typename ET>(ET*)
67 {
68 using MeshElement = typename ET::Element;
69 using ShapeFunction = typename ET::ShapeFunction;
70 Base::_builders[std::type_index(typeid(MeshElement))] =
72 ShapeFunction,
74 LocalAssemblerImplementation,
75 IntegrationMethodProvider,
76 GlobalDim,
77 ConstructorArgs...>::template create<MeshElement>();
78 });
79 }
80};
81
83template <typename LocalAssemblerInterface,
84 template <typename /* shp fct */, int /* global dim */>
85 class LocalAssemblerImplementation,
86 NumLib::IntegrationMethodProvider IntegrationMethodProvider,
87 int GlobalDim,
88 typename... ConstructorArgs>
91 LocalAssemblerInterface,
92 LocalAssemblerImplementation,
93 IntegrationMethodProvider,
94 GlobalDim,
95 ConstructorArgs...>;
96
98template <typename LocalAssemblerInterface,
99 template <typename /* shp fct */, int /* global dim */>
100 class LocalAssemblerImplementation,
101 NumLib::IntegrationMethodProvider IntegrationMethodProvider,
102 int GlobalDim,
103 typename... ConstructorArgs>
106 LocalAssemblerInterface,
107 LocalAssemblerImplementation,
108 IntegrationMethodProvider,
109 GlobalDim,
110 ConstructorArgs...>;
111} // namespace ProcessLib
LocalAssemblerFactoryForDimGreaterEqualN(NumLib::LocalToGlobalIndexMap const &dof_table, IntegrationMethodProvider const &integration_method_provider)