48 Log <<
" a field " << sampleFieldName
49 <<
" already exists on the mesh."
54 label sz = sfields.size();
55 sfields.setSize(sz+1);
69 calculatedFvPatchScalarField::typeName
73 Log <<
" created " << sfields[sz].name()
74 <<
" to sample " << field.
name() <<
endl;
89 Field<Type> sampledValues(getPatchDataMapPtr_().constructSize());
91 forAll(cellToWalls_, celli)
93 const labelList& cData = cellToWalls_[celli];
97 const point& samplePt = cellToSamples_[celli][i];
98 sampledValues[cData[i]] = interpolator.
interpolate(samplePt, celli);
103 getPatchDataMapPtr_().reverseDistribute
105 getPatchDataMapPtr_().constructSize(),
113 label nPatchFaces = 0;
123 newField[i] = sampledValues[nPatchFaces++];
139 const word& fieldName = reverseFieldMap_[sfields[i].name()];
150 sampleBoundaryField(interpolator, sfields[i]);
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Pre-declare SubField and related Field type.
Generic GeometricField class.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
bool found(const Key &) const
Return true if hashedEntry is found in table.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const word & name() const
Return name.
void size(const label)
Override size to be inconsistent with allocated storage.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
const word & name() const
Return const reference to name.
const Time & time_
Reference to time.
const fvMesh & mesh_
Reference to the fvMesh.
void sampleFields(PtrList< VolField< Type >> &) const
void createFields(PtrList< VolField< Type >> &) const
virtual wordList fields() const
Return the list of fields required.
void sampleBoundaryField(const interpolationCellPoint< Type > &interpolator, VolField< Type > &fld) const
Override boundary fields with sampled values.
HashTable< word > fieldMap_
From original field to sampled result.
const objectRegistry & obr_
Reference to the region objectRegistry.
UPtrList< GeoField > fields(const bool strict=false) const
Return the list of fields of type GeoField.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Given cell centre values and point (vertex) values decompose into tetrahedra and linear interpolate w...
Type interpolate(const cellPointWeight &cpw) const
Interpolate field for the given cellPointWeight.
A class for handling words, derived from string.
#define Log
Report write to Foam::Info if the local log switch is true.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.