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, typename, int>
28 class LocalAssemblerImplementation,
29 int GlobalDim,
30 typename... ConstructorArgs>
32 : public GenericLocalAssemblerFactory<LocalAssemblerInterface,
33 ConstructorArgs...>
34{
36 ConstructorArgs...>;
37
39 {
40 template <typename ElementTraits>
41 constexpr bool operator()(ElementTraits*) const
42 {
43 if constexpr (GlobalDim < ElementTraits::ShapeFunction::DIM)
44 {
45 return false;
46 }
47
48 return ElementTraits::Element::dimension >= MinElementDim;
49 }
50 };
51
52public:
54 NumLib::LocalToGlobalIndexMap const& dof_table)
55 : Base{dof_table}
56 {
57 using EnabledElementTraits =
58 decltype(BaseLib::TMP::filter<EnabledElementTraitsLagrange>(
59 std::declval<IsElementEnabled>()));
60
61 BaseLib::TMP::foreach<EnabledElementTraits>(
62 [this]<typename ET>(ET*)
63 {
64 using MeshElement = typename ET::Element;
65 using ShapeFunction = typename ET::ShapeFunction;
66 Base::_builders[std::type_index(typeid(MeshElement))] =
67 LocalAssemblerBuilderFactory<ShapeFunction,
69 LocalAssemblerImplementation,
70 GlobalDim,
71 ConstructorArgs...>::create();
72 });
73 }
74};
75
77template <typename LocalAssemblerInterface,
78 template <typename, typename, int>
79 class LocalAssemblerImplementation,
80 int GlobalDim,
81 typename... ConstructorArgs>
85 LocalAssemblerImplementation,
86 GlobalDim,
87 ConstructorArgs...>;
88
90template <typename LocalAssemblerInterface,
91 template <typename, typename, int>
92 class LocalAssemblerImplementation,
93 int GlobalDim,
94 typename... ConstructorArgs>
98 LocalAssemblerImplementation,
99 GlobalDim,
100 ConstructorArgs...>;
101} // namespace ProcessLib
LocalAssemblerFactoryForDimGreaterEqualN(NumLib::LocalToGlobalIndexMap const &dof_table)
std::unordered_map< std::type_index, LocAsmBuilder > _builders
Mapping of element types to local assembler builders.