48 #ifndef Foam_fvPatchField_H
49 #define Foam_fvPatchField_H
64 class fvPatchFieldMapper;
93 bool manipulatedMatrix_;
224 return !patchType_.empty() && patchType_ !=
type();
245 return manipulatedMatrix_;
251 manipulatedMatrix_ = state;
264 bool old(useImplicit_);
365 (
dynamic_cast<const fvPatchFieldType&
>(ptf),
p, iF, m)
493 template<
class DerivedPatchField,
class... Args>
494 static tmp<fvPatchField<Type>>
Clone
496 const DerivedPatchField& pf,
500 return tmp<fvPatchField<Type>>
502 new DerivedPatchField(pf, std::forward<Args>(
args)...)
509 static tmp<fvPatchField<Type>>
New
511 const word& patchFieldType,
513 const DimensionedField<Type, volMesh>&
520 static tmp<fvPatchField<Type>>
New
522 const word& patchFieldType,
523 const word& actualPatchType,
525 const DimensionedField<Type, volMesh>&
530 static tmp<fvPatchField<Type>>
New
532 const fvPatchField<Type>&,
556 template<
class AnyType>
574 return internalField_;
580 return internalField_;
676 const tmp<Field<scalar>>&
741 fvMatrix<Type>& matrix,
748 fvMatrix<Type>& matrix,
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type.
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
readOption
Enumeration defining read preferences.
@ MUST_READ
Reading required.
@ LAZY_READ
Reading is optional [identical to READ_IF_PRESENT].
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
commsTypes
Communications types.
@ buffered
"buffered" : (MPI_Bsend, MPI_Recv)
This boundary condition is not designed to be evaluated; it is assumed that the value is assigned via...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Template invariant parts for fvPatchField.
fvPatchFieldBase(const fvPatch &p)
Construct from patch.
virtual ~fvPatchFieldBase()=default
Destructor.
virtual bool fixesValue() const
True if the patch field fixes a value.
void checkPatch(const fvPatchFieldBase &rhs) const
Check that patches are identical.
virtual bool coupled() const
True if the patch field is coupled.
const fvPatch & patch() const noexcept
Return the patch.
const objectRegistry & db() const
The associated objectRegistry.
static const word & calculatedType() noexcept
The type name for calculated patch fields.
virtual void readDict(const dictionary &dict)
Read dictionary entries.
static const word & emptyType() noexcept
The type name for empty patch fields.
void setManipulated(bool state) noexcept
Set matrix manipulated state.
bool useImplicit() const noexcept
Use implicit formulation for coupled patches only.
void setUpdated(bool state) noexcept
Set updated state.
static int disallowGenericPatchField
Debug switch to disallow the use of generic fvPatchField.
TypeName("fvPatchField")
Runtime type information.
const word & patchType() const noexcept
The optional patch type.
static const word & extrapolatedCalculatedType() noexcept
The type name for extrapolatedCalculated patch fields combines zero-gradient and calculated.
bool manipulatedMatrix() const noexcept
True if the matrix has already been manipulated.
virtual bool constraintOverride() const
True if the type does not correspond to the constraint type.
virtual bool assignable() const
True if the value of the patch field is altered by assignment.
bool updated() const noexcept
True if the boundary condition has already been updated.
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
A FieldMapper for finite-volume patch fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
DimensionedField< Type, volMesh > Internal
The internal field type associated with the patch field.
static tmp< fvPatchField< Type > > New(const word &patchFieldType, const fvPatch &, const DimensionedField< Type, volMesh > &)
Return a pointer to a new patchField created on freestore given.
virtual void write(Ostream &) const
Write.
Type value_type
The value_type for the patch field.
virtual void initEvaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Initialise the evaluation of the patch field.
virtual void operator==(const fvPatchField< Type > &)
const DimensionedField< Type, volMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
declareRunTimeSelectionTable(tmp, fvPatchField, patch,(const fvPatch &p, const DimensionedField< Type, volMesh > &iF),(p, iF))
virtual tmp< fvPatchField< Type > > clone() const
Clone patch field with its own internal field reference.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch.
fvPatch Patch
The patch type for the patch field.
virtual tmp< Field< Type > > patchNeighbourField() const
Return patchField on the opposite patch of a coupled patch.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
static tmp< fvPatchField< Type > > NewCalculatedType(const fvPatch &p)
Return a pointer to a new calculatedFvPatchField created on.
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< Field< scalar >> &) const
Return the matrix source coefficients corresponding to the.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
const Field< Type > & primitiveField() const noexcept
Return const-reference to the internal field values.
virtual void initEvaluateLocal(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Initialise the evaluation of the patch field after a local.
virtual void operator-=(const fvPatchField< Type > &)
virtual void evaluateLocal(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field after a local operation (e.g. *=)
virtual void operator=(const UList< Type > &)
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
pTraits< Type >::cmptType cmptType
The component type for patch field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual ~fvPatchField()=default
Destructor.
calculatedFvPatchField< Type > Calculated
Type for a calculated patch.
virtual void manipulateMatrix(fvMatrix< Type > &matrix)
Manipulate matrix.
virtual void operator*=(const fvPatchField< scalar > &)
bool operator!=(const fvPatchField< Type > &) const =delete
virtual void operator+=(const fvPatchField< Type > &)
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
virtual void updateWeightedCoeffs(const scalarField &weights)
Update the coefficients associated with the patch field.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
bool readValueEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "value" entry into *this.
void extrapolateInternal()
Assign the patch field from the internal field.
virtual void operator/=(const fvPatchField< scalar > &)
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< Field< scalar >> &) const
Return the matrix diagonal coefficients corresponding to the.
void check(const fvPatchField< Type > &) const
Check against given patch field.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field, sets updated() to false.
fvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Registry of regIOobjects.
A traits class, which is primarily used for primitives and vector-space.
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)
Macros for creating fvPatchField types.
const word zeroGradientType
A zeroGradient patch field type.
const word extrapolatedCalculatedType
A combined zero-gradient and calculated patch field type.
const word calculatedType
A calculated patch field type.
const word emptyType
An empty patch field type.
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.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Foam::argList args(argc, argv)