Patch field mapper which interpolates the values from a set of supplied points in space and time. More...
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 Time & | time () 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... | |
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:
Alternatively the names and locations of the points and field files may be specified explicitly via the optional dictionary entries:
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.
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 | "" |
Definition at line 162 of file timeVaryingMappedFvPatchField.H.
timeVaryingMappedFvPatchField | ( | const fvPatch & | p, |
const word & | fieldName | ||
) |
Construct from patch and field name.
Definition at line 267 of file timeVaryingMappedFvPatchField.C.
Referenced by timeVaryingMappedFvPatchField< Type >::timeVaryingMappedFvPatchField().
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 Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::found(), Foam::compressible::New(), and timeVaryingMappedFvPatchField< Type >::timeVaryingMappedFvPatchField().
timeVaryingMappedFvPatchField | ( | const timeVaryingMappedFvPatchField< Type > & | ptf | ) |
Copy constructor.
Definition at line 358 of file timeVaryingMappedFvPatchField.C.
References timeVaryingMappedFvPatchField< Type >::autoMap().
|
inline |
Definition at line 252 of file timeVaryingMappedFvPatchField.H.
References fvPatch::boundaryMesh(), fvBoundaryMesh::mesh(), fvMesh::time(), and Foam::vtkWriteOps::write().
void autoMap | ( | const fvPatchFieldMapper & | m | ) |
Map (and resize as needed) from self given a mapping object.
Definition at line 386 of file timeVaryingMappedFvPatchField.C.
References timeVaryingMappedFvPatchField< Type >::rmap().
Referenced by timeVaryingMappedFvPatchField< Type >::timeVaryingMappedFvPatchField().
void rmap | ( | const timeVaryingMappedFvPatchField< Type > & | tiptf, |
const labelList & | addr | ||
) |
Reverse map the given timeVaryingMappedFvPatchField.
onto this timeVaryingMappedFvPatchField
Definition at line 404 of file timeVaryingMappedFvPatchField.C.
Referenced by timeVaryingMappedFvPatchField< Type >::autoMap().
Foam::tmp< Foam::Field< Type > > map | ( | ) |
Return the current mapped patch field.
Definition at line 420 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().
void write | ( | Ostream & | os | ) | const |
Write.
Definition at line 522 of file timeVaryingMappedFvPatchField.C.
References Foam::constant::electromagnetic::e, IOstream::name(), Foam::writeEntry(), and Foam::writeEntryIfDifferent().
Referenced by timeVaryingMappedFvPatchField< Type >::map().