33 #ifndef createZeroField_H 34 #define createZeroField_H 48 bool printAllocation =
false 76 autoPtr<typename GeometricField<Type, fvPatchField, volMesh>::Boundary>
80 bool printAllocation =
false 85 Info<<
"Allocating new boundaryField " <<
nl <<
endl;
97 forAll(actualPatchTypes, pI)
99 auto patchTypeCstrIter =
100 fvPatchField<Type>::patchConstructorTablePtr_->cfind(bm[pI].
type());
101 if (patchTypeCstrIter.good())
103 actualPatchTypes[pI] = bm[pI].type();
107 autoPtr<Boundary> bPtr
112 mesh.
V()*pTraits<Type>::zero,
119 Boundary& bRef = bPtr();
122 bRef[pI] = pTraits<Type>::zero;
130 autoPtr<List<Field<Type>>>
134 bool printAllocation =
false 139 Info<<
"Allocating new point boundaryField " <<
nl <<
endl;
142 autoPtr<List<Field<Type>>> bPtr
144 new List<Field<Type>>
150 List<Field<Type>>& bRef = bPtr();
autoPtr< List< Field< Type > > > createZeroBoundaryPointFieldPtr(const fvMesh &mesh, bool printAllocation=false)
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
Generic GeometricField class.
GeometricBoundaryField< Type, PatchField, GeoMesh > Boundary
Type of boundary fields.
Generic dimensioned Type class.
Ignore writing from objectRegistry::writeObject()
const Time & time() const
Return the top-level database.
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
#define forAll(list, i)
Loop across all elements in list.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
autoPtr< typename GeometricField< Type, fvPatchField, volMesh >::Boundary > createZeroBoundaryPtr(const fvMesh &mesh, bool printAllocation=false)
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
label size() const noexcept
The number of entries in the list.
static const word null
An empty word.
autoPtr< GeometricField< Type, fvPatchField, volMesh > > createZeroFieldPtr(const fvMesh &mesh, const word &name, const dimensionSet dims, bool printAllocation=false)
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
List< word > wordList
List of word.
Mesh data needed to do the Finite Volume discretisation.
static const word & calculatedType() noexcept
The type name for calculated patch fields.
messageStream Info
Information stream (stdout output on master, null elsewhere)
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Defines the attributes of an object for which implicit objectRegistry management is supported...
static constexpr const zero Zero
Global zero (0)