39 bool hasPointData =
false;
46 hasPointData = tvar().isPointData();
48 else if (isGlobalVariable<Type>(
name))
56 const auto& var = tvar.
cref();
59 const label len = (hasPointData ? this->
pointSize() : this->
size());
70 <<
"Variable " <<
name
71 <<
" is nonuniform and does not fit the size"
72 <<
". Using average" <<
endl;
86 return getField<Type>(
name);
94 return getField<Type>(
name);
102 return getField<Type>(
name);
118 const label patchIndex = patch_.index();
127 for (
int checki = 0; !
found && checki < 2; ++checki)
137 if (!ioptr)
continue;
158 if (!
found && searchFiles())
160 const word fldType = this->getTypeOfField(
name);
164 vfield = this->readAndRegister<VolumeField<Type>>(
name,
mesh());
168 sfield = this->readAndRegister<SurfaceField<Type>>(
name,
mesh());
172 pfield = this->readAndRegister<PointField<Type>>
185 vfield().boundaryField()[patchIndex]
192 sfield().boundaryField()[patchIndex]
197 return pfield().boundaryField()[patchIndex].patchInternalField();
202 <<
"No field '" <<
name <<
"' of type "
239 const label patchIndex = patch_.index();
247 for (
int checki = 0; !
found && checki < 2; ++checki)
257 if (!ioptr)
continue;
273 if (!
found && searchFiles())
275 const word fldType = this->getTypeOfField(
name);
279 vfield = this->readAndRegister<VolumeField<Type>>(
name,
mesh());
283 pfield = this->readAndRegister<PointField<Type>>
294 return vfield().boundaryField()[patchIndex].patchInternalField();
298 return pfield().boundaryField()[patchIndex].patchInternalField();
303 <<
"No field '" <<
name <<
"' of type "
336 const label patchIndex = patch_.index();
343 for (
int checki = 0; !
found && checki < 2; ++checki)
353 if (!ioptr)
continue;
364 if (!
found && searchFiles())
366 const word fldType = this->getTypeOfField(
name);
370 vfield = this->readAndRegister<VolumeField<Type>>(
name,
mesh());
377 return vfield().boundaryField()[patchIndex].patchNeighbourField();
382 <<
"No field '" <<
name <<
"' of type "
411 const label patchIndex = patch_.index();
418 for (
int checki = 0; !
found && checki < 2; ++checki)
428 if (!ioptr)
continue;
439 if (!
found && searchFiles())
441 const word fldType = this->getTypeOfField(
name);
445 vfield = this->readAndRegister<VolumeField<Type>>(
name,
mesh());
452 return vfield().boundaryField()[patchIndex].snGrad();
457 <<
"No field '" <<
name <<
"' of type "
Generic templated field type.
Generic GeometricField class.
Interpolation class within a primitive patch. Allows interpolation from points to faces and vice vers...
tmp< Field< Type > > faceToPointInterpolate(const Field< Type > &ff) const
Interpolate from faces to points.
tmp< Field< Type > > pointToFaceInterpolate(const Field< Type > &pf) const
Interpolate from points to faces.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
void size(const label n)
Older name for setAddressableSize.
virtual tmp< Field< Type > > patchNeighbourField() const =0
Return neighbour field of internal field.
const regIOobject * cfindContextIOobject(const word &name) const
Find named context field, if it exists.
static autoPtr< fvExprDriver > New(const dictionary &dict, const fvMesh &mesh)
Return a reference to the selected value driver.
virtual exprResult & variable(const word &name)
Non-const access to the named variable (sub-classes only)
const exprResult & lookupGlobal(const word &name) const
Return the global variable if available or a null result.
virtual bool hasVariable(const word &name) const
True if named variable exists.
virtual label size() const
The natural field size for the expression.
tmp< Field< Type > > getVariableIfAvailable(const word &fldName) const
Retrieve variable as field if possible.
tmp< Field< Type > > patchNormalField(const word &fldName)
Return surface normal field (snGrad)
virtual label pointSize() const
The point field size for the expression.
tmp< Field< Type > > getVolField(const word &fldName)
Retrieve field (vol field)
tmp< Field< Type > > getPointField(const word &fldName)
Retrieve field (point field)
tmp< Field< Type > > getSurfaceField(const word &fldName)
Retrieve field (surface field)
tmp< Field< Type > > getField(const word &fldName)
Return named field.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
A topoSetPointSource to select all points based on usage in given faceSet(s).
Registry of regIOobjects.
wordList sortedNames() const
The sorted names of all objects.
const regIOobject * cfindIOobject(const word &name, const bool recursive=false) const
Return const pointer to the regIOobject.
A traits class, which is primarily used for primitives.
A topoSetFaceSource to select faces with any point or any edge within a given pointSet(s).
A class for managing references or pointers (no reference counting)
bool valid() const noexcept
Identical to good(), or bool operator.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A class for managing temporary objects.
bool valid() const noexcept
Identical to good(), or bool operator.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
Ostream & endl(Ostream &os)
Add newline and flush stream.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
Type gAverage(const FieldField< Field, Type > &f)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)