39 const word& entryName,
50 const word& entryName,
107template<
class Function1Type>
115 auto&
fld = tfld.ref();
119 fld[i] = Function1Type::value(
x[i]);
125template<
class Function1Type>
128 const word& entryName,
130 const objectRegistry* obrPtr
133 Function1Type(entryName,
dict, obrPtr)
137template<
class Function1Type>
146 auto&
fld = tfld.ref();
150 fld[i] = Function1Type::integrate(x1[i], x2[i]);
165 os.writeKeyword(name_) <<
type();
175 const Function1<Type>&
rhs
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 tmp< Field< Type > > integrate(const scalarField &x1, const scalarField &x2) const
Integrate between two (scalar) values.
virtual tmp< Field< Type > > value(const scalarField &x) const
Return value as a function of (scalar) independent variable.
FieldFunction1(const word &entryName, const dictionary &dict, const objectRegistry *obrPtr=nullptr)
Construct from entry name and dictionary.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
virtual void writeData(Ostream &os) const
Write in dictionary format.
Function1(const word &entryName, const objectRegistry *obrPtr=nullptr)
Construct from entry name.
virtual void writeEntries(Ostream &os) const
Write coefficient entries in dictionary format.
virtual Type value(const scalar x) const
Return value as a function of (scalar) independent variable.
virtual Type integrate(const scalar x1, const scalar x2) const
Integrate between two (scalar) values.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
function1Base(const word &entryName, const objectRegistry *obrPtr=nullptr)
Construct from entry name and optional registry.
const word name_
Name of entry.
Registry of regIOobjects.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
OBJstream os(runTime.globalPath()/outputName)
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.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
#define forAll(list, i)
Loop across all elements in list.