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 DimensionedField< Type, volMesh > &, const dictionary &) | |
Construct from patch, internal field and dictionary. More... | |
timeVaryingMappedFvPatchField (const timeVaryingMappedFvPatchField< Type > &) | |
Copy constructor. More... | |
const Time & | time () const |
void | map (const timeVaryingMappedFvPatchField< Type > &, const fieldMapper &) |
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... | |
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 149 of file timeVaryingMappedFvPatchField.H.
timeVaryingMappedFvPatchField | ( | const fvPatch & | p, |
const DimensionedField< Type, volMesh > & | iF, | ||
const dictionary & | dict | ||
) |
Construct from patch, internal field and dictionary.
Definition at line 267 of file timeVaryingMappedFvPatchField.C.
References dict, DimensionedField< Type, GeoMesh >::dimensions(), Foam::dimTime, Foam::exit(), string::expand(), Foam::FatalIOError, FatalIOErrorInFunction, and Function1< Type >::New().
timeVaryingMappedFvPatchField | ( | const timeVaryingMappedFvPatchField< Type > & | ptf | ) |
Copy constructor.
Definition at line 331 of file timeVaryingMappedFvPatchField.C.
|
inline |
Definition at line 239 of file timeVaryingMappedFvPatchField.H.
References fvPatch::boundaryMesh(), fvBoundaryMesh::mesh(), and fvMesh::time().
void map | ( | const timeVaryingMappedFvPatchField< Type > & | tiptf, |
const fieldMapper & | mapper | ||
) |
Map the given timeVaryingMappedFvPatchField.
onto this timeVaryingMappedFvPatchField
Definition at line 361 of file timeVaryingMappedFvPatchField.C.
void reset | ( | const timeVaryingMappedFvPatchField< Type > & | ) |
Reset the fvPatchField to the given fvPatchField.
Used for mesh to mesh mapping
Definition at line 378 of file timeVaryingMappedFvPatchField.C.
Foam::tmp< Foam::Field< Type > > map |
Return the current mapped patch field.
Definition at line 394 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().
void write | ( | Ostream & | os | ) | const |
Write.
Definition at line 494 of file timeVaryingMappedFvPatchField.C.
References Foam::e, IOstream::name(), fileName::null, Foam::writeEntry(), and Foam::writeEntryIfDifferent().