35#ifndef Foam_FieldMapper_H
36#define Foam_FieldMapper_H
67 virtual label
size()
const = 0;
70 virtual bool direct()
const = 0;
86 <<
"attempt to access null direct addressing"
96 <<
"attempt to access null distributeMap"
106 <<
"attempt to access null interpolation addressing"
116 <<
"attempt to access null interpolation weights"
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
virtual bool direct() const =0
Is it a direct (non-interpolating) mapper?
FieldMapper()=default
Default construct.
virtual const labelUList & directAddressing() const
Return the direct addressing values.
virtual ~FieldMapper()=default
Destructor.
virtual const scalarListList & weights() const
Return the interpolation weights.
virtual label size() const =0
The size of the mapper.
virtual bool distributed() const
Does the mapper have remote contributions?
virtual const labelListList & addressing() const
Return the interpolation addressing.
virtual bool hasUnmapped() const =0
Any unmapped values?
tmp< Field< Type > > operator()(const Field< Type > &fld) const
Perform mapping on the given field.
virtual const mapDistributeBase & distributeMap() const
Return the distribution map.
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
static const List< labelList > & null() noexcept
static const UList< label > & null() noexcept
Class containing processor-to-processor mapping information.
A class for managing temporary objects.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< scalarList > scalarListList
List of scalarList.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
const T & NullObjectRef() noexcept
Const reference (of type T) to the nullObject.
List< labelList > labelListList
List of labelList.
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
UList< label > labelUList
A UList of labels.