introvoyz042's picture
Migrated from GitHub
5a600cf verified
Raw History Blame Contribute Delete
32.4 kB
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2026 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::GeometricField
Description
Generic GeometricField class.
SourceFiles
GeometricFieldI.H
GeometricField.C
GeometricFieldExpression.H
\*---------------------------------------------------------------------------*/
#ifndef GeometricField_H
#define GeometricField_H
#include "GeometricFieldFwd.H"
#include "GeometricBoundaryField.H"
#include "GeometricFieldSources.H"
#include "expressionExpressionable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class dictionary;
/*---------------------------------------------------------------------------*\
Class GeometricField Declaration
\*---------------------------------------------------------------------------*/
template<class Type, class GeoMesh, template<class> class PrimitiveField>
class GeometricField
:
public DimensionedField<Type, GeoMesh, PrimitiveField>,
public OldTimeField<GeometricField<Type, GeoMesh, PrimitiveField>>
{
public:
// Public Types
//- Value type
using Type_ = Type;
//- Geometric mesh type
using GeoMesh_ = GeoMesh;
//- Base mesh type from which GeoMesh is constructed
using Mesh = typename GeoMesh::Mesh;
//- Type of the internal field from which this GeometricField is derived
using Internal = DimensionedField<Type, GeoMesh, PrimitiveField>;
//- Type of the field from which this GeometricField is derived
using Base = DimensionedField<Type, GeoMesh, PrimitiveField>;
//- Type of the patch field of which the Boundary is composed
using PatchField = typename GeoMesh::template PatchField<Type>;
//- Type of the boundary field
using BoundaryField = PtrField<PatchField>;
//- Type of the boundary field
using Boundary = GeometricBoundaryField<Type, GeoMesh, PrimitiveField>;
//- Type of the field source of which the Sources is composed
using Source = typename GeoMesh::template FieldSource<Type>;
//- Type of the field sources
using Sources = GeometricFieldSources<Type, GeoMesh, PrimitiveField>;
//- Component type of the elements of the field
using cmptType = typename PrimitiveField<Type>::cmptType;
private:
// Private Data
//- Pointer to previous iteration (used for under-relaxation)
mutable GeometricField<Type, GeoMesh, Field>* fieldPrevIterPtr_;
//- Boundary Type field containing boundary field values
Boundary boundaryField_;
//- Type field sources containing field source values
Sources sources_;
// Private Member Functions
//- Read the field from the dictionary
void readFields(const dictionary&);
//- Read the field - create the field dictionary on-the-fly
void readFields();
//- Read from file if it is present
bool readIfPresent();
//- Constructor given IOobject, mesh, dimensions and patch field types.
// This allocates storage for the field but not values
GeometricField
(
const IOobject&,
const GeoMesh&,
const dimensionSet&,
const wordList& wantedPatchTypes,
const wordList& actualPatchTypes = wordList(),
const HashTable<word>& fieldSourceTypes = HashTable<word>(),
const IOerrorLocation& fieldSourceErrorLocation = IOerrorLocation()
);
public:
//- Runtime type information
TypeName("GeometricField");
//- Declare friendship with other geometric fields
template<class Type2, class GeoMesh2, template<class> class PrimitiveField2>
friend class GeometricField;
// Static Member Functions
//- Return a null geometric field
inline static const
GeometricField<Type, GeoMesh, PrimitiveField>& null();
// Constructors
//- Constructor given IOobject, mesh, dimensions and patch field type.
// Warning: this allocates storage but does not set field values!
GeometricField
(
const IOobject&,
const GeoMesh&,
const dimensionSet&,
const word& patchFieldType
);
//- Constructor given IOobject, mesh, dimensioned<Type>
// and optional patch field type.
GeometricField
(
const IOobject&,
const GeoMesh&,
const dimensioned<Type>&,
const word& patchFieldType = PatchField::calculatedType()
);
//- Constructor given IOobject, mesh, dimensioned<Type>
// and patch field types.
GeometricField
(
const IOobject&,
const GeoMesh&,
const dimensioned<Type>&,
const wordList& wantedPatchTypes,
const wordList& actualPatchTypes = wordList(),
const HashTable<word>& fieldSourceTypes = HashTable<word>(),
const IOerrorLocation& fieldSourceErrorLocation = IOerrorLocation()
);
//- Constructor from components
GeometricField
(
const IOobject&,
const Internal&,
const PtrField<PatchField>&,
const HashPtrTable<Source>& = HashPtrTable<Source>()
);
//- Constructor from component expressions
template
<
class InternalExpression,
class BoundaryExpression,
class = EnableIfExpressionable<InternalExpression>
>
GeometricField
(
const IOobject&,
const InternalExpression&,
const BoundaryExpression&,
const HashPtrTable<Source>& = HashPtrTable<Source>()
);
//- Constructor from components
GeometricField
(
const IOobject&,
const GeoMesh&,
const dimensionSet&,
const PrimitiveField<Type>&,
const PtrField<PatchField>&,
const HashPtrTable<Source>& = HashPtrTable<Source>()
);
//- Constructor from component expressions
template
<
class InternalExpression,
class BoundaryExpression,
class = EnableIfExpressionable<InternalExpression>
>
GeometricField
(
const IOobject&,
const GeoMesh&,
const dimensionSet&,
const InternalExpression&,
const BoundaryExpression&,
const HashPtrTable<Source>& = HashPtrTable<Source>()
);
//- Construct and read given IOobject
GeometricField
(
const IOobject&,
const GeoMesh&,
const dimensionSet& dims = dimensions::invalid
);
//- Construct from dictionary
GeometricField
(
const IOobject&,
const GeoMesh&,
const dictionary&,
const dimensionSet& dims = dimensions::invalid
);
//- Copy constructor
GeometricField(const GeometricField<Type, GeoMesh, PrimitiveField>&);
//- Copy constructor
template<template<class> class PrimitiveField2>
explicit GeometricField
(
const GeometricField<Type, GeoMesh, PrimitiveField2>&
);
//- Move constructor
GeometricField(GeometricField<Type, GeoMesh, PrimitiveField>&&);
//- Construct as copy of tmp
GeometricField
(
const tmp<GeometricField<Type, GeoMesh, PrimitiveField>>&
);
//- Construct from an expression
template<class Expression, class = EnableIfExpressionable<Expression>>
GeometricField(const Expression& e);
//- Construct as copy resetting IO parameters
template<template<class> class PrimitiveField2>
GeometricField
(
const IOobject&,
const GeometricField<Type, GeoMesh, PrimitiveField2>&
);
//- Construct as copy of tmp resetting IO parameters
GeometricField
(
const IOobject&,
const tmp<GeometricField<Type, GeoMesh, PrimitiveField>>&
);
//- Construct as copy resetting name
template<template<class> class PrimitiveField2>
GeometricField
(
const word& newName,
const GeometricField<Type, GeoMesh, PrimitiveField2>&
);
//- Construct as copy of tmp resetting name
GeometricField
(
const word& newName,
const tmp<GeometricField<Type, GeoMesh, PrimitiveField>>&
);
//- Construct as copy resetting IO parameters and patch field type
template<template<class> class PrimitiveField2>
GeometricField
(
const IOobject&,
const GeometricField<Type, GeoMesh, PrimitiveField2>&,
const word& patchFieldType
);
//- Construct as copy of tmp resetting IO parameters
// and patch field type
GeometricField
(
const IOobject&,
const tmp<GeometricField<Type, GeoMesh, PrimitiveField>>&,
const word& patchFieldType
);
//- Construct as copy of expression setting IO parameters
// and patch field type
template<class Expression, class = EnableIfExpressionable<Expression>>
GeometricField
(
const IOobject&,
const Expression& e,
const word& patchFieldType
);
//- Constructor from internal field and patch field type
template<template<class> class PrimitiveField2>
GeometricField
(
const IOobject&,
const DimensionedField<Type, GeoMesh, PrimitiveField2>&,
const word& patchFieldType
);
//- Constructor from temporary internal field and patch field type
GeometricField
(
const IOobject&,
const tmp<Internal>&,
const word& patchFieldType
);
//- Construct as copy resetting IO parameters and patch field types
template<template<class> class PrimitiveField2>
GeometricField
(
const IOobject&,
const GeometricField<Type, GeoMesh, PrimitiveField2>&,
const wordList& patchFieldTypes,
const wordList& actualPatchTypes = wordList(),
const HashTable<word>& fieldSourceTypes = HashTable<word>(),
const IOerrorLocation& fieldSourceErrorLocation = IOerrorLocation()
);
//- Construct as copy of tmp resetting IO parameters
// and patch field types
GeometricField
(
const IOobject&,
const tmp<GeometricField<Type, GeoMesh, PrimitiveField>>&,
const wordList& patchFieldTypes,
const wordList& actualPatchTypes = wordList(),
const HashTable<word>& fieldSourceTypes = HashTable<word>(),
const IOerrorLocation& fieldSourceErrorLocation = IOerrorLocation()
);
//- Construct as copy of tmp resetting IO parameters
// and patch field types
template <class Expression, class = EnableIfExpressionable<Expression>>
GeometricField
(
const IOobject&,
const Expression&,
const wordList& patchFieldTypes,
const wordList& actualPatchTypes = wordList(),
const HashTable<word>& fieldSourceTypes = HashTable<word>(),
const IOerrorLocation& fieldSourceErrorLocation = IOerrorLocation()
);
//- Construct from IOobject, internal field and patch field types
template<template<class> class PrimitiveField2>
GeometricField
(
const IOobject&,
const DimensionedField<Type, GeoMesh, PrimitiveField2>&,
const wordList& patchFieldTypes,
const wordList& actualPatchTypes = wordList(),
const HashTable<word>& fieldSourceTypes = HashTable<word>(),
const IOerrorLocation& fieldSourceErrorLocation = IOerrorLocation()
);
//- Construct from IOobject, tmp internal field and patch field types
GeometricField
(
const IOobject&,
const tmp<Internal>&,
const wordList& patchFieldTypes,
const wordList& actualPatchTypes = wordList(),
const HashTable<word>& fieldSourceTypes = HashTable<word>(),
const IOerrorLocation& fieldSourceErrorLocation = IOerrorLocation()
);
//- Clone
tmp<GeometricField<Type, GeoMesh, PrimitiveField>> clone() const;
//- Clone un-sliced
tmp<GeometricField<Type, GeoMesh, PrimitiveField>>
cloneUnSliced() const;
//- Return a temporary field constructed from name,
// internal field and list of patch fields
static tmp<GeometricField<Type, GeoMesh, PrimitiveField>> New
(
const word& name,
const Internal&,
const PtrField<PatchField>&,
const HashPtrTable<Source>& = HashPtrTable<Source>()
);
//- Return a temporary field constructed from name,
// internal field and list of patch fields
template
<
class InternalExpression,
class BoundaryExpression,
class = EnableIfExpressionable<InternalExpression>
>
static tmp<GeometricField<Type, GeoMesh, PrimitiveField>> New
(
const word& name,
const InternalExpression&,
const BoundaryExpression&,
const HashPtrTable<Source>& = HashPtrTable<Source>()
);
//- Return a temporary field constructed from name, mesh, dimensionSet
// and patch field type
static tmp<GeometricField<Type, GeoMesh, PrimitiveField>> New
(
const word& name,
const GeoMesh&,
const dimensionSet&,
const word& patchFieldType = PatchField::calculatedType()
);
//- Return a temporary field constructed from mesh, dimensioned<Type>
// and patch field type
static tmp<GeometricField<Type, GeoMesh, PrimitiveField>> New
(
const word& name,
const GeoMesh&,
const dimensioned<Type>&,
const word& patchFieldType = PatchField::calculatedType()
);
//- Return a temporary field constructed from mesh, dimensioned<Type>
// and patch field types
static tmp<GeometricField<Type, GeoMesh, PrimitiveField>> New
(
const word& name,
const GeoMesh&,
const dimensioned<Type>&,
const wordList& patchFieldTypes,
const wordList& actualPatchTypes = wordList(),
const HashTable<word>& fieldSourceTypes = HashTable<word>(),
const IOerrorLocation& fieldSourceErrorLocation = IOerrorLocation()
);
//- Rename temporary field and return
static tmp<GeometricField<Type, GeoMesh, PrimitiveField>> New
(
const word& newName,
const tmp<GeometricField<Type, GeoMesh, PrimitiveField>>&
);
//- Rename field, reset patch field type and return
template<template<class> class PrimitiveField2>
static tmp<GeometricField<Type, GeoMesh, PrimitiveField>> New
(
const word& newName,
const GeometricField<Type, GeoMesh, PrimitiveField2>&,
const word& patchFieldType
);
//- Rename temporary field, reset patch field type and return
static tmp<GeometricField<Type, GeoMesh, PrimitiveField>> New
(
const word& newName,
const tmp<GeometricField<Type, GeoMesh, PrimitiveField>>&,
const word& patchFieldType
);
//- Return a temporary field constructed from name,
// internal field and patch field type
template<template<class> class PrimitiveField2>
static tmp<GeometricField<Type, GeoMesh, PrimitiveField>> New
(
const word& name,
const DimensionedField<Type, GeoMesh, PrimitiveField2>&,
const word& patchFieldType
);
//- Return a temporary field constructed from name,
// temporary internal field and patch field type
static tmp<GeometricField<Type, GeoMesh, PrimitiveField>> New
(
const word& name,
const tmp<Internal>&,
const word& patchFieldType
);
//- Return a temporary field constructed from name,
// internal field expression and patch field type
template<class Expression, class = EnableIfExpression<Expression>>
static tmp<GeometricField<Type, GeoMesh, PrimitiveField>> New
(
const word& name,
const Expression& e,
const word& patchFieldType
);
//- Rename and reset patch fields types of field and return
template<template<class> class PrimitiveField2>
static tmp<GeometricField<Type, GeoMesh, PrimitiveField>> New
(
const word& newName,
const GeometricField<Type, GeoMesh, PrimitiveField2>&,
const wordList& patchFieldTypes,
const wordList& actualPatchTypes = wordList(),
const HashTable<word>& fieldSourceTypes = HashTable<word>(),
const IOerrorLocation& fieldSourceErrorLocation = IOerrorLocation()
);
//- Rename and reset patch fields types of temporary field and return
static tmp<GeometricField<Type, GeoMesh, PrimitiveField>> New
(
const word& newName,
const tmp<GeometricField<Type, GeoMesh, PrimitiveField>>&,
const wordList& patchFieldTypes,
const wordList& actualPatchTypes = wordList(),
const HashTable<word>& fieldSourceTypes = HashTable<word>(),
const IOerrorLocation& fieldSourceErrorLocation = IOerrorLocation()
);
//- Return a temporary field constructed from IOobject,
// internal field and patch field types
template<template<class> class PrimitiveField2>
static tmp<GeometricField<Type, GeoMesh, PrimitiveField>> New
(
const word& newName,
const DimensionedField<Type, GeoMesh, PrimitiveField2>&,
const wordList& patchFieldTypes,
const wordList& actualPatchTypes = wordList(),
const HashTable<word>& fieldSourceTypes = HashTable<word>(),
const IOerrorLocation& fieldSourceErrorLocation = IOerrorLocation()
);
//- Return a temporary field constructed from IOobject,
// temporary internal field and patch field types
static tmp<GeometricField<Type, GeoMesh, PrimitiveField>> New
(
const word& newName,
const tmp<Internal>&,
const wordList& patchFieldTypes,
const wordList& actualPatchTypes = wordList(),
const HashTable<word>& fieldSourceTypes = HashTable<word>(),
const IOerrorLocation& fieldSourceErrorLocation = IOerrorLocation()
);
//- Destructor
virtual ~GeometricField();
// Member Functions
//- Return a reference to the dimensioned internal field
// Note: this increments the event counter and checks the
// old-time fields; avoid in loops.
Internal& internalFieldRef();
//- Return a const-reference to the dimensioned internal field
inline const Internal& internalField() const;
//- Return a reference to the primitive field
// Note: this increments the event counter and checks the
// old-time fields; avoid in loops.
typename Internal::FieldType& primitiveFieldRef();
//- Return a const-reference to the primitive field
inline const typename Internal::FieldType& primitiveField() const;
//- Return a reference to the boundary field
// Note: this increments the event counter and checks the
// old-time fields; avoid in loops.
Boundary& boundaryRef();
//- Return a reference to the boundary field without storing old times
// Note: this increments the event counter; avoid in loops.
Boundary& boundaryRefNoStoreOldTimes();
//- Return const-reference to the boundary field
inline const Boundary& boundary() const;
//- Return a reference to the boundary field
// Note: this increments the event counter and checks the
// old-time fields; avoid in loops.
BoundaryField& boundaryFieldRef();
//- Return a reference to the boundary field without storing old times
// Note: this increments the event counter; avoid in loops.
BoundaryField& boundaryFieldRefNoStoreOldTimes();
//- Return const-reference to the boundary field
inline const BoundaryField& boundaryField() const;
//- Return a reference to the sources
// Note: this increments the event counter and checks the
// old-time fields; avoid in loops.
Sources& sourcesRef();
//- Return const-reference to the sources
inline const Sources& sources() const;
//- Store the field as the previous iteration value
void storePrevIter() const;
//- Delete the previous iteration field
void clearPrevIter();
//- Return previous iteration field
const GeometricField<Type, GeoMesh, Field>& prevIter() const;
//- Use old-time methods from the base class
USING_OLD_TIME_FIELD(GeometricField);
//- Correct boundary field
void correctBoundaryConditions();
//- Reset the field contents to the given field
// Used for mesh to mesh mapping
template<template<class> class PrimitiveField2>
void reset(const GeometricField<Type, GeoMesh, PrimitiveField2>&);
//- Reset the field contents to the given tmp-field
// Used for mesh to mesh mapping
void reset(const tmp<GeometricField<Type, GeoMesh, PrimitiveField>>&);
//- Reset the field contents to the given tmp-field
// Used for mesh to mesh mapping
template<template<class> class PrimitiveField2>
void reset(const tmp<GeometricField<Type, GeoMesh, PrimitiveField2>>&);
//- Does the field need a reference level for solution
bool needReference() const;
//- Return a component field expression of the field
inline auto component(const direction&) const;
//- WriteData member function required by regIOobject
bool writeData(Ostream&) const;
//- Return transpose field expression
// (only if it is a tensor field)
inline auto T() const;
//- Relax field (for steady-state solution).
// alpha >= 1 : no relaxation
// alpha < 1 : relaxation
void relax(const scalar alpha);
//- Return the field relaxation factor read from fvSolution
// or 1 if not specified
scalar relaxationFactor() const;
//- Relax current field with respect to the cached previous iteration.
// Relaxation factor is read from fvSolution
void relax();
//- Relax given field with respect to the current field
// and reset the field to the result
template<template<class> class PrimitiveField2>
void relax
(
const tmp<GeometricField<Type, GeoMesh, PrimitiveField2>>&,
const scalar alpha
);
//- Relax given field with respect to the current field
// and reset the field to the result
// Relaxation factor is read from fvSolution
template<template<class> class PrimitiveField2>
void relax(const tmp<GeometricField<Type, GeoMesh, PrimitiveField2>>&);
//- Select the final iteration parameters if `final' is true
// by returning the field name + "Final"
// otherwise the standard parameters by returning the field name
word select(bool final) const;
//- Helper function to write the min and max to an Ostream
void writeMinMax(Ostream& os) const;
// Member function *this operators
void negate();
//- Replace a component field of the field
template<template<class> class PrimitiveField2>
void replace
(
const direction,
const GeometricField<cmptType, GeoMesh, PrimitiveField2>&
);
//- Replace a component field of the field
template<template<class> class PrimitiveField2>
void replace
(
const direction,
const tmp<GeometricField<cmptType, GeoMesh, PrimitiveField2>>&
);
//- Replace a component field of the field from the given expression
template<class Expression, class = EnableIfExpression<Expression>>
void replace(const direction, const Expression&);
//- Replace a component field of the field
void replace(const direction, const dimensioned<cmptType>&);
//- Bound the field to the given lower bound
void boundLower(const dimensioned<Type>& lower);
//- Bound the field to the given upper bound
void boundUpper(const dimensioned<Type>& upper);
//- Bound the field within the given lower and upper bounds
void bound
(
const dimensioned<Type>& lower,
const dimensioned<Type>& upper
);
// Member Operators
//- Return a const-reference to the dimensioned internal field
// Useful in the formulation of source-terms for FV equations
inline const Internal& operator()() const;
void operator=(const GeometricField<Type, GeoMesh, PrimitiveField>&);
void operator=(GeometricField<Type, GeoMesh, PrimitiveField>&&);
template<template<class> class PrimitiveField2>
void operator=(const GeometricField<Type, GeoMesh, PrimitiveField2>&);
void operator=
(
const tmp<GeometricField<Type, GeoMesh, PrimitiveField>>&
);
//- Assign to an expression
template<class Expression, class = EnableIfExpressionable<Expression>>
void operator=(const Expression& e);
template<template<class> class PrimitiveField2>
void operator=
(
const tmp<GeometricField<Type, GeoMesh, PrimitiveField2>>&
);
void operator=(const dimensioned<Type>&);
void operator=(const zero&);
template<template<class> class PrimitiveField2>
void operator==(const GeometricField<Type, GeoMesh, PrimitiveField2>&);
void operator==
(
const tmp<GeometricField<Type, GeoMesh, PrimitiveField>>&
);
template<template<class> class PrimitiveField2>
void operator==
(
const tmp<GeometricField<Type, GeoMesh, PrimitiveField2>>&
);
//- Assign to an expression
template<class Expression, class = EnableIfExpressionable<Expression>>
void operator==(const Expression& e);
void operator==(const dimensioned<Type>&);
void operator==(const zero&);
template<template<class> class PrimitiveField2>
void operator+=
(
const GeometricField<Type, GeoMesh, PrimitiveField2>&
);
template<template<class> class PrimitiveField2>
void operator+=
(
const tmp<GeometricField<Type, GeoMesh, PrimitiveField2>>&
);
//- Assign-add to an expression
template<class Expression, class = EnableIfExpressionable<Expression>>
void operator+=(const Expression& e);
void operator+=(const dimensioned<Type>&);
template<template<class> class PrimitiveField2>
void operator-=
(
const GeometricField<Type, GeoMesh, PrimitiveField2>&
);
template<template<class> class PrimitiveField2>
void operator-=
(
const tmp<GeometricField<Type, GeoMesh, PrimitiveField2>>&
);
//- Assign-subtract to an expression
template<class Expression, class = EnableIfExpressionable<Expression>>
void operator-=(const Expression& e);
void operator-=(const dimensioned<Type>&);
template<template<class> class PrimitiveField2>
void operator*=
(
const GeometricField<scalar, GeoMesh, PrimitiveField2>&
);
template<template<class> class PrimitiveField2>
void operator*=
(
const tmp<GeometricField<scalar, GeoMesh, PrimitiveField2>>&
);
//- Assign-multiply to an expression
template<class Expression, class = EnableIfExpressionable<Expression>>
void operator*=(const Expression& e);
void operator*=(const dimensioned<scalar>&);
template<template<class> class PrimitiveField2>
void operator/=
(
const GeometricField<scalar, GeoMesh, PrimitiveField2>&
);
template<template<class> class PrimitiveField2>
void operator/=
(
const tmp<GeometricField<scalar, GeoMesh, PrimitiveField2>>&
);
//- Assign-divide to an expression
template<class Expression, class = EnableIfExpressionable<Expression>>
void operator/=(const Expression& e);
void operator/=(const dimensioned<scalar>&);
};
template<class Type, class GeoMesh, template<class> class PrimitiveField>
Ostream& operator<<
(
Ostream&,
const GeometricField<Type, GeoMesh, PrimitiveField>&
);
template<class Type, class GeoMesh, template<class> class PrimitiveField>
bool reusable(const tmp<GeometricField<Type, GeoMesh, PrimitiveField>>& tgf);
template<class TypeR, class GeoMesh>
tmp<GeometricField<TypeR, GeoMesh, Field>> New
(
const tmp<GeometricField<TypeR, GeoMesh, Field>>& tgf1,
const word& name,
const dimensionSet& dimensions,
const bool initRet = false
);
template<class Type, class GeoMesh, template<class> class PrimitiveField>
struct OldTimeFieldCopy<GeometricField<Type, GeoMesh, PrimitiveField>>
{
using FieldType = GeometricField<Type, GeoMesh, PrimitiveField>;
using Field0Type = typename OldTimeField0Type<FieldType>::type;
using Calculated = typename FieldType::PatchField::Calculated;
tmp<Field0Type> operator()(const IOobject& io, const FieldType& field)
{
return tmp<Field0Type>(new Field0Type(io, field, Calculated::typeName));
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "GeometricFieldI.H"
#include "GeometricFieldExpression.H"
#ifdef NoRepository
#include "GeometricField.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //