timeVaryingMappedFvPatchField< Type > Class Template Reference

Patch field mapper which interpolates the values from a set of supplied points in space and time. More...

Inheritance diagram for timeVaryingMappedFvPatchField< Type >:
Collaboration diagram for timeVaryingMappedFvPatchField< Type >:

Public Member Functions

 timeVaryingMappedFvPatchField (const fvPatch &, const word &fieldName)
 Construct from patch and field name. More...
 
 timeVaryingMappedFvPatchField (const fvPatch &, const dictionary &, const word &fieldName)
 Construct from patch, dictionary and field name. More...
 
 timeVaryingMappedFvPatchField (const timeVaryingMappedFvPatchField< Type > &)
 Copy constructor. More...
 
const Timetime () const
 
void autoMap (const fvPatchFieldMapper &)
 Map (and resize as needed) from self given a mapping object. More...
 
void rmap (const timeVaryingMappedFvPatchField< Type > &, const labelList &)
 Reverse map the given timeVaryingMappedFvPatchField. More...
 
tmp< Field< Type > > map ()
 Return the current mapped patch field. More...
 
void write (Ostream &) const
 Write. More...
 
- Public Member Functions inherited from timeVaryingMapped
 ClassName ("timeVaryingMapped")
 Runtime type information. More...
 
 timeVaryingMapped ()
 Construct null. More...
 

Detailed Description

template<class Type>
class Foam::timeVaryingMappedFvPatchField< Type >

Patch field mapper which interpolates the values from a set of supplied points in space and time.

By default the data files should be provide in constant/boundaryData/<patch name>/ directory:

  • points : pointField of locations
  • <time>/<field> : field of values at time <time>

Alternatively the names and locations of the points and field files may be specified explicitly via the optional dictionary entries:

  • dataDir <optional top-level directory of the points and field data>;
  • points <optional path including name of points file relative to dataDir>;
  • sample <optional name of the sub-directory in the time directories containing the fields>; This is particularly useful when mapping data from another case for which the sample functionObject is used to obtain the patch field data for mapping.

The default mode of operation (mapMethod planarInterpolation) is to project the points onto a plane (constructed from the first three points) and construct a 2D triangulation and finds for the face centres the triangle it is in and the weights to the 3 vertices.

The optional mapMethod nearest will avoid all projection and triangulation and just use the value at the nearest vertex.

Values are interpolated linearly between times.

Usage
Property Description Required Default value
setAverage Switch to activate setting of average value no false
perturb Perturb points for regular geometries no 1e-5
fieldTable Alternative field name to sample no this field name
mapMethod Type of mapping no planarInterpolation
offset Offset to mapped values no Zero
dataDir Top-level directory of the points and field data no constant/boundaryData/<patch name>
points Path including name of points file relative to dataDir no points
sample Name of the sub-directory in the time directories containing the fields no ""
See also
Foam::timeVaryingMappedFixedValueFvPatchField Foam::Function1s
Source files

Definition at line 162 of file timeVaryingMappedFvPatchField.H.

Constructor & Destructor Documentation

◆ timeVaryingMappedFvPatchField() [1/3]

timeVaryingMappedFvPatchField ( const fvPatch p,
const word fieldName 
)

Construct from patch and field name.

Definition at line 268 of file timeVaryingMappedFvPatchField.C.

Referenced by timeVaryingMappedFvPatchField< Type >::timeVaryingMappedFvPatchField().

Here is the caller graph for this function:

◆ timeVaryingMappedFvPatchField() [2/3]

timeVaryingMappedFvPatchField ( const fvPatch p,
const dictionary dict,
const word fieldName 
)

Construct from patch, dictionary and field name.

Definition at line 294 of file timeVaryingMappedFvPatchField.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::found(), Foam::compressible::New(), and timeVaryingMappedFvPatchField< Type >::timeVaryingMappedFvPatchField().

Here is the call graph for this function:

◆ timeVaryingMappedFvPatchField() [3/3]

Copy constructor.

Definition at line 359 of file timeVaryingMappedFvPatchField.C.

References timeVaryingMappedFvPatchField< Type >::autoMap().

Here is the call graph for this function:

Member Function Documentation

◆ time()

const Time& time ( ) const
inline

Definition at line 252 of file timeVaryingMappedFvPatchField.H.

References fvPatch::boundaryMesh(), fvBoundaryMesh::mesh(), fvMesh::time(), and Foam::vtkWriteOps::write().

Here is the call graph for this function:

◆ autoMap()

void autoMap ( const fvPatchFieldMapper m)

Map (and resize as needed) from self given a mapping object.

Definition at line 387 of file timeVaryingMappedFvPatchField.C.

References timeVaryingMappedFvPatchField< Type >::rmap().

Referenced by timeVaryingMappedFvPatchField< Type >::timeVaryingMappedFvPatchField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rmap()

void rmap ( const timeVaryingMappedFvPatchField< Type > &  tiptf,
const labelList addr 
)

Reverse map the given timeVaryingMappedFvPatchField.

onto this timeVaryingMappedFvPatchField

Definition at line 405 of file timeVaryingMappedFvPatchField.C.

Referenced by timeVaryingMappedFvPatchField< Type >::autoMap().

Here is the caller graph for this function:

◆ map()

Foam::tmp< Foam::Field< Type > > map ( )

Return the current mapped patch field.

Definition at line 421 of file timeVaryingMappedFvPatchField.C.

References Foam::endl(), fld(), Foam::gAverage(), Foam::gMax(), Foam::gMin(), Foam::gSum(), Foam::mag(), OSstream::name(), fileName::name(), Foam::nl, Foam::Pout, tmp< T >::ref(), s(), and timeVaryingMappedFvPatchField< Type >::write().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const

Write.

Definition at line 523 of file timeVaryingMappedFvPatchField.C.

References Foam::constant::electromagnetic::e, IOstream::name(), Foam::writeEntry(), and Foam::writeEntryIfDifferent().

Referenced by timeVaryingMappedFvPatchField< Type >::map().

Here is the call graph for this function:
Here is the caller graph for this function:

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