15 template <
template <
typename,
typename,
typename,
typename>
typename AInterface,
16 template <
typename Wrapper,
typename Assembler>
typename AImplementation>
17 struct AssemblerInterfaceHelper
19 template <
typename WA,
typename A,
typename ReturnValueType>
20 using Interface = AInterface<WA, typename A::FEContainer, typename A::DirichletValuesType, ReturnValueType>;
21 template <
typename WA,
typename A>
22 using Implementation = AImplementation<WA, A>;
35template <Concepts::FlatAssembler A,
typename... Ass>
38#define BASECLASSMEMBERFUNCTION(func, A) \
39 template <typename... Args> \
40 decltype(auto) base_##func(Args... args) { \
41 return A::func(std::forward<Args>(args)...); \
52template <Concepts::FlatAssembler A,
typename ScalarAss>
54 :
public ScalarAss::template Interface<AssemblerManipulator<A, ScalarAss>, A, typename A::ScalarType>,
55 public ScalarAss::template Implementation<AssemblerManipulator<A, ScalarAss>, A>,
62 using ScalarAssemblerImpl = ScalarAss::template Implementation<AssemblerManipulator, WrappedAssembler>;
70 using typename WrappedAssembler::AffordanceCollectionType;
71 using typename WrappedAssembler::Basis;
72 using typename WrappedAssembler::DirichletValuesType;
73 using typename WrappedAssembler::FEContainer;
74 using typename WrappedAssembler::FERequirement;
75 using typename WrappedAssembler::ScalarType;
76 using typename WrappedAssembler::SizeType;
79 using WrappedAssembler::bind;
80 using WrappedAssembler::bound;
81 using WrappedAssembler::boundToAffordanceCollection;
82 using WrappedAssembler::boundToDBCOption;
83 using WrappedAssembler::boundToRequirement;
84 using WrappedAssembler::createFullVector;
86 using WrappedAssembler::affordanceCollection;
87 using WrappedAssembler::constraintsBelow;
88 using WrappedAssembler::dBCOption;
89 using WrappedAssembler::estimateOfConnectivity;
90 using WrappedAssembler::gridView;
91 using WrappedAssembler::isConstrained;
92 using WrappedAssembler::reducedSize;
93 using WrappedAssembler::requirement;
94 using WrappedAssembler::size;
97 using ScalarAssemblerImpl::bind;
100 using ScalarAssemblerImpl::getScalarImpl;
104 using ScalarAssemblerInterface::scalar;
107 std::tuple<typename ScalarAss::template Implementation<AssemblerManipulator<A, ScalarAss>, A>::FunctionType>;
115 template <
typename... Args>
116 requires(not std::is_same_v<std::remove_cvref_t<std::tuple_element_t<0, std::tuple<Args...>>>,
AssemblerManipulator>)
123 A& base() {
return *
this; }
124 const A& base()
const {
return *
this; }
136template <Concepts::FlatAssembler A,
typename ScalarAss,
typename VectorAss>
138 :
public ScalarAss::template Interface<AssemblerManipulator<A, ScalarAss, VectorAss>, A, typename A::ScalarType>,
139 public ScalarAss::template Implementation<AssemblerManipulator<A, ScalarAss, VectorAss>, A>,
140 public VectorAss::template Interface<AssemblerManipulator<A, ScalarAss, VectorAss>, A, typename A::VectorType>,
141 public VectorAss::template Implementation<AssemblerManipulator<A, ScalarAss, VectorAss>, A>,
160 using typename WrappedAssembler::AffordanceCollectionType;
161 using typename WrappedAssembler::Basis;
162 using typename WrappedAssembler::DirichletValuesType;
163 using typename WrappedAssembler::FEContainer;
164 using typename WrappedAssembler::FERequirement;
165 using typename WrappedAssembler::ScalarType;
166 using typename WrappedAssembler::SizeType;
167 using typename WrappedAssembler::VectorType;
170 using WrappedAssembler::bind;
171 using WrappedAssembler::bound;
172 using WrappedAssembler::boundToAffordanceCollection;
173 using WrappedAssembler::boundToDBCOption;
174 using WrappedAssembler::boundToRequirement;
175 using WrappedAssembler::createFullVector;
177 using WrappedAssembler::affordanceCollection;
178 using WrappedAssembler::constraintsBelow;
179 using WrappedAssembler::dBCOption;
180 using WrappedAssembler::estimateOfConnectivity;
181 using WrappedAssembler::gridView;
182 using WrappedAssembler::isConstrained;
183 using WrappedAssembler::reducedSize;
184 using WrappedAssembler::requirement;
185 using WrappedAssembler::size;
188 using ScalarAssemblerImpl::bind;
189 using VectorAssemblerImpl::bind;
192 using ScalarAssemblerImpl::getScalarImpl;
193 using VectorAssemblerImpl::getRawVectorImpl;
194 using VectorAssemblerImpl::getReducedVectorImpl;
195 using VectorAssemblerImpl::getVectorImpl;
199 using ScalarAssemblerInterface::scalar;
200 using VectorAssemblerInterface::vector;
203 std::tuple<typename ScalarAssemblerImpl::FunctionType, typename VectorAssemblerImpl::FunctionType>;
211 template <
typename... Args>
212 requires(not std::is_same_v<std::remove_cvref_t<std::tuple_element_t<0, std::tuple<Args...>>>,
AssemblerManipulator>)
222 WrappedAssembler& base() {
return *
this; }
223 const WrappedAssembler& base()
const {
return *
this; }
236template <Concepts::FlatAssembler A,
typename ScalarAss,
typename VectorAss,
typename MatrixAss>
238 :
public ScalarAss::template Interface<AssemblerManipulator<A, ScalarAss, VectorAss, MatrixAss>, A,
239 typename A::ScalarType>,
240 public ScalarAss::template Implementation<AssemblerManipulator<A, ScalarAss, VectorAss, MatrixAss>, A>,
241 public VectorAss::template Interface<AssemblerManipulator<A, ScalarAss, VectorAss, MatrixAss>, A,
242 typename A::VectorType>,
243 public VectorAss::template Implementation<AssemblerManipulator<A, ScalarAss, VectorAss, MatrixAss>, A>,
244 public MatrixAss::template Interface<AssemblerManipulator<A, ScalarAss, VectorAss, MatrixAss>, A,
245 typename A::MatrixType>,
246 public MatrixAss::template Implementation<AssemblerManipulator<A, ScalarAss, VectorAss, MatrixAss>, A>,
269 using typename WrappedAssembler::AffordanceCollectionType;
270 using typename WrappedAssembler::Basis;
271 using typename WrappedAssembler::DirichletValuesType;
272 using typename WrappedAssembler::FEContainer;
273 using typename WrappedAssembler::FERequirement;
274 using typename WrappedAssembler::MatrixType;
275 using typename WrappedAssembler::ScalarType;
276 using typename WrappedAssembler::SizeType;
277 using typename WrappedAssembler::VectorType;
280 using WrappedAssembler::bind;
281 using WrappedAssembler::bound;
282 using WrappedAssembler::boundToAffordanceCollection;
283 using WrappedAssembler::boundToDBCOption;
284 using WrappedAssembler::boundToRequirement;
285 using WrappedAssembler::createFullVector;
287 using WrappedAssembler::affordanceCollection;
288 using WrappedAssembler::constraintsBelow;
289 using WrappedAssembler::dBCOption;
290 using WrappedAssembler::estimateOfConnectivity;
291 using WrappedAssembler::gridView;
292 using WrappedAssembler::isConstrained;
293 using WrappedAssembler::reducedSize;
294 using WrappedAssembler::requirement;
295 using WrappedAssembler::size;
298 using MatrixAssemblerImpl::bind;
299 using ScalarAssemblerImpl::bind;
300 using VectorAssemblerImpl::bind;
303 using MatrixAssemblerImpl::getMatrixImpl;
304 using MatrixAssemblerImpl::getRawMatrixImpl;
305 using MatrixAssemblerImpl::getReducedMatrixImpl;
306 using ScalarAssemblerImpl::getScalarImpl;
307 using VectorAssemblerImpl::getRawVectorImpl;
308 using VectorAssemblerImpl::getReducedVectorImpl;
309 using VectorAssemblerImpl::getVectorImpl;
313 using MatrixAssemblerInterface::matrix;
314 using ScalarAssemblerInterface::scalar;
315 using VectorAssemblerInterface::vector;
318 std::tuple<
typename ScalarAssemblerImpl::FunctionType,
typename VectorAssemblerImpl::FunctionType,
319 typename MatrixAssemblerImpl::FunctionType>;
327 template <
typename... Args>
328 requires(not std::is_same_v<std::remove_cvref_t<std::tuple_element_t<0, std::tuple<Args...>>>,
AssemblerManipulator>)
343 A& base() {
return *
this; }
344 const A& base()
const {
return *
this; }
362 if constexpr (scal && vec && mat)
363 return std::make_shared<
364 AssemblerManipulator<std::remove_cvref_t<A>, Impl::AssemblerInterfaceHelper<ScalarAssembler, ScalarManipulator>,
365 Impl::AssemblerInterfaceHelper<VectorAssembler, VectorManipulator>,
366 Impl::AssemblerInterfaceHelper<MatrixAssembler, MatrixManipulator>>>(std::forward<A>(a));
367 else if constexpr (scal && vec)
368 return std::make_shared<
369 AssemblerManipulator<std::remove_cvref_t<A>, Impl::AssemblerInterfaceHelper<ScalarAssembler, ScalarManipulator>,
370 Impl::AssemblerInterfaceHelper<VectorAssembler, VectorManipulator>>>(std::forward<A>(a));
371 else if constexpr (scal)
373 Impl::AssemblerInterfaceHelper<ScalarAssembler, ScalarManipulator>>>(
#define BASECLASSMEMBERFUNCTION(func, A)
Definition: assemblermanipulatorfuser.hh:38
Definition: assemblermanipulatorbuildingblocks.hh:22
auto makeAssemblerManipulator(A &&a)
Creates an AssemblerManipulator instance based on the type of the provided assembler.
Definition: assemblermanipulatorfuser.hh:358
The AssemblerManipulator defines a decorator for the assemblers that helps to manipulate the assemble...
Definition: assemblermanipulatorfuser.hh:36
ScalarAss::template Interface< AssemblerManipulator, A, typename A::ScalarType > ScalarAssemblerInterface
Definition: assemblermanipulatorfuser.hh:63
AssemblerManipulator(Args &&... args)
Constructor that forwards arguments to the base assembler.
Definition: assemblermanipulatorfuser.hh:117
std::tuple< typename ScalarAss::template Implementation< AssemblerManipulator< A, ScalarAss >, A >::FunctionType > CallBackTypes
Definition: assemblermanipulatorfuser.hh:107
friend ScalarAssemblerImpl
Definition: assemblermanipulatorfuser.hh:65
friend ScalarAssemblerInterface
Definition: assemblermanipulatorfuser.hh:66
ScalarAss::template Implementation< AssemblerManipulator, WrappedAssembler > ScalarAssemblerImpl
Definition: assemblermanipulatorfuser.hh:62
A WrappedAssembler
Definition: assemblermanipulatorfuser.hh:59
friend ScalarAssemblerInterface
Definition: assemblermanipulatorfuser.hh:155
friend ScalarAssemblerImpl
Definition: assemblermanipulatorfuser.hh:153
VectorAss::template Interface< AssemblerManipulator, A, typename A::VectorType > VectorAssemblerInterface
Definition: assemblermanipulatorfuser.hh:151
A WrappedAssembler
Definition: assemblermanipulatorfuser.hh:145
VectorAss::template Implementation< AssemblerManipulator, WrappedAssembler > VectorAssemblerImpl
Definition: assemblermanipulatorfuser.hh:149
std::tuple< typename ScalarAssemblerImpl::FunctionType, typename VectorAssemblerImpl::FunctionType > CallBackTypes
Definition: assemblermanipulatorfuser.hh:203
friend VectorAssemblerImpl
Definition: assemblermanipulatorfuser.hh:154
AssemblerManipulator(Args &&... args)
Constructor that forwards arguments to the base assembler.
Definition: assemblermanipulatorfuser.hh:213
ScalarAss::template Interface< AssemblerManipulator, A, typename A::ScalarType > ScalarAssemblerInterface
Definition: assemblermanipulatorfuser.hh:150
ScalarAss::template Implementation< AssemblerManipulator, WrappedAssembler > ScalarAssemblerImpl
Definition: assemblermanipulatorfuser.hh:148
friend VectorAssemblerInterface
Definition: assemblermanipulatorfuser.hh:156
std::tuple< typename ScalarAssemblerImpl::FunctionType, typename VectorAssemblerImpl::FunctionType, typename MatrixAssemblerImpl::FunctionType > CallBackTypes
Definition: assemblermanipulatorfuser.hh:319
ScalarAss::template Interface< AssemblerManipulator, A, typename A::ScalarType > ScalarAssemblerInterface
Definition: assemblermanipulatorfuser.hh:256
MatrixAss::template Implementation< AssemblerManipulator, A > MatrixAssemblerImpl
Definition: assemblermanipulatorfuser.hh:255
friend VectorAssemblerImpl
Definition: assemblermanipulatorfuser.hh:261
A WrappedAssembler
Definition: assemblermanipulatorfuser.hh:250
MatrixAss::template Interface< AssemblerManipulator, A, typename A::MatrixType > MatrixAssemblerInterface
Definition: assemblermanipulatorfuser.hh:258
VectorAss::template Interface< AssemblerManipulator, A, typename A::VectorType > VectorAssemblerInterface
Definition: assemblermanipulatorfuser.hh:257
friend VectorAssemblerInterface
Definition: assemblermanipulatorfuser.hh:265
friend ScalarAssemblerImpl
Definition: assemblermanipulatorfuser.hh:260
friend MatrixAssemblerInterface
Definition: assemblermanipulatorfuser.hh:263
friend MatrixAssemblerImpl
Definition: assemblermanipulatorfuser.hh:262
AssemblerManipulator(Args &&... args)
Constructor that forwards arguments to the base assembler.
Definition: assemblermanipulatorfuser.hh:329
ScalarAss::template Implementation< AssemblerManipulator, A > ScalarAssemblerImpl
Definition: assemblermanipulatorfuser.hh:253
VectorAss::template Implementation< AssemblerManipulator, A > VectorAssemblerImpl
Definition: assemblermanipulatorfuser.hh:254
friend ScalarAssemblerInterface
Definition: assemblermanipulatorfuser.hh:264
Concept representing the requirements for a ScalarFlatAssembler.A type T satisfies ScalarFlatAssemble...
Definition: concepts.hh:531
Concept representing the requirements for a VectorFlatAssembler.A type T satisfies VectorFlatAssemble...
Definition: concepts.hh:545
Concept representing the requirements for a MatrixFlatAssembler.A type T satisfies MatrixFlatAssemble...
Definition: concepts.hh:562