47 scale_(label(
vector::nComponents)),
48 active_(bool(coordSys_))
58 scale_.set(dir, std::move(scaling));
68 coordSys_(
rhs.coordSys_.clone()),
84 return coordSys_->localPosition(globalPos);
98 auto tfld = tmp<Field<Type>>
::New(
p0);
99 auto&
fld = tfld.ref();
111 scale_[dir].value(
local.component(dir))
116 return coordSys_->transform(
pos,
fld);
118 else if (scale_.size())
127 scale_[dir].value(
pos.component(dir))
142 coordSys_->writeEntry(
os);
148 scale_[dir].writeData(
os);
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))
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
static autoPtr< Function1< Type > > NewIfPresent(const word &entryName, const dictionary &dict, const word &redirectType, const objectRegistry *obrPtr=nullptr)
An optional selector, with fallback redirection.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static constexpr direction nComponents
Number of components in this vector space.
Helper class to wrap coordinate system and component-wise scaling.
virtual tmp< Field< Type > > transform(const pointField &pos, const Field< Type > &local) const
Evaluate.
tmp< pointField > localPosition(const pointField &globalPos) const
Convert to local coordinates, pass-through if no coordinate system is active.
coordinateScaling()
Default construct.
virtual void writeEntry(Ostream &os) const
Write dictionary entry.
Base class for coordinate system specification, the default coordinate system type is cartesian .
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Registry of regIOobjects.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
const volScalarField & p0
OBJstream os(runTime.globalPath()/outputName)
dimensionedScalar pos(const dimensionedScalar &ds)
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.
Field< vector > vectorField
Specialisation of Field<T> for vector.
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
vectorField pointField
pointField is a vectorField.
#define forAll(list, i)
Loop across all elements in list.