Generate a BlockLatticeF from an arbitrary function.
More...
#include <blockBaseF3D.h>
template<typename T, typename DESCRIPTOR>
class olb::BlockLatticeFfromCallableF< T, DESCRIPTOR >
Generate a BlockLatticeF from an arbitrary function.
- Template Parameters
-
Definition at line 216 of file blockBaseF3D.h.
◆ BlockLatticeFfromCallableF()
template<typename T , typename DESCRIPTOR >
template<typename F >
Generate a BlockLatticeF from an arbitrary function.
- Template Parameters
-
- Parameters
-
| iC | local cuboid number |
| f | some function, e.g. lambda expression The following types of f are accepted: void(T* output, auto cell) void(T* output, auto cell, int iC, const int* localCoordinates) void(T* output, int iC, const int* localCoordinates) |
Definition at line 234 of file blockBaseF3D.h.
236 _f([&,f](T* output, const int* input) -> bool {
237 auto cell = blockLattice.get(input);
238 if constexpr (std::is_invocable_v<F, T*, decltype(cell)>) {
239 f(output, cell);
240 } else if constexpr (std::is_invocable_v<F, T*, decltype(cell), int, const int*>) {
241 f(output, cell, _iC, input);
242 } else {
243 f(output, _iC, input);
244 }
245 return true;
246 })
247 { }
std::conditional_t< DESCRIPTOR::d==2, BlockLatticeF2D< T, DESCRIPTOR >, BlockLatticeF3D< T, DESCRIPTOR > > BlockLatticeF
◆ operator()()
template<typename T , typename DESCRIPTOR >
Definition at line 249 of file blockBaseF3D.h.
249 {
250 return _f(output, input);
251 }
The documentation for this class was generated from the following file: