41 #ifndef Foam_GeometricField_H 42 #define Foam_GeometricField_H 55 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
58 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
62 const GeometricField<Type, PatchField, GeoMesh>&
65 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
69 const tmp<GeometricField<Type, PatchField, GeoMesh>>&
77 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
80 public DimensionedField<Type, GeoMesh>
111 mutable label timeIndex_;
126 bool readIfPresent();
129 bool readOldTimeIfPresent();
160 const word& patchFieldType = PatchField<Type>::calculatedType()
183 const word& patchFieldType = PatchField<Type>::calculatedType()
203 const PtrList<PatchField<Type>>& ptfl
211 const PtrList<PatchField<Type>>& ptfl
219 const PtrList<PatchField<Type>>& ptfl
226 const PtrList<PatchField<Type>>& ptfl
233 const PtrList<PatchField<Type>>& ptfl
243 const word& patchFieldType = PatchField<Type>::calculatedType()
253 const word& patchFieldType = PatchField<Type>::calculatedType()
263 const PtrList<PatchField<Type>>& ptfl
273 const PtrList<PatchField<Type>>& ptfl
283 const PtrList<PatchField<Type>>& ptfl
291 const bool readOldTime =
true 347 const word& patchFieldType
357 const word& patchFieldType
392 const word& patchFieldType = PatchField<Type>::calculatedType()
405 const word& patchFieldType = PatchField<Type>::calculatedType()
418 const word& patchFieldType = PatchField<Type>::calculatedType()
430 const word& patchFieldType = PatchField<Type>::calculatedType()
470 template<
class AnyType>
476 const word& patchFieldType = PatchField<Type>::calculatedType()
483 template<
class AnyType>
489 const word& patchFieldType = PatchField<Type>::calculatedType()
533 const
bool updateAccessTime = true
696 friend Ostream& operator<< <Type, PatchField, GeoMesh>
702 friend Ostream& operator<< <Type, PatchField, GeoMesh>
710 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
714 const typename GeometricField<Type, PatchField, GeoMesh>::
const GeometricField< Type, PatchField, GeoMesh > & oldTime() const
Return old time field.
const Internal::FieldType & primitiveField() const noexcept
Return a const-reference to the internal field values.
GeoMesh::BoundaryMesh BoundaryMesh
The boundary mesh type for the boundary fields.
void operator=(const GeometricField< Type, PatchField, GeoMesh > &)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
bool writeData(Ostream &) const
WriteData member function required by regIOobject.
const word & name() const noexcept
Return the object name.
Field< Type >::cmptType cmptType
Component type of the field elements.
MESH::BoundaryMesh BoundaryMesh
const Internal & internalField() const noexcept
Return a const-reference to the dimensioned internal field.
pTraits< Type >::cmptType cmptType
Component type.
A min/max value pair with additional methods. In addition to conveniently storing values...
void operator/=(const GeometricField< scalar, PatchField, GeoMesh > &)
tmp< GeometricField< cmptType, PatchField, GeoMesh > > component(const direction) const
Return a component of the field.
GeoMesh::Mesh Mesh
The mesh type for the GeometricField.
void clip(const dimensioned< MinMax< Type >> &range)
Clip the field to be bounded within the specified range.
TypeName("GeometricField")
Runtime type information.
Generic GeometricField class.
GeometricBoundaryField< Type, PatchField, GeoMesh > Boundary
Type of boundary fields.
Generic dimensioned Type class.
label nOldTimes() const
Return the number of old time fields stored.
GeometricField(const IOobject &io, const Mesh &mesh, const dimensionSet &ds, const word &patchFieldType=PatchField< Type >::calculatedType())
Construct given IOobject, mesh, dimensions and patch type.
DimensionedField< Type, GeoMesh > Internal
The internal field type from which this GeometricField is derived.
Field< Type > FieldType
Type of the field from which this DimensionedField is derived.
word select(bool final) const
Select the final iteration parameters if `final' is true.
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
bool needReference() const
Does the field need a reference level for solution.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &ds, const word &patchFieldType=PatchField< Type >::calculatedType())
Return tmp field from name, mesh, dimensions and patch type.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
const Internal & v() const
Return a const-reference to the dimensioned internal field of a "vol" field.
void storeOldTimes() const
Store the old-time fields.
Generic templated field type.
A class for handling words, derived from Foam::string.
void min(const dimensioned< Type > &dt)
Use the minimum of the field and specified value.
void storeOldTime() const
Store the old-time field.
void operator*=(const GeometricField< scalar, PatchField, GeoMesh > &)
void maxMin(const dimensioned< Type > &minVal, const dimensioned< Type > &maxVal)
Deprecated(2019-01) identical to clip()
void operator+=(const GeometricField< Type, PatchField, GeoMesh > &)
void writeMinMax(Ostream &os) const
Helper function to write the min and max to an Ostream.
GeoMesh::Mesh Mesh
Type of mesh on which this DimensionedField is instantiated.
void negate()
Negate the field inplace. See notes in Field.
const Mesh & mesh() const noexcept
Return mesh.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Internal & internalFieldRef(const bool updateAccessTime=true)
Return a reference to the dimensioned internal field.
tmp< GeometricField< Type, PatchField, GeoMesh > > T() const
Return transpose (only if it is a tensor field)
void operator-=(const GeometricField< Type, PatchField, GeoMesh > &)
void normalise()
Normalise the field inplace. See notes in Field.
const GeometricField< Type, PatchField, GeoMesh > & prevIter() const
Return previous iteration field.
OBJstream os(runTime.globalPath()/outputName)
virtual ~GeometricField()
Destructor.
Generic GeometricBoundaryField class.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
static const GeometricField< Type, PatchField, GeoMesh > & null()
Return a null geometric field.
List< word > wordList
A List of words.
void operator==(const tmp< GeometricField< Type, PatchField, GeoMesh >> &)
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
tmp< GeometricField< Type, PatchField, GeoMesh > > clone() const
Clone.
label timeIndex() const noexcept
Return the time index of the field.
PatchField< Type > Patch
The patch field type for the GeometricBoundaryField.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
friend Ostream & operator(Ostream &, const GeometricField< Type, PatchField, GeoMesh > &)
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
void correctBoundaryConditions()
Correct boundary field.
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef()
void storePrevIter() const
Store the field as the previous iteration value.
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
A class for managing temporary objects.
void max(const dimensioned< Type > &dt)
Use the maximum of the field and specified value.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Defines the attributes of an object for which implicit objectRegistry management is supported...
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
void relax()
Relax field (for steady-state solution).
void replace(const direction d, const GeometricField< cmptType, PatchField, GeoMesh > &gcf)
Replace specified field component with content from another field.