OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::GroupedFieldF< T, DESCRIPTOR, GROUP, FIELD > Class Template Reference

GroupedFieldF is a NON-PARALLELIZED (no block/super differentiation) functor. More...

#include <groupedFieldF.h>

+ Inheritance diagram for olb::GroupedFieldF< T, DESCRIPTOR, GROUP, FIELD >:
+ Collaboration diagram for olb::GroupedFieldF< T, DESCRIPTOR, GROUP, FIELD >:

Public Member Functions

 GroupedFieldF (Container< T, DESCRIPTOR, DynamicFieldGroupsD< T, typename DESCRIPTOR::fields_t > > &container)
 
bool operator() (T output[], const int input[])
 
- Public Member Functions inherited from olb::ContainerF< T, DESCRIPTOR, DynamicFieldGroupsD< T, DESCRIPTOR::fields_t >, T >
 ContainerF (Container< T, DESCRIPTOR, DynamicFieldGroupsD< T, DESCRIPTOR::fields_t > > &container, int targetDim)
 
Container< T, DESCRIPTOR, DynamicFieldGroupsD< T, DESCRIPTOR::fields_t > > & getContainer ()
 
int getContainerSize () const
 
bool operator() (T output[], const int input[])
 
- Public Member Functions inherited from olb::GenericF< T, S >
virtual ~GenericF ()=default
 
int getSourceDim () const
 read only access to member variable _m
 
int getTargetDim () const
 read only access to member variable _n
 
std::string & getName ()
 read and write access to name
 
std::string const & getName () const
 read only access to name
 
virtual bool operator() (T output[], const S input[])=0
 has to be implemented for 'every' derived class
 
bool operator() (T output[])
 wrapper that call the pure virtual operator() (T output[], const S input[]) from above
 
bool operator() (T output[], S input0)
 
bool operator() (T output[], S input0, S input1)
 
bool operator() (T output[], S input0, S input1, S input2)
 
bool operator() (T output[], S input0, S input1, S input2, S input3)
 

Additional Inherited Members

- Public Types inherited from olb::GenericF< T, S >
using targetType = T
 
using sourceType = S
 
- Public Attributes inherited from olb::ContainerF< T, DESCRIPTOR, DynamicFieldGroupsD< T, DESCRIPTOR::fields_t >, T >
Container< T, DESCRIPTOR, DynamicFieldGroupsD< T, DESCRIPTOR::fields_t > > & _container
 
- Public Attributes inherited from olb::GenericF< T, S >
std::shared_ptr< GenericF< T, S > > _ptrCalcC
 memory management, frees resouces (calcClass)
 
- Static Public Attributes inherited from olb::ContainerF< T, DESCRIPTOR, DynamicFieldGroupsD< T, DESCRIPTOR::fields_t >, T >
static constexpr bool isSuper
 
static constexpr unsigned d
 
- Protected Member Functions inherited from olb::GenericF< T, S >
 GenericF (int targetDim, int sourceDim)
 

Detailed Description

template<typename T, typename DESCRIPTOR, typename GROUP, typename FIELD>
class olb::GroupedFieldF< T, DESCRIPTOR, GROUP, FIELD >

GroupedFieldF is a NON-PARALLELIZED (no block/super differentiation) functor.

Motivated by enabling easy access to quantities in the particle system, this funcor can be used for any grouped field frameworks. When a proper parrallelization methodology for the particle framework exists, this might have to be extended.

Definition at line 70 of file groupedFieldF.h.

Constructor & Destructor Documentation

◆ GroupedFieldF()

template<typename T , typename DESCRIPTOR , typename GROUP , typename FIELD >
olb::GroupedFieldF< T, DESCRIPTOR, GROUP, FIELD >::GroupedFieldF ( Container< T, DESCRIPTOR, DynamicFieldGroupsD< T, typename DESCRIPTOR::fields_t > > & container)

Definition at line 63 of file groupedFieldF.hh.

65 : ContainerF<T,DESCRIPTOR,DynamicFieldGroupsD<T,typename DESCRIPTOR::fields_t>,T>( container,
66 DESCRIPTOR::template size<typename meta::derived_type_in_nested<DESCRIPTOR,GROUP,FIELD>::type>() )
67{
68 this->getName() = std::string(typeid(FIELD).name());
69}
std::string & getName()
read and write access to name
Definition genericF.hh:51
std::string name()
Returns distinct name on GCC, Clang and ICC but may return arbitrary garbage as per the standard.
Definition meta.h:100

References olb::GenericF< T, S >::getName().

+ Here is the call graph for this function:

Member Function Documentation

◆ operator()()

template<typename T , typename DESCRIPTOR , typename GROUP , typename FIELD >
bool olb::GroupedFieldF< T, DESCRIPTOR, GROUP, FIELD >::operator() ( T output[],
const int input[] )

Definition at line 72 of file groupedFieldF.hh.

73{
74 using namespace olb::descriptors;
75 using GROUP_EVAL = typename DESCRIPTOR::template derivedField<GROUP>;
76 using FIELD_EVAL = typename GROUP_EVAL::template derivedField<FIELD>;
77 auto fieldValue = this->getContainer().data().template get<GROUP_EVAL>()
78 .template getFieldPointer<FIELD_EVAL>(input[0]);
79
80 for (int iDim=0; iDim<this->getTargetDim(); ++iDim){
81 output[iDim] = fieldValue[iDim];
82 }
83 return true; //TODO: add Error handling using true/false
84}
Container< T, DESCRIPTOR, DynamicFieldGroupsD< T, DESCRIPTOR::fields_t > > & getContainer()
FIELD_ARRAY_TYPE & data()
Definition container.h:62
int getTargetDim() const
read only access to member variable _n
Definition genericF.hh:45
Descriptors for the 2D and 3D lattices.

The documentation for this class was generated from the following files: