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 map (const timeVaryingMappedFvPatchField< Type > &, const fvPatchFieldMapper &)
 Map the given timeVaryingMappedFvPatchField. More...
 
void reset (const timeVaryingMappedFvPatchField &)
 Reset the fvPatchField to the given fvPatchField. 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 267 of file timeVaryingMappedFvPatchField.C.

◆ timeVaryingMappedFvPatchField() [2/3]

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

Construct from patch, dictionary and field name.

Definition at line 293 of file timeVaryingMappedFvPatchField.C.

References dict, Foam::exit(), string::expand(), Foam::FatalIOError, FatalIOErrorInFunction, and Function1< Type >::New().

Here is the call graph for this function:

◆ timeVaryingMappedFvPatchField() [3/3]

Copy constructor.

Definition at line 357 of file timeVaryingMappedFvPatchField.C.

Member Function Documentation

◆ time()

const Time& time ( ) const
inline

Definition at line 252 of file timeVaryingMappedFvPatchField.H.

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

Here is the call graph for this function:

◆ map() [1/2]

void map ( const timeVaryingMappedFvPatchField< Type > &  tiptf,
const fvPatchFieldMapper mapper 
)

◆ reset()

void reset ( const timeVaryingMappedFvPatchField< Type > &  )

Reset the fvPatchField to the given fvPatchField.

Used for mesh to mesh mapping

Definition at line 403 of file timeVaryingMappedFvPatchField.C.

◆ map() [2/2]

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

Return the current mapped patch field.

Definition at line 419 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::offset(), Foam::Pout, tmp< T >::ref(), and s().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const

Write.

Definition at line 520 of file timeVaryingMappedFvPatchField.C.

References Foam::e, IOstream::name(), fileName::null, Foam::writeEntry(), and Foam::writeEntryIfDifferent().

Here is the call graph for this function:

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