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, fvMesh > &, const dictionary &) | |
| Construct from patch, internal field and dictionary. More... | |
| timeVaryingMappedFvPatchField (const timeVaryingMappedFvPatchField &, const fvPatch &, const DimensionedField< Type, fvMesh > &, const fieldMapper &) | |
| Construct by mapping given timeVaryingMappedFvPatchField. More... | |
| timeVaryingMappedFvPatchField (const timeVaryingMappedFvPatchField< Type > &) | |
| Copy constructor. More... | |
| const Time & | time () const |
| Return reference to time. More... | |
| 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.If the surface from which the data was obtained changes in time, e.g. when sampled from a case with a changing mesh, a separate points file may be provided in each time directory alongside the field data, i.e. dataDir/<time>/<sample>/<points name>. Points files found in the time directories take precedence over the static points file.
Note: unfortunately if the points files exist in any of the time directories they MUST exist in ALL of the time directories and read from each. It would be much better if this functionality were changed for consistency with polyMesh and on restart the time directories are scanned backwards for the most recent points file, that way the points files are only read for times at which they change.
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 157 of file timeVaryingMappedFvPatchField.H.
| timeVaryingMappedFvPatchField | ( | const fvPatch & | p, |
| const DimensionedField< Type, fvMesh > & | iF, | ||
| const dictionary & | dict | ||
| ) |
Construct from patch, internal field and dictionary.
Definition at line 325 of file timeVaryingMappedFvPatchField.C.
References dict, DimensionedField< Type, GeoMesh, PrimitiveField >::dimensions(), Foam::exit(), string::expand(), Foam::FatalIOError, FatalIOErrorInFunction, Function1< Type >::New(), and timeVaryingMappedFvPatchField< Type >::time().

| timeVaryingMappedFvPatchField | ( | const timeVaryingMappedFvPatchField< Type > & | , |
| const fvPatch & | , | ||
| const DimensionedField< Type, fvMesh > & | , | ||
| const fieldMapper & | |||
| ) |
Construct by mapping given timeVaryingMappedFvPatchField.
onto a new patch
| timeVaryingMappedFvPatchField | ( | const timeVaryingMappedFvPatchField< Type > & | ptf | ) |
Copy constructor.
Definition at line 425 of file timeVaryingMappedFvPatchField.C.
|
inline |
Return reference to time.
Definition at line 270 of file timeVaryingMappedFvPatchField.H.
References fvPatch::time().
Referenced by timeVaryingMappedFvPatchField< Type >::timeVaryingMappedFvPatchField().


| void map | ( | const timeVaryingMappedFvPatchField< Type > & | tiptf, |
| const fieldMapper & | mapper | ||
| ) |
Map the given timeVaryingMappedFvPatchField.
onto this timeVaryingMappedFvPatchField
Definition at line 455 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 466 of file timeVaryingMappedFvPatchField.C.
| Foam::tmp< Foam::Field< Type > > map |
Return the current mapped patch field.
Definition at line 485 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(), s(), and Foam::dimensions::time.

| void write | ( | Ostream & | os | ) | const |
Write.
Definition at line 585 of file timeVaryingMappedFvPatchField.C.
References Foam::e, fileName::null, Foam::dimensions::time, Foam::writeEntry(), and Foam::writeEntryIfDifferent().
