47 io.registerObject(
false);
56 tfield.ref().primitiveFieldRef() = df;
58 tfield.ref().correctBoundaryConditions();
72 auto tfield = zeroGradientField<Type>(df);
99 auto tfield = zeroGradientField<Type>(tproxied());
107 auto tfield = zeroGradientField<Type>(tdf());
118template<
class GeoField>
130 tfield.ref().checkOut();
131 tfield.ref().rename(
fld.name());
139template<
class GeoField>
184template<
class GeoField>
192template<
class GeoField>
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))
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const Mesh & mesh() const noexcept
Return const reference to mesh.
const dimensionSet & dimensions() const noexcept
Return dimensions.
orientedType oriented() const noexcept
Return oriented type.
Generic GeometricField class.
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Generic dimensioned Type class.
static tmp< GeoField > interpolate(const fvMeshSubset &subsetter, const GeoField &fld)
Wrapper for field or the subsetted field.
static tmp< GeometricField< Type, fvPatchField, volMesh > > zeroGradientField(const DimensionedField< Type, volMesh > &df)
Construct volField (with zeroGradient) from an internal field.
const fvMeshSubset & subsetter() const noexcept
The mesh subsetter.
static tmp< GeometricField< Type, fvPatchField, volMesh > > interpolateInternal(const fvMeshSubset &subsetter, const DimensionedField< Type, volMesh > &df)
Convert an internal field to a volume field (with zeroGradient).
Holds a reference to the original mesh (the baseMesh) and optionally to a subset of that mesh (the su...
static tmp< DimensionedField< Type, volMesh > > interpolate(const DimensionedField< Type, volMesh > &, const fvMesh &sMesh, const labelUList &cellMap)
Map volume internal (dimensioned) field.
bool hasSubMesh() const noexcept
Have subMesh?
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
A class for managing temporary objects.
bool good() const noexcept
True if pointer/reference is non-null.
void clear() const noexcept
If object pointer points to valid object: delete object and set pointer to nullptr.
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.
static constexpr const zero Zero
Global zero (0).
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)