18template <
typename ShapeFunction,
19 typename LowerOrderShapeFunction,
20 typename LocalAssemblerInterface,
24 class LocalAssemblerImplementation,
25 NumLib::IntegrationMethodProvider IntegrationMethodProvider,
27 typename... ConstructorArgs>
31 IntegrationMethodProvider,
36 using LocAsmImpl = LocalAssemblerImplementation<ShapeFunction,
37 LowerOrderShapeFunction,
45 template <
typename MeshElement>
49 std::size_t
const local_matrix_size,
50 IntegrationMethodProvider
const& integration_method_provider,
51 ConstructorArgs&&... args)
53 auto const& integration_method =
54 integration_method_provider
55 .template getIntegrationMethod<MeshElement>(e);
57 static_assert(!std::is_abstract_v<LocAsmImpl>,
58 "The given local assembler implementation is an "
59 "abstract class, which cannot be instantiated. Make "
60 "sure to implement all virtual methods!");
62 static_assert(std::is_constructible_v<
LocAsmImpl,
65 decltype(integration_method),
66 ConstructorArgs&&...>,
67 "The given local assembler implementation is not "
68 "constructible from the provided arguments.");
70 return std::make_unique<LocAsmImpl>(
74 std::forward<ConstructorArgs>(args)...);
90template <
int MinShapeFctOrder,
92 typename LocalAssemblerInterface,
96 class LocalAssemblerImplementation,
97 NumLib::IntegrationMethodProvider IntegrationMethodProvider,
99 typename... ConstructorArgs>
102 IntegrationMethodProvider,
107 IntegrationMethodProvider,
110 template <
typename ShapeFunction,
typename LowerOrderShapeFunction>
113 LowerOrderShapeFunction,
115 LocalAssemblerImplementation,
116 IntegrationMethodProvider,
122 template <
typename ElementTraits>
125 if constexpr (GlobalDim < ElementTraits::ShapeFunction::DIM)
130 if constexpr (ElementTraits::Element::dimension < MinElementDim)
135 return ElementTraits::ShapeFunction::ORDER >= MinShapeFctOrder;
142 IntegrationMethodProvider
const& integration_method_provider)
143 :
Base{dof_table, integration_method_provider}
145 using EnabledElementTraits =
147 std::declval<IsElementEnabled>()));
150 [
this]<
typename ET>(ET*)
152 using MeshElement =
typename ET::Element;
153 using ShapeFunction =
typename ET::ShapeFunction;
154 using LowerOrderShapeFunction =
155 typename ET::LowerOrderShapeFunction;
157 Base::_builders[std::type_index(
typeid(MeshElement))] =
159 LowerOrderShapeFunction>::
160 template create<MeshElement>();
166template <
typename LocalAssemblerInterface,
170 class LocalAssemblerImplementation,
171 NumLib::IntegrationMethodProvider IntegrationMethodProvider,
173 typename... ConstructorArgs>
177 LocalAssemblerInterface,
178 LocalAssemblerImplementation,
179 IntegrationMethodProvider,
184template <typename LocalAssemblerInterface,
188 class LocalAssemblerImplementation,
189 NumLib::IntegrationMethodProvider IntegrationMethodProvider,
191 typename... ConstructorArgs>
195 LocalAssemblerInterface,
196 LocalAssemblerImplementation,
197 IntegrationMethodProvider,
LocalAssemblerImplementation< ShapeFunction, LowerOrderShapeFunction, GlobalDim > LocAsmImpl
static LocAsmBuilder create()
typename GLAF::LocAsmIntfPtr LocAsmIntfPtr
typename GLAF::LocAsmBuilder LocAsmBuilder
LocalAssemblerBuilderFactoryTaylorHood()=delete
LocalAssemblerFactoryTaylorHood(NumLib::LocalToGlobalIndexMap const &dof_table, IntegrationMethodProvider const &integration_method_provider)
void foreach(Function &&f)
decltype(auto) filter(Pred pred)
std::function< LocAsmIntfPtr(MeshLib::Element const &e, std::size_t const local_matrix_size, IntegrationMethodProvider const &integration_method_provider, ConstructorArgs &&...)> LocAsmBuilder
std::unique_ptr< LocalAssemblerInterface > LocAsmIntfPtr
constexpr bool operator()(ElementTraits *) const