generalFieldMapper Class Referenceabstract

General field mapper supporting both direct and weighted mapping. More...

Inheritance diagram for generalFieldMapper:
Collaboration diagram for generalFieldMapper:

Public Member Functions

 generalFieldMapper ()
 Null constructor. More...
 
virtual ~generalFieldMapper ()
 Destructor. More...
 
virtual bool direct () const =0
 Is the mapper direct? More...
 
virtual const labelUList & directAddressing () const
 Access the direct addressing. More...
 
virtual const labelListList & addressing () const
 Access the general addressing. More...
 
virtual const scalarListList & weights () const
 Access the general weights. More...
 
 FOR_ALL_FIELD_TYPES (DEFINE_FIELD_MAPPER_MAP_OPERATOR,)
 Map a field. More...
 
 DEFINE_FIELD_MAPPER_MAP_OPERATOR (label,)
 Map a label field. More...
 
template<class Type >
Foam::tmp< Foam::Field< Type > > map (const Field< Type > &mapF) const
 
- Public Member Functions inherited from fieldMapper
 fieldMapper ()
 Null constructor. More...
 
virtual ~fieldMapper ()
 Destructor. More...
 
 FOR_ALL_FIELD_TYPES (DEFINE_FIELD_MAPPER_MAP_OPERATOR,=0)
 Map a field. More...
 
virtual void operator() (Field< label > &f, const Field< label > &mapF) const =0
 Map a label field. More...
 
virtual tmp< Field< label > > operator() (const Field< label > &mapF) const =0
 
template<class Type >
void operator() (Field< Type > &f, const tmp< Field< Type >> &tmapF) const
 Map a temporary field. More...
 
template<class Type >
tmp< Field< Type > > operator() (const tmp< Field< Type >> &tmapF) const
 Map a temporary field. More...
 
 FOR_ALL_FIELD_TYPES (DEFINE_FIELD_MAPPER_MAP_OR_ASSIGN_OPERATOR,)
 Map or assign a field. More...
 
virtual void operator() (Field< label > &f, const Field< label > &mapF, const label &unmappedVal) const
 Map or assign a label field. More...
 
virtual tmp< Field< label > > operator() (const Field< label > &mapF, const label &unmappedVal) const
 
virtual void operator() (Field< label > &f, const Field< label > &mapF, const FieldFunctor< label > &unmappedFunc) const
 
virtual tmp< Field< label > > operator() (const Field< label > &mapF, const FieldFunctor< label > &unmappedFunc) const
 
template<class Type , class FieldOp >
void operator() (Field< Type > &f, const Field< Type > &mapF, const FieldOp &unmappedOp) const
 Map or assign a field from an operator in-place. More...
 
template<class Type , class FieldOp >
TmpFieldTypeIfFieldOp< Type, FieldOp > operator() (const Field< Type > &mapF, const FieldOp &unmappedOp) const
 Map or assign a field from an operator and return the result. More...
 
template<class Type >
Foam::tmp< Foam::Field< Type > > mapOrAssign (const Field< Type > &mapF, const Type &unmappedVal) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > mapOrAssign (const Field< Type > &mapF, const FieldFunctor< Type > &unmappedFunc) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > operator() (const tmp< Field< Type >> &tmapF) const
 
template<class Type , class FieldOp >
Foam::fieldMapper::TmpFieldTypeIfFieldOp< Type, FieldOp > operator() (const Field< Type > &mapF, const FieldOp &unmappedOp) const
 

Detailed Description

General field mapper supporting both direct and weighted mapping.

Definition at line 45 of file generalFieldMapper.H.

Constructor & Destructor Documentation

◆ generalFieldMapper()

generalFieldMapper ( )
inline

Null constructor.

Definition at line 65 of file generalFieldMapper.H.

◆ ~generalFieldMapper()

virtual ~generalFieldMapper ( )
inlinevirtual

Destructor.

Definition at line 70 of file generalFieldMapper.H.

Member Function Documentation

◆ direct()

virtual bool direct ( ) const
pure virtual

Is the mapper direct?

Implemented in faceMapper, cellMapper, pointPatchMapper, pointMapper, singleCellFvMesh::agglomPatchFieldMapper, fvSurfaceMapper, and fvPatchMapper.

Referenced by pointPatchMapper::direct().

Here is the caller graph for this function:

◆ directAddressing()

const Foam::labelUList & directAddressing ( ) const
virtual

Access the direct addressing.

Reimplemented in faceMapper, cellMapper, pointPatchMapper, pointMapper, fvSurfaceMapper, and fvPatchMapper.

Definition at line 82 of file generalFieldMapper.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and UList< label >::null().

Here is the call graph for this function:

◆ addressing()

const Foam::labelListList & addressing ( ) const
virtual

Access the general addressing.

Reimplemented in faceMapper, cellMapper, pointPatchMapper, pointMapper, singleCellFvMesh::agglomPatchFieldMapper, fvSurfaceMapper, and fvPatchMapper.

Definition at line 92 of file generalFieldMapper.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and List< labelList >::null().

Here is the call graph for this function:

◆ weights()

const Foam::scalarListList & weights ( ) const
virtual

Access the general weights.

Reimplemented in faceMapper, cellMapper, pointPatchMapper, pointMapper, singleCellFvMesh::agglomPatchFieldMapper, fvSurfaceMapper, and fvPatchMapper.

Definition at line 102 of file generalFieldMapper.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and List< scalarList >::null().

Here is the call graph for this function:

◆ FOR_ALL_FIELD_TYPES()

FOR_ALL_FIELD_TYPES ( DEFINE_FIELD_MAPPER_MAP_OPERATOR  )

Map a field.

◆ DEFINE_FIELD_MAPPER_MAP_OPERATOR()

DEFINE_FIELD_MAPPER_MAP_OPERATOR ( label  )

Map a label field.

◆ map()

Foam::tmp<Foam::Field<Type> > map ( const Field< Type > &  mapF) const

Definition at line 63 of file generalFieldMapper.C.

References tf.


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