45 const VolFieldType&
fld = *(iter.val());
54 <<
" a field named " << sampleFldName
55 <<
" already exists on the mesh"
60 label sz = sflds.size();
82 Log <<
" created " << sflds[sz].name()
83 <<
" to sample " <<
fld.name() <<
endl;
98 Field<Type> sampledValues(getPatchDataMapPtr_().constructSize());
100 forAll(cellToWalls_, celli)
102 const labelList& cData = cellToWalls_[celli];
106 const point& samplePt = cellToSamples_[celli][i];
107 sampledValues[cData[i]] = interpolator.
interpolate(samplePt, celli);
112 getPatchDataMapPtr_().reverseDistribute
114 getPatchDataMapPtr_().constructSize(),
119 Boundary& fldBf =
fld.boundaryFieldRef();
122 label nPatchFaces = 0;
123 for (
const label patchi : patchSet_)
130 newFld[i] = sampledValues[nPatchFaces++];
148 const word& fldName = reverseFieldMap_[sflds[i].name()];
149 const VolFieldType&
fld = obr_.lookupObject<VolFieldType>(fldName);
158 sampleBoundaryField(interpolator, sflds[i]);
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Generic templated field type.
Generic GeometricField class.
A HashTable similar to std::unordered_map.
List< Key > toc() const
The table of contents (the keys) in unsorted order.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
readOption readOpt() const noexcept
The read option.
virtual void rename(const word &newName)
Rename the object.
writeOption writeOpt() const noexcept
The write option.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
void size(const label n)
Older name for setAddressableSize.
This boundary condition is not designed to be evaluated; it is assmued that the value is assigned via...
void createFields(PtrList< GeometricField< Type, fvPatchField, volMesh > > &) const
void sampleBoundaryField(const interpolationCellPoint< Type > &interpolator, GeometricField< Type, fvPatchField, volMesh > &fld) const
Override boundary fields with sampled values.
void sampleFields(PtrList< GeometricField< Type, fvPatchField, volMesh > > &) const
labelHashSet patchSet_
Patches to sample.
HashTable< word > fieldMap_
From original field to sampled result.
const objectRegistry & obr_
Reference to the region objectRegistry.
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.
HashTable< const Type * > lookupClass(const bool strict=false) const
Return all objects with a class satisfying isA<Type>
bool found(const word &name, const bool recursive=false) const
Can the regIOobject object be found (by name).
A class for handling words, derived from Foam::string.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
#define WarningInFunction
Report a warning using Foam::Warning.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.