diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/fixedValue/fixedValuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/fixedValue/fixedValuePointPatchField.H index c325c85529..e8f269edbb 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/fixedValue/fixedValuePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/fixedValue/fixedValuePointPatchField.H @@ -30,6 +30,8 @@ Class Description A FixedValue boundary condition for pointField. + The "value" entry is normally MUST_READ. + SourceFiles fixedValuePointPatchField.C @@ -92,13 +94,13 @@ public: const pointPatch& p, const DimensionedField& iF, const dictionary& dict, - const bool valueReqd + const bool needValue ) : fixedValuePointPatchField ( p, iF, dict, - (valueReqd? IOobjectOption::MUST_READ : IOobjectOption::NO_READ) + (needValue? IOobjectOption::MUST_READ : IOobjectOption::NO_READ) ) {} diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H index 377be79930..a4f7c2b205 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H @@ -123,13 +123,13 @@ public: const pointPatch& p, const DimensionedField& iF, const dictionary& dict, - const bool valueReqd + const bool needValue ) : valuePointPatchField ( p, iF, dict, - (valueReqd? IOobjectOption::MUST_READ : IOobjectOption::NO_READ) + (needValue? IOobjectOption::MUST_READ : IOobjectOption::NO_READ) ) {} diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C index da66b10349..46336accf7 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C @@ -54,10 +54,10 @@ Foam::porousBafflePressureFvPatchField::porousBafflePressureFvPatchField const fvPatch& p, const DimensionedField& iF, const dictionary& dict, - const bool valueRequired + const bool needValue ) : - fixedJumpFvPatchField(p, iF, dict, false), + fixedJumpFvPatchField(p, iF, dict, false), // needValue = false phiName_(dict.getOrDefault("phi", "phi")), rhoName_(dict.getOrDefault("rho", "rho")), D_(Function1::New("D", dict, &db())), @@ -65,7 +65,7 @@ Foam::porousBafflePressureFvPatchField::porousBafflePressureFvPatchField length_(dict.get("length")), uniformJump_(dict.getOrDefault("uniformJump", false)) { - if (valueRequired) + if (needValue) { if (!this->readValueEntry(dict)) { diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H index e99ee74e9a..ad9c2c60cd 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H @@ -163,7 +163,7 @@ public: const fvPatch&, const DimensionedField&, const dictionary&, - const bool valueRequired = true + const bool needValue = true ); //- Construct by mapping given porousBafflePressureFvPatchField diff --git a/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.H index dcee956514..3d31ef2ebe 100644 --- a/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.H @@ -95,7 +95,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- Not implemented slicedFaPatchField ( const faPatch&, @@ -103,8 +104,8 @@ public: const dictionary& ); - //- Construct by mapping the given sliced patch field - //- onto a new patch + //- Construct by mapping the given patch field onto a new patch. + //- Not implemented slicedFaPatchField ( const slicedFaPatchField&, diff --git a/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.C b/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.C index b7cc020fe8..daeae4a111 100644 --- a/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.C +++ b/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.C @@ -38,7 +38,7 @@ Foam::emptyFaPatchField::emptyFaPatchField const DimensionedField& iF ) : - faPatchField(p, iF, Field()) + faPatchField(p, iF, Field()) // zero-sized patch field {} @@ -51,7 +51,7 @@ Foam::emptyFaPatchField::emptyFaPatchField const faPatchFieldMapper& ) : - faPatchField(p, iF, Field()) + faPatchField(p, iF, Field()) // zero-sized patch field { if (!isType(p)) { @@ -74,8 +74,11 @@ Foam::emptyFaPatchField::emptyFaPatchField const dictionary& dict ) : - faPatchField(p, iF, Field()) + faPatchField(p, iF, Field()) // zero-sized patch field { + // Empty means empty, so no patchType override + // with faPatchFieldBase::readDict(dict); + if (!isA(p)) { FatalIOErrorInFunction(dict) @@ -92,21 +95,21 @@ Foam::emptyFaPatchField::emptyFaPatchField template Foam::emptyFaPatchField::emptyFaPatchField ( - const emptyFaPatchField& ptf + const emptyFaPatchField& ptf, + const DimensionedField& iF ) : - faPatchField(ptf.patch(), ptf.internalField(), Field()) + faPatchField(ptf.patch(), iF, Field()) // zero-sized {} template Foam::emptyFaPatchField::emptyFaPatchField ( - const emptyFaPatchField& ptf, - const DimensionedField& iF + const emptyFaPatchField& ptf ) : - faPatchField(ptf.patch(), iF, Field()) + emptyFaPatchField(ptf, ptf.internalField()) {} diff --git a/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.H index de754592be..ef6b2d9e36 100644 --- a/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.H @@ -38,8 +38,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef emptyFaPatchField_H -#define emptyFaPatchField_H +#ifndef Foam_emptyFaPatchField_H +#define Foam_emptyFaPatchField_H #include "faPatchField.H" #include "emptyFaPatch.H" @@ -74,7 +74,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is NO_READ. emptyFaPatchField ( const faPatch&, diff --git a/src/finiteArea/fields/faPatchFields/derived/clampedPlate/clampedPlateFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/clampedPlate/clampedPlateFaPatchField.H index 4cb191c158..ca38463e02 100644 --- a/src/finiteArea/fields/faPatchFields/derived/clampedPlate/clampedPlateFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/clampedPlate/clampedPlateFaPatchField.H @@ -183,7 +183,7 @@ public: // IO - //- Write + //- Write includes "value" entry virtual void write(Ostream&) const; }; diff --git a/src/finiteArea/fields/faPatchFields/derived/edgeNormalFixedValue/edgeNormalFixedValueFaPatchVectorField.H b/src/finiteArea/fields/faPatchFields/derived/edgeNormalFixedValue/edgeNormalFixedValueFaPatchVectorField.H index 8a6c8dffb9..8c01ccf621 100644 --- a/src/finiteArea/fields/faPatchFields/derived/edgeNormalFixedValue/edgeNormalFixedValueFaPatchVectorField.H +++ b/src/finiteArea/fields/faPatchFields/derived/edgeNormalFixedValue/edgeNormalFixedValueFaPatchVectorField.H @@ -159,7 +159,7 @@ public: //- Update the coefficients associated with the patch field virtual void updateCoeffs(); - //- Write + //- Write includes "value" entry virtual void write(Ostream&) const; }; diff --git a/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchField.H index 80b1522c26..ef3eb57580 100644 --- a/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchField.H @@ -150,11 +150,11 @@ public: virtual tmp> gradientBoundaryCoeffs() const; - //- Write + //- Write includes "value" entry virtual void write(Ostream&) const; - // Member operators + // Member Operators virtual void operator=(const UList&) {} diff --git a/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.H index 02cb6831c7..0464beaa09 100644 --- a/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.H @@ -168,7 +168,7 @@ public: //- Update the coefficients associated with the patch field virtual void updateCoeffs(); - //- Write + //- Write includes "value" entry virtual void write(Ostream&) const; }; diff --git a/src/finiteArea/fields/faPatchFields/derived/outletInlet/outletInletFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/outletInlet/outletInletFaPatchField.H index e46a1d25b2..922f27e39b 100644 --- a/src/finiteArea/fields/faPatchFields/derived/outletInlet/outletInletFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/outletInlet/outletInletFaPatchField.H @@ -163,7 +163,7 @@ public: //- Update the coefficients associated with the patch field virtual void updateCoeffs(); - //- Write + //- Write includes "value" entry virtual void write(Ostream&) const; }; diff --git a/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchField.H index 1e56baf866..2dd84e81da 100644 --- a/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchField.H @@ -183,7 +183,7 @@ public: // IO - //- Write + //- Write includes "value" entry virtual void write(Ostream&) const; }; diff --git a/src/finiteArea/fields/faPatchFields/derived/uniformFixedGradient/uniformFixedGradientFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/uniformFixedGradient/uniformFixedGradientFaPatchField.H index 4c049d4f45..2490f1f622 100644 --- a/src/finiteArea/fields/faPatchFields/derived/uniformFixedGradient/uniformFixedGradientFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/uniformFixedGradient/uniformFixedGradientFaPatchField.H @@ -161,12 +161,12 @@ public: } - // Member functions + // Member Functions //- Update the coefficients associated with the patch field virtual void updateCoeffs(); - //- Write + //- Write includes "value" entry virtual void write(Ostream& os) const; }; diff --git a/src/finiteArea/fields/faPatchFields/derived/uniformFixedValue/uniformFixedValueFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/uniformFixedValue/uniformFixedValueFaPatchField.H index 3bb1027458..cc21bfa0b3 100644 --- a/src/finiteArea/fields/faPatchFields/derived/uniformFixedValue/uniformFixedValueFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/uniformFixedValue/uniformFixedValueFaPatchField.H @@ -167,7 +167,7 @@ public: //- Update the coefficients associated with the patch field virtual void updateCoeffs(); - //- Write + //- Write includes "value" entry virtual void write(Ostream& os) const; }; diff --git a/src/finiteArea/fields/faPatchFields/derived/uniformMixed/uniformMixedFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/uniformMixed/uniformMixedFaPatchField.H index ab3182b3a4..08d3a4a6b2 100644 --- a/src/finiteArea/fields/faPatchFields/derived/uniformMixed/uniformMixedFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/derived/uniformMixed/uniformMixedFaPatchField.H @@ -188,7 +188,7 @@ public: //- Update the coefficients associated with the patch field virtual void updateCoeffs(); - //- Write + //- Write includes "value" entry (for visualisation / restart) virtual void write(Ostream& os) const; }; diff --git a/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.C b/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.C index 3032a855ed..d77ef591d5 100644 --- a/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.C +++ b/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.C @@ -37,7 +37,7 @@ Foam::emptyFaePatchField::emptyFaePatchField const DimensionedField& iF ) : - faePatchField(p, iF, Field()) + faePatchField(p, iF, Field()) // zero-sized patch field {} @@ -50,7 +50,7 @@ Foam::emptyFaePatchField::emptyFaePatchField const faPatchFieldMapper& ) : - faePatchField(p, iF, Field()) + faePatchField(p, iF, Field()) // zero-sized patch field { if (!isType(this->patch())) { @@ -72,8 +72,11 @@ Foam::emptyFaePatchField::emptyFaePatchField const dictionary& dict ) : - faePatchField(p, iF, Field()) + faePatchField(p, iF, Field()) // zero-sized patch field { + // Empty means empty, so no patchType override + // with faePatchFieldBase::readDict(dict); + if (!isType(p)) { FatalIOErrorInFunction(dict) @@ -87,21 +90,21 @@ Foam::emptyFaePatchField::emptyFaePatchField template Foam::emptyFaePatchField::emptyFaePatchField ( - const emptyFaePatchField& ptf + const emptyFaePatchField& ptf, + const DimensionedField& iF ) : - faePatchField(ptf.patch(), ptf.internalField(), Field()) + faePatchField(ptf.patch(), iF, Field()) // zero-sized {} template Foam::emptyFaePatchField::emptyFaePatchField ( - const emptyFaePatchField& ptf, - const DimensionedField& iF + const emptyFaePatchField& ptf ) : - faePatchField(ptf.patch(), iF, Field()) + emptyFaePatchField(ptf, ptf.internalField()) {} diff --git a/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.H b/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.H index 6c7004db9f..3d9afcace4 100644 --- a/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.H +++ b/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.H @@ -73,7 +73,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is NO_READ. emptyFaePatchField ( const faPatch&, diff --git a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H index 33e2c8784e..9c9fabaf73 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H @@ -30,7 +30,8 @@ Group grpConstraintBoundaryConditions Description - A symmetry patch + A symmetry patch. + The "value" entry is NO_READ, NO_WRITE. SourceFiles basicSymmetryFvPatchField.C @@ -57,7 +58,6 @@ class basicSymmetryFvPatchField : public transformFvPatchField { - public: // Constructors @@ -69,7 +69,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is NO_READ. basicSymmetryFvPatchField ( const fvPatch&, @@ -77,8 +78,8 @@ public: const dictionary& ); - //- Construct by mapping given basicSymmetryFvPatchField onto a new - // patch + //- Construct by mapping given basicSymmetry patch field + //- onto a new patch basicSymmetryFvPatchField ( const basicSymmetryFvPatchField&, diff --git a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.H index ab2abde60d..1b44100ead 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.H @@ -31,11 +31,16 @@ Group grpGenericBoundaryConditions Description - This boundary condition is not designed to be evaluated; it is assmued + This boundary condition is not designed to be evaluated; it is assumed that the value is assigned via field assignment, and not via a call to e.g. \c updateCoeffs or \c evaluate. Usage + \table + Property | Description | Required | Default + value | field value | yes | + \endtable + Example of the boundary condition specification: \verbatim @@ -99,13 +104,13 @@ public: const fvPatch& p, const DimensionedField& iF, const dictionary& dict, - const bool valueReqd + const bool needValue ) : calculatedFvPatchField ( p, iF, dict, - (valueReqd? IOobjectOption::MUST_READ : IOobjectOption::NO_READ) + (needValue? IOobjectOption::MUST_READ : IOobjectOption::NO_READ) ) {} @@ -178,7 +183,7 @@ public: tmp> gradientBoundaryCoeffs() const; - //- Write + //- Write includes "value" entry virtual void write(Ostream&) const; }; diff --git a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H index 155a20cb7e..23ff2481f5 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H @@ -33,6 +33,8 @@ Group Description Abstract base class for coupled patches. + The "value" entry is usually MUST_READ and always WRITE. + SourceFiles coupledFvPatchField.C @@ -98,13 +100,13 @@ public: const fvPatch& p, const DimensionedField& iF, const dictionary& dict, - const bool valueReqd + const bool needValue ) : coupledFvPatchField ( p, iF, dict, - (valueReqd? IOobjectOption::MUST_READ : IOobjectOption::NO_READ) + (needValue? IOobjectOption::MUST_READ : IOobjectOption::NO_READ) ) {} @@ -144,8 +146,7 @@ public: // Access - //- Return true if this patch field is derived from - // coupledFvPatchField. + //- True if this patch field is derived from coupledFvPatchField. virtual bool coupled() const { return true; @@ -268,7 +269,7 @@ public: ) const = 0; - //- Write + //- Write includes "value" entry virtual void write(Ostream&) const; }; diff --git a/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.C index 8a567b7150..7ce790c829 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.C @@ -92,21 +92,21 @@ Foam::fixedValueFvPatchField::fixedValueFvPatchField template Foam::fixedValueFvPatchField::fixedValueFvPatchField ( - const fixedValueFvPatchField& ptf + const fixedValueFvPatchField& ptf, + const DimensionedField& iF ) : - fvPatchField(ptf) + fvPatchField(ptf, iF) {} template Foam::fixedValueFvPatchField::fixedValueFvPatchField ( - const fixedValueFvPatchField& ptf, - const DimensionedField& iF + const fixedValueFvPatchField& ptf ) : - fvPatchField(ptf, iF) + fixedValueFvPatchField(ptf, ptf.internalField()) {} diff --git a/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.H index 1abd1eb2b3..7c2fa1bcc8 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.H @@ -111,13 +111,13 @@ public: const fvPatch& p, const DimensionedField& iF, const dictionary& dict, - const bool valueReqd + const bool needValue ) : fixedValueFvPatchField ( p, iF, dict, - (valueReqd? IOobjectOption::MUST_READ : IOobjectOption::NO_READ) + (needValue? IOobjectOption::MUST_READ : IOobjectOption::NO_READ) ) {} @@ -168,6 +168,9 @@ public: //- False: this patch field is not altered by assignment. virtual bool assignable() const { return false; } + //- Write includes "value" entry + virtual void write(Ostream&) const; + // Evaluation functions @@ -194,11 +197,7 @@ public: virtual tmp> gradientBoundaryCoeffs() const; - //- Write - virtual void write(Ostream&) const; - - - // Member operators + // Member Operators virtual void operator=(const UList&) {} diff --git a/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.H index 0576d3ccce..9211155c71 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.H @@ -30,15 +30,16 @@ Group grpGenericBoundaryConditions Description - Foam::transformFvPatchField + Intermediate layer (not used directly as a user boundary condition). + The "value" entry is NO_READ, NO_WRITE. SourceFiles transformFvPatchField.C \*---------------------------------------------------------------------------*/ -#ifndef transformFvPatchField_H -#define transformFvPatchField_H +#ifndef Foam_transformFvPatchField_H +#define Foam_transformFvPatchField_H #include "fvPatchField.H" @@ -56,7 +57,6 @@ class transformFvPatchField : public fvPatchField { - public: //- Runtime type information @@ -72,7 +72,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is NO_READ. transformFvPatchField ( const fvPatch&, diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C index 487bdb8dff..7a70acb1e0 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C @@ -51,7 +51,7 @@ Foam::cyclicFvPatchField::cyclicFvPatchField const fvPatch& p, const DimensionedField& iF, const dictionary& dict, - const bool valueRequired + const bool needValue ) : coupledFvPatchField(p, iF, dict, IOobjectOption::NO_READ), @@ -68,7 +68,7 @@ Foam::cyclicFvPatchField::cyclicFvPatchField << exit(FatalIOError); } - if (valueRequired) + if (needValue) { this->evaluate(Pstream::commsTypes::blocking); } @@ -324,4 +324,5 @@ void Foam::cyclicFvPatchField::manipulateMatrix } } + // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H index 7b265ce604..b8199cb28e 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H @@ -34,6 +34,8 @@ Description This boundary condition enforces a cyclic condition between a pair of boundaries. + The "value" entry is NO_READ. + Usage Example of the boundary condition specification: \verbatim @@ -75,7 +77,7 @@ class cyclicFvPatchField virtual public cyclicLduInterfaceField, public coupledFvPatchField { - // Private data + // Private Data //- Local reference cast into the cyclic patch const cyclicFvPatch& cyclicPatch_; @@ -113,7 +115,7 @@ public: const fvPatch&, const DimensionedField&, const dictionary&, - const bool valueRequired = true + const bool needValue = true //!< evaluate ); //- Construct by mapping given cyclicFvPatchField onto a new patch @@ -154,7 +156,7 @@ public: } - // Member functions + // Member Functions // Access diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicSlip/cyclicSlipFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicSlip/cyclicSlipFvPatchField.C index 215d3655b8..051ef0b8f8 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicSlip/cyclicSlipFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicSlip/cyclicSlipFvPatchField.C @@ -61,7 +61,7 @@ Foam::cyclicSlipFvPatchField::cyclicSlipFvPatchField const dictionary& dict ) : - cyclicFvPatchField(p, iF, dict) + cyclicFvPatchField(p, iF, dict) // needValue (evaluate) = true {} diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicSlip/cyclicSlipFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicSlip/cyclicSlipFvPatchField.H index da0eb6fef0..3283b60e5e 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicSlip/cyclicSlipFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicSlip/cyclicSlipFvPatchField.H @@ -33,6 +33,8 @@ Description This boundary condition is a light wrapper around the cyclicFvPatchField condition, providing no new functionality. + The "value" entry is NO_READ. + Usage Example of the boundary condition specification: \verbatim @@ -50,8 +52,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef cyclicSlipFvPatchField_H -#define cyclicSlipFvPatchField_H +#ifndef Foam_cyclicSlipFvPatchField_H +#define Foam_cyclicSlipFvPatchField_H #include "cyclicFvPatchField.H" #include "cyclicSlipFvPatch.H" @@ -70,7 +72,6 @@ class cyclicSlipFvPatchField : public cyclicFvPatchField { - public: //- Runtime type information @@ -86,7 +87,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is NO_READ. cyclicSlipFvPatchField ( const fvPatch&, diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.C index 846c33a216..5bbc2ddd6f 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -37,7 +38,7 @@ Foam::emptyFvPatchField::emptyFvPatchField const DimensionedField& iF ) : - fvPatchField(p, iF, Field(0)) + fvPatchField(p, iF, Field()) // zero-sized patch field {} @@ -50,7 +51,7 @@ Foam::emptyFvPatchField::emptyFvPatchField const fvPatchFieldMapper& ) : - fvPatchField(p, iF, Field(0)) + fvPatchField(p, iF, Field()) // zero-sized patch field { if (!isType(p)) { @@ -73,8 +74,11 @@ Foam::emptyFvPatchField::emptyFvPatchField const dictionary& dict ) : - fvPatchField(p, iF, Field(0)) + fvPatchField(p, iF, Field()) // zero-sized patch field { + // Empty means empty, so no patchType override + // with fvPatchFieldBase::readDict(dict); + if (!isType(p)) { FatalIOErrorInFunction(dict) @@ -91,26 +95,21 @@ Foam::emptyFvPatchField::emptyFvPatchField template Foam::emptyFvPatchField::emptyFvPatchField ( - const emptyFvPatchField& ptf + const emptyFvPatchField& ptf, + const DimensionedField& iF ) : - fvPatchField - ( - ptf.patch(), - ptf.internalField(), - Field(0) - ) + fvPatchField(ptf.patch(), iF, Field()) // zero-sized {} template Foam::emptyFvPatchField::emptyFvPatchField ( - const emptyFvPatchField& ptf, - const DimensionedField& iF + const emptyFvPatchField& ptf ) : - fvPatchField(ptf.patch(), iF, Field(0)) + emptyFvPatchField(ptf, ptf.internalField()) {} diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.H index d86c9084cb..b22e96584c 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.H @@ -33,7 +33,9 @@ Description This boundary condition provides an 'empty' condition for reduced dimensions cases, i.e. 1- and 2-D geometries. Apply this condition to patches whose normal is aligned to geometric directions that do not - constitue solution directions. + constitute solution directions. + + The "value" entry is NO_READ, NO_WRITE. Usage Example of the boundary condition specification: @@ -84,7 +86,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is NO_READ. emptyFvPatchField ( const fvPatch&, diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C index 2b5e3a364b..fb9a97b348 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019-2021 OpenCFD Ltd. + Copyright (C) 2019-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -60,14 +60,11 @@ Foam::jumpCyclicFvPatchField::jumpCyclicFvPatchField const fvPatch& p, const DimensionedField& iF, const dictionary& dict, - const bool valueRequired + const bool needValue ) : - cyclicFvPatchField(p, iF, dict, valueRequired) -{ - // Call this evaluation in derived classes - //this->evaluate(Pstream::commsTypes::blocking); -} + cyclicFvPatchField(p, iF, dict, needValue) +{} template diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.H index 28c803b659..199215c628 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.H @@ -34,6 +34,8 @@ Description This boundary condition provides a base class for coupled-cyclic conditions with a specified 'jump' (or offset) between the values + The "value" entry is NO_READ. + See also Foam::cyclicFvPatchField @@ -42,8 +44,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef jumpCyclicFvPatchField_H -#define jumpCyclicFvPatchField_H +#ifndef Foam_jumpCyclicFvPatchField_H +#define Foam_jumpCyclicFvPatchField_H #include "cyclicFvPatchField.H" @@ -61,7 +63,6 @@ class jumpCyclicFvPatchField : public cyclicFvPatchField { - public: //- Runtime type information @@ -77,13 +78,14 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is NO_READ. jumpCyclicFvPatchField ( const fvPatch&, const DimensionedField&, const dictionary&, - const bool valueRequired = true + const bool needValue = true //!< evaluate ); //- Construct by mapping given jumpCyclicFvPatchField onto a new patch diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.C index f4ac86faf3..04cb2a9220 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.C @@ -50,7 +50,7 @@ nonuniformTransformCyclicFvPatchField const dictionary& dict ) : - cyclicFvPatchField(p, iF, dict) + cyclicFvPatchField(p, iF, dict) // needValue (evaluate) = true {} diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.H index 9f325feb1b..fa4b6f6701 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.H @@ -33,6 +33,8 @@ Description This boundary condition enforces a cyclic condition between a pair of boundaries, incorporating a non-uniform transformation. + The "value" entry is NO_READ. + SourceFiles nonuniformTransformCyclicFvPatchField.C nonuniformTransformCyclicFvPatchFields.H @@ -41,8 +43,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef nonuniformTransformCyclicFvPatchField_H -#define nonuniformTransformCyclicFvPatchField_H +#ifndef Foam_nonuniformTransformCyclicFvPatchField_H +#define Foam_nonuniformTransformCyclicFvPatchField_H #include "cyclicFvPatchField.H" #include "nonuniformTransformCyclicFvPatch.H" @@ -61,8 +63,6 @@ class nonuniformTransformCyclicFvPatchField : public cyclicFvPatchField { - // Private data - public: //- Runtime type information @@ -78,7 +78,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is NO_READ. nonuniformTransformCyclicFvPatchField ( const fvPatch&, diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C index a4c1e57ea7..793b638cc6 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C @@ -28,7 +28,6 @@ License #include "processorFvPatchField.H" #include "processorFvPatch.H" -#include "demandDrivenData.H" #include "transformField.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C index c03c65b744..5c3f68ec4b 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C @@ -135,11 +135,4 @@ Foam::processorCyclicFvPatchField::processorCyclicFvPatchField {} -// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * // - -template -Foam::processorCyclicFvPatchField::~processorCyclicFvPatchField() -{} - - // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H index 08e018d2cb..8287cd4359 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H @@ -73,7 +73,7 @@ class processorCyclicFvPatchField : public processorFvPatchField { - // Private data + // Private Data //- Local reference cast into the processor patch const processorCyclicFvPatch& procPatch_; @@ -146,10 +146,10 @@ public: //- Destructor - virtual ~processorCyclicFvPatchField(); + virtual ~processorCyclicFvPatchField() = default; - // Member functions + // Member Functions // Access diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.H index 0727afe5f8..6f2ec33e0d 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.H @@ -69,7 +69,6 @@ class symmetryFvPatchField : public basicSymmetryFvPatchField { - public: //- Runtime type information diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.C index e3fd64d58d..8c2b3eb61c 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,7 +32,6 @@ License #include "symmTransform.H" #include "diagTensor.H" - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template @@ -41,7 +41,7 @@ Foam::wedgeFvPatchField::wedgeFvPatchField const DimensionedField& iF ) : - transformFvPatchField(p, iF) + parent_bctype(p, iF) {} @@ -54,7 +54,7 @@ Foam::wedgeFvPatchField::wedgeFvPatchField const fvPatchFieldMapper& mapper ) : - transformFvPatchField(ptf, p, iF, mapper) + parent_bctype(ptf, p, iF, mapper) { if (!isType(this->patch())) { @@ -77,7 +77,7 @@ Foam::wedgeFvPatchField::wedgeFvPatchField const dictionary& dict ) : - transformFvPatchField(p, iF, dict) + parent_bctype(p, iF, dict) // "value" is NO_READ { if (!isType(p)) { @@ -97,21 +97,21 @@ Foam::wedgeFvPatchField::wedgeFvPatchField template Foam::wedgeFvPatchField::wedgeFvPatchField ( - const wedgeFvPatchField& ptf + const wedgeFvPatchField& ptf, + const DimensionedField& iF ) : - transformFvPatchField(ptf) + parent_bctype(ptf, iF) {} template Foam::wedgeFvPatchField::wedgeFvPatchField ( - const wedgeFvPatchField& ptf, - const DimensionedField& iF + const wedgeFvPatchField& ptf ) : - transformFvPatchField(ptf, iF) + wedgeFvPatchField(ptf, ptf.internalField()) {} diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H index 36c2252e7e..6d8e34e98b 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H @@ -33,6 +33,8 @@ Description This boundary condition is similar to the cyclic condition, except that it is applied to 2-D geometries. + The "value" entry is NO_READ, NO_WRITE. + Usage Example of the boundary condition specification: \verbatim @@ -50,8 +52,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef wedgeFvPatchField_H -#define wedgeFvPatchField_H +#ifndef Foam_wedgeFvPatchField_H +#define Foam_wedgeFvPatchField_H #include "transformFvPatchField.H" #include "wedgeFvPatch.H" @@ -70,6 +72,9 @@ class wedgeFvPatchField : public transformFvPatchField { + //- The parent boundary condition type + typedef transformFvPatchField parent_bctype; + public: @@ -86,7 +91,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is NO_READ. wedgeFvPatchField ( const fvPatch&, diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C index 39b7394feb..921199406e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C @@ -67,7 +67,7 @@ Foam::fanFvPatchField::fanFvPatchField const dictionary& dict ) : - uniformJumpFvPatchField(p, iF, dict, false), // Pass no valueRequired + uniformJumpFvPatchField(p, iF, dict, false), // needValue = false phiName_(dict.getOrDefault("phi", "phi")), rhoName_(dict.getOrDefault("rho", "rho")), uniformJump_(dict.getOrDefault("uniformJump", false)), diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C index e55831b999..8d62f14c27 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C @@ -70,10 +70,10 @@ Foam::fixedJumpFvPatchField::fixedJumpFvPatchField const fvPatch& p, const DimensionedField& iF, const dictionary& dict, - const bool valueRequired + const bool needValue ) : - jumpCyclicFvPatchField(p, iF, dict, false), // Pass no valueRequired + jumpCyclicFvPatchField(p, iF, dict, false), // needValue = false jump_(p.size(), Zero), jump0_(p.size(), Zero), minJump_(dict.getOrDefault("minJump", pTraits::min)), @@ -82,7 +82,7 @@ Foam::fixedJumpFvPatchField::fixedJumpFvPatchField { if (this->cyclicPatch().owner()) { - if (valueRequired) + if (needValue) { jump_.assign("jump", dict, p.size(), IOobjectOption::MUST_READ); } @@ -90,7 +90,7 @@ Foam::fixedJumpFvPatchField::fixedJumpFvPatchField jump0_.assign("jump0", dict, p.size(), IOobjectOption::LAZY_READ); } - if (valueRequired) + if (needValue) { if (!this->readValueEntry(dict)) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H index f9e340bbcc..441b420dea 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H @@ -128,7 +128,7 @@ public: const fvPatch&, const DimensionedField&, const dictionary&, - const bool valueRequired = true + const bool needValue = true ); //- Construct by mapping given fixedJumpFvPatchField onto a diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C index 557ffce494..32c993eaa1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C @@ -39,7 +39,7 @@ Foam::fixedNormalSlipFvPatchField::fixedNormalSlipFvPatchField ) : parent_bctype(p, iF), - fixedValue_(p.size(), Zero), + fixedValue_(p.size(), Foam::zero{}), writeValue_(false) {} @@ -72,6 +72,7 @@ Foam::fixedNormalSlipFvPatchField::fixedNormalSlipFvPatchField writeValue_(dict.getOrDefault("writeValue", false)) { fvPatchFieldBase::readDict(dict); + evaluate(); } @@ -181,11 +182,13 @@ template void Foam::fixedNormalSlipFvPatchField::write(Ostream& os) const { this->parent_bctype::write(os); - fixedValue_.writeEntry("fixedValue", os); - if (writeValue_) { os.writeEntry("writeValue", "true"); + } + fixedValue_.writeEntry("fixedValue", os); + if (writeValue_) + { fvPatchField::writeValueEntry(os); } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H index 7fe1f59490..8fdfb7e7fd 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H @@ -36,6 +36,8 @@ Description The tangential component is treated as slip, i.e. copied from the internal field. + The "value" entry is NO_READ, optional write. + Usage Example of the boundary condition specification: \verbatim @@ -76,8 +78,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef fixedNormalSlipFvPatchField_H -#define fixedNormalSlipFvPatchField_H +#ifndef Foam_fixedNormalSlipFvPatchField_H +#define Foam_fixedNormalSlipFvPatchField_H #include "transformFvPatchField.H" @@ -123,7 +125,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is NO_READ. fixedNormalSlipFvPatchField ( const fvPatch&, diff --git a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C index cfb77c5732..b11935b557 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C @@ -39,7 +39,7 @@ Foam::partialSlipFvPatchField::partialSlipFvPatchField ) : parent_bctype(p, iF), - refValue_(p.size(), Zero), + refValue_(p.size(), Foam::zero{}), valueFraction_(p.size(), 1.0), writeValue_(false) {} @@ -70,7 +70,7 @@ Foam::partialSlipFvPatchField::partialSlipFvPatchField ) : parent_bctype(p, iF), - refValue_(p.size(), Zero), + refValue_(p.size(), Foam::zero{}), valueFraction_("valueFraction", dict, p.size()), writeValue_(dict.getOrDefault("writeValue", false)) { @@ -86,10 +86,11 @@ Foam::partialSlipFvPatchField::partialSlipFvPatchField template Foam::partialSlipFvPatchField::partialSlipFvPatchField ( - const partialSlipFvPatchField& ptf + const partialSlipFvPatchField& ptf, + const DimensionedField& iF ) : - parent_bctype(ptf), + parent_bctype(ptf, iF), refValue_(ptf.refValue_), valueFraction_(ptf.valueFraction_), writeValue_(ptf.writeValue_) @@ -99,14 +100,10 @@ Foam::partialSlipFvPatchField::partialSlipFvPatchField template Foam::partialSlipFvPatchField::partialSlipFvPatchField ( - const partialSlipFvPatchField& ptf, - const DimensionedField& iF + const partialSlipFvPatchField& ptf ) : - parent_bctype(ptf, iF), - refValue_(ptf.refValue_), - valueFraction_(ptf.valueFraction_), - writeValue_(ptf.writeValue_) + partialSlipFvPatchField(ptf, ptf.internalField()) {} @@ -204,12 +201,14 @@ template void Foam::partialSlipFvPatchField::write(Ostream& os) const { this->parent_bctype::write(os); - refValue_.writeEntry("refValue", os); - valueFraction_.writeEntry("valueFraction", os); - if (writeValue_) { os.writeEntry("writeValue", "true"); + } + refValue_.writeEntry("refValue", os); + valueFraction_.writeEntry("valueFraction", os); + if (writeValue_) + { fvPatchField::writeValueEntry(os); } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H index eb5ed46922..a81ce92912 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H @@ -31,8 +31,10 @@ Group grpWallBoundaryConditions grpGenericBoundaryConditions Description - This boundary condition provides a partial slip condition. The amount of - slip is controlled by a user-supplied field. + This boundary condition provides a partial slip condition. + The amount of slip is controlled by a user-supplied field. + + The "value" entry is NO_READ, optional write. Usage \table @@ -50,7 +52,6 @@ Usage type partialSlip; refValue uniform 0.001; valueFraction uniform 0.1; - value uniform 0; } \endverbatim @@ -62,8 +63,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef partialSlipFvPatchField_H -#define partialSlipFvPatchField_H +#ifndef Foam_partialSlipFvPatchField_H +#define Foam_partialSlipFvPatchField_H #include "transformFvPatchField.H" @@ -112,7 +113,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is NO_READ. partialSlipFvPatchField ( const fvPatch&, @@ -120,7 +122,8 @@ public: const dictionary& ); - //- Construct by mapping given partialSlipFvPatchField onto a new patch + //- Construct by mapping given partialSlip patch field + //- onto a new patch partialSlipFvPatchField ( const partialSlipFvPatchField&, @@ -163,6 +166,7 @@ public: //- False: this patch field is not altered by assignment virtual bool assignable() const { return false; } + // Access virtual Field& refValue() diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C index 1f117d268c..deca4b4732 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C @@ -62,13 +62,13 @@ Foam::uniformJumpFvPatchField::uniformJumpFvPatchField const fvPatch& p, const DimensionedField& iF, const dictionary& dict, - const bool valueRequired + const bool needValue ) : - fixedJumpFvPatchField(p, iF, dict, false), // Pass no valueRequired + fixedJumpFvPatchField(p, iF, dict, false), // needValue = false jumpTable_() { - if (valueRequired) + if (needValue) { if (this->cyclicPatch().owner()) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.H index 09be775aed..a953274fc9 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.H @@ -118,7 +118,7 @@ public: const fvPatch&, const DimensionedField&, const dictionary&, - const bool valueRequired = true + const bool needValue = true ); //- Construct by mapping given uniformJumpFvPatchField onto a diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H index 9056467691..993433fd61 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H @@ -430,13 +430,13 @@ public: const fvPatch& p, const DimensionedField& iF, const dictionary& dict, - const bool valueReqd + const bool needValue ) : fvPatchField ( p, iF, dict, - (valueReqd? IOobjectOption::MUST_READ : IOobjectOption::NO_READ) + (needValue? IOobjectOption::MUST_READ : IOobjectOption::NO_READ) ) {} diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C index ed1536312c..0cfa7e3ef0 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2021-2023 OpenCFD Ltd. + Copyright (C) 2021-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -131,4 +131,14 @@ Foam::fvsPatchField::NewCalculatedType } +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::calculatedFvsPatchField::write(Ostream& os) const +{ + fvsPatchField::write(os); + fvsPatchField::writeValueEntry(os); +} + + // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.H index bd8b64db01..1e8914fd25 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,7 +28,25 @@ Class Foam::calculatedFvsPatchField Description - Foam::calculatedFvsPatchField + This boundary condition is not designed to be evaluated; it is assumed + that the value is assigned via field assignment. + + The "value" entry is MUST_READ. + +Usage + \table + Property | Description | Required | Default + value | Patch face values | yes | + \endtable + + Example of the boundary condition specification: + \verbatim + + { + type calculated; + value uniform (0 0 0); // Required value entry + } + \endverbatim SourceFiles calculatedFvsPatchField.C @@ -118,6 +137,9 @@ public: //- True: this patch field fixes a value. virtual bool fixesValue() const { return true; } + + //- Write includes "value" entry + virtual void write(Ostream&) const; }; diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.C index 5c3d033a66..939aac9d7c 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -57,10 +58,11 @@ Foam::coupledFvsPatchField::coupledFvsPatchField ( const fvPatch& p, const DimensionedField& iF, - const dictionary& dict + const dictionary& dict, + IOobjectOption::readOption requireValue ) : - fvsPatchField(p, iF, dict) + fvsPatchField(p, iF, dict, requireValue) {} @@ -98,4 +100,14 @@ Foam::coupledFvsPatchField::coupledFvsPatchField {} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::coupledFvsPatchField::write(Ostream& os) const +{ + fvsPatchField::write(os); + fvsPatchField::writeValueEntry(os); +} + + // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.H index 221630943f..b6ce0ea9f0 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,15 +28,17 @@ Class Foam::coupledFvsPatchField Description - Foam::coupledFvsPatchField + Abstract base class for coupled patches. + + The "value" entry is usually MUST_READ and always WRITE. SourceFiles coupledFvsPatchField.C \*---------------------------------------------------------------------------*/ -#ifndef coupledFvsPatchField_H -#define coupledFvsPatchField_H +#ifndef Foam_coupledFvsPatchField_H +#define Foam_coupledFvsPatchField_H #include "fvsPatchField.H" #include "coupledFvPatch.H" @@ -46,7 +49,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class coupledFvsPatch Declaration + Class coupledFvsPatchField Declaration \*---------------------------------------------------------------------------*/ template @@ -54,7 +57,6 @@ class coupledFvsPatchField : public fvsPatchField { - public: //- Runtime type information @@ -83,7 +85,8 @@ public: ( const fvPatch&, const DimensionedField&, - const dictionary& + const dictionary&, + IOobjectOption::readOption requireValue = IOobjectOption::MUST_READ ); //- Construct by mapping the given coupledFvsPatchField onto a new patch @@ -118,16 +121,16 @@ public: ) const = 0; - // Member functions + // Member Functions - // Access + //- True if this patch field is derived from coupledFvsPatchField + virtual bool coupled() const + { + return true; + } - //- Return true if this patch field is derived from - // coupledFvsPatchField. - virtual bool coupled() const - { - return true; - } + //- Write includes "value" entry + virtual void write(Ostream&) const; }; diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.C index f457b1d07d..2d061f7ced 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -57,7 +58,8 @@ Foam::fixedValueFvsPatchField::fixedValueFvsPatchField ( const fvPatch& p, const DimensionedField& iF, - const dictionary& dict + const dictionary& dict, + IOobjectOption::readOption requireValue ) : fvsPatchField(p, iF, dict, IOobjectOption::MUST_READ) @@ -80,21 +82,21 @@ Foam::fixedValueFvsPatchField::fixedValueFvsPatchField template Foam::fixedValueFvsPatchField::fixedValueFvsPatchField ( - const fixedValueFvsPatchField& ptf + const fixedValueFvsPatchField& ptf, + const DimensionedField& iF ) : - fvsPatchField(ptf) + fvsPatchField(ptf, iF) {} template Foam::fixedValueFvsPatchField::fixedValueFvsPatchField ( - const fixedValueFvsPatchField& ptf, - const DimensionedField& iF + const fixedValueFvsPatchField& ptf ) : - fvsPatchField(ptf, iF) + fixedValueFvsPatchField(ptf, ptf.internalField()) {} @@ -138,4 +140,12 @@ Foam::fixedValueFvsPatchField::gradientBoundaryCoeffs() const } +template +void Foam::fixedValueFvsPatchField::write(Ostream& os) const +{ + fvsPatchField::write(os); + fvsPatchField::writeValueEntry(os); +} + + // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.H index ab5ec9dc42..5934499fe0 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,15 +28,33 @@ Class Foam::fixedValueFvsPatchField Description - Foam::fixedValueFvsPatchField + This boundary condition supplies a fixed value constraint, and is the base + class for a number of other boundary conditions. + + The "value" entry is MUST_READ. + +Usage + \table + Property | Description | Required | Default + value | Patch face values | yes | + \endtable + + Example of the boundary condition specification: + \verbatim + + { + type fixedValue; + value uniform 0; // Example for scalar field usage + } + \endverbatim SourceFiles fixedValueFvsPatchField.C \*---------------------------------------------------------------------------*/ -#ifndef fixedValueFvsPatchField_H -#define fixedValueFvsPatchField_H +#ifndef Foam_fixedValueFvsPatchField_H +#define Foam_fixedValueFvsPatchField_H #include "fvsPatchField.H" @@ -45,7 +64,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class fixedValueFvsPatch Declaration + Class fixedValueFvsPatchField Declaration \*---------------------------------------------------------------------------*/ template @@ -81,7 +100,8 @@ public: ( const fvPatch&, const DimensionedField&, - const dictionary& + const dictionary&, + IOobjectOption::readOption requireValue = IOobjectOption::MUST_READ ); //- Construct by mapping the given fixedValue patch field @@ -127,6 +147,9 @@ public: //- True: this patch field fixes a value. virtual bool fixesValue() const { return true; } + //- Write includes "value" entry + virtual void write(Ostream&) const; + // Evaluation functions @@ -153,7 +176,7 @@ public: virtual tmp> gradientBoundaryCoeffs() const; - // Member operators + // Member Operators virtual void operator=(const UList&) {} diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C index 717918883f..de49ba50a5 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2023 OpenCFD Ltd. + Copyright (C) 2023-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -131,4 +131,14 @@ Foam::slicedFvsPatchField::~slicedFvsPatchField() } +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::slicedFvsPatchField::write(Ostream& os) const +{ + fvsPatchField::write(os); + fvsPatchField::writeValueEntry(os); +} + + // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.H index 42c92679d9..3a82030519 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2023 OpenCFD Ltd. + Copyright (C) 2023-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -89,7 +89,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + // Not implemented. slicedFvsPatchField ( const fvPatch&, @@ -98,6 +99,7 @@ public: ); //- Construct by mapping the given sliced patch field onto a new patch + // Not implemented. slicedFvsPatchField ( const slicedFvsPatchField&, @@ -141,6 +143,9 @@ public: //- True: this patch field fixes a value. virtual bool fixesValue() const { return true; } + //- Write includes "value" entry + virtual void write(Ostream&) const; + // Member Operators diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.H index c609d02df9..384638a754 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.H @@ -27,15 +27,27 @@ Class Foam::cyclicFvsPatchField Description - Foam::cyclicFvsPatchField + This boundary condition enforces a cyclic condition between a pair of + boundaries. + + The "value" entry is NO_READ, but is written. + +Usage + Example of the boundary condition specification: + \verbatim + + { + type cyclic; + } + \endverbatim SourceFiles cyclicFvsPatchField.C \*---------------------------------------------------------------------------*/ -#ifndef cyclicFvsPatchField_H -#define cyclicFvsPatchField_H +#ifndef Foam_cyclicFvsPatchField_H +#define Foam_cyclicFvsPatchField_H #include "coupledFvsPatchField.H" #include "cyclicFvPatch.H" @@ -46,7 +58,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class cyclicFvsPatch Declaration + Class cyclicFvsPatchField Declaration \*---------------------------------------------------------------------------*/ template @@ -54,7 +66,7 @@ class cyclicFvsPatchField : public coupledFvsPatchField { - // Private data + // Private Data //- Local reference cast into the cyclic patch const cyclicFvPatch& cyclicPatch_; @@ -75,7 +87,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is NO_READ. cyclicFvsPatchField ( const fvPatch&, diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.C index 1a63a8b724..96fb0a15bc 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.C @@ -117,7 +117,7 @@ bool Foam::cyclicACMIFvsPatchField::coupled() const { if ( - Pstream::parRun() + UPstream::parRun() || ( this->cyclicACMIPatch_.size() && this->cyclicACMIPatch_.cyclicACMIPatch().neighbPatch().size() diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.H index da9480eb7f..b16faeb228 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.H @@ -27,7 +27,9 @@ Class Foam::cyclicACMIFvsPatchField Description - Foam::cyclicACMIFvsPatchField + This boundary condition enforces a cyclic condition between a pair of + boundaries, whereby communication between the patches is performed using + an arbitrarily coupled mesh interface (ACMI) interpolation. SourceFiles cyclicACMIFvsPatchField.C @@ -54,7 +56,7 @@ class cyclicACMIFvsPatchField : public coupledFvsPatchField { - // Private data + // Private Data //- Local reference cast into the cyclic patch const cyclicACMIFvPatch& cyclicACMIPatch_; @@ -75,7 +77,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is MUST_READ. cyclicACMIFvsPatchField ( const fvPatch&, diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.H index 2550303c73..59bdcab69f 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.H @@ -27,7 +27,11 @@ Class Foam::cyclicAMIFvsPatchField Description - Foam::cyclicAMIFvsPatchField + This boundary condition enforces a cyclic condition between a pair of + boundaries, whereby communication between the patches is performed using + an arbitrary mesh interface (AMI) interpolation. + + The "value" entry is MUST_READ. SourceFiles cyclicAMIFvsPatchField.C @@ -54,7 +58,7 @@ class cyclicAMIFvsPatchField : public coupledFvsPatchField { - // Private data + // Private Data //- Local reference cast into the cyclic patch const cyclicAMIFvPatch& cyclicAMIPatch_; @@ -75,7 +79,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is MUST_READ. cyclicAMIFvsPatchField ( const fvPatch&, diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.C index 489cb7de84..5c1d93d7d5 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -38,7 +39,7 @@ Foam::emptyFvsPatchField::emptyFvsPatchField const DimensionedField& iF ) : - fvsPatchField(p, iF, Field(0)) + fvsPatchField(p, iF, Field()) // zero-sized patch field {} @@ -50,8 +51,11 @@ Foam::emptyFvsPatchField::emptyFvsPatchField const dictionary& dict ) : - fvsPatchField(p, iF, Field(0)) + fvsPatchField(p, iF, Field()) // zero-sized patch field { + // Empty means empty, so no patchType override + // with fvsPatchFieldBase::readDict(dict); + if (!isType(p)) { FatalIOErrorInFunction(dict) @@ -71,7 +75,7 @@ Foam::emptyFvsPatchField::emptyFvsPatchField const fvPatchFieldMapper& ) : - fvsPatchField(p, iF, Field(0)) + fvsPatchField(p, iF, Field()) // zero-sized patch field { if (!isType(this->patch())) { @@ -88,26 +92,21 @@ Foam::emptyFvsPatchField::emptyFvsPatchField template Foam::emptyFvsPatchField::emptyFvsPatchField ( - const emptyFvsPatchField& ptf + const emptyFvsPatchField& ptf, + const DimensionedField& iF ) : - fvsPatchField - ( - ptf.patch(), - ptf.internalField(), - Field(0) - ) + fvsPatchField(ptf.patch(), iF, Field()) // zero-sized {} template Foam::emptyFvsPatchField::emptyFvsPatchField ( - const emptyFvsPatchField& ptf, - const DimensionedField& iF + const emptyFvsPatchField& ptf ) : - fvsPatchField(ptf.patch(), iF, Field(0)) + emptyFvsPatchField(ptf, ptf.internalField()) {} diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.H index 7641321852..6a70355075 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.H @@ -27,7 +27,19 @@ Class Foam::emptyFvsPatchField Description - Foam::emptyFvsPatchField + This boundary condition provides an 'empty' condition for reduced + dimensions cases. + + The "value" entry is NO_READ, NO_WRITE. + +Usage + Example of the boundary condition specification: + \verbatim + + { + type empty; + } + \endverbatim SourceFiles emptyFvsPatchField.C @@ -69,7 +81,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is NO_READ. emptyFvsPatchField ( const fvPatch&, @@ -115,9 +128,9 @@ public: } - // Member functions + // Member Functions - // Mapping functions + // Mapping Functions //- Map (and resize as needed) from self given a mapping object virtual void autoMap diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.C index f5a44ebd4c..4d538caa6b 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.C @@ -122,11 +122,4 @@ Foam::processorFvsPatchField::processorFvsPatchField {} -// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * // - -template -Foam::processorFvsPatchField::~processorFvsPatchField() -{} - - // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.H index dd96291ee6..8a4fb3a093 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,15 +28,26 @@ Class Foam::processorFvsPatchField Description - Foam::processorFvsPatchField + This boundary condition enables processor communication across patches. + + The "value" entry is MUST_READ. + + Example of the boundary condition specification: + \verbatim + + { + type processor; + value uniform (0 0 0); // Mandatory + } + \endverbatim SourceFiles processorFvsPatchField.C \*---------------------------------------------------------------------------*/ -#ifndef processorFvsPatchField_H -#define processorFvsPatchField_H +#ifndef Foam_processorFvsPatchField_H +#define Foam_processorFvsPatchField_H #include "coupledFvsPatchField.H" #include "processorFvPatch.H" @@ -54,7 +66,7 @@ class processorFvsPatchField : public coupledFvsPatchField { - // Private data + // Private Data //- Local reference cast into the processor patch const processorFvPatch& procPatch_; @@ -83,7 +95,8 @@ public: const Field& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is MUST_READ. processorFvsPatchField ( const fvPatch&, @@ -127,15 +140,15 @@ public: //- Destructor - virtual ~processorFvsPatchField(); + virtual ~processorFvsPatchField() = default; // Member Functions - //- Return true if running parallel + //- True if running parallel virtual bool coupled() const { - return Pstream::parRun(); + return UPstream::parRun(); } }; diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.C index 69dda610a3..af904a50fb 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.C @@ -122,11 +122,4 @@ Foam::processorCyclicFvsPatchField::processorCyclicFvsPatchField {} -// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * // - -template -Foam::processorCyclicFvsPatchField::~processorCyclicFvsPatchField() -{} - - // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.H index 4368b03621..8ebb8fbb21 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.H @@ -27,15 +27,18 @@ Class Foam::processorCyclicFvsPatchField Description - Foam::processorCyclicFvsPatchField + This boundary condition enables processor communication across cyclic + patches. + + The "value" entry is MUST_READ. SourceFiles processorCyclicFvsPatchField.C \*---------------------------------------------------------------------------*/ -#ifndef processorCyclicFvsPatchField_H -#define processorCyclicFvsPatchField_H +#ifndef Foam_processorCyclicFvsPatchField_H +#define Foam_processorCyclicFvsPatchField_H #include "coupledFvsPatchField.H" #include "processorCyclicFvPatch.H" @@ -54,7 +57,7 @@ class processorCyclicFvsPatchField : public coupledFvsPatchField { - // Private data + // Private Data //- Local reference cast into the processor patch const processorCyclicFvPatch& procPatch_; @@ -83,7 +86,8 @@ public: const Field& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is MUST_READ. processorCyclicFvsPatchField ( const fvPatch&, @@ -91,8 +95,7 @@ public: const dictionary& ); - //- Construct by mapping given processorCyclicFvsPatchField onto a - // new patch + //- Construct by mapping given patch field onto a new patch processorCyclicFvsPatchField ( const processorCyclicFvsPatchField&, @@ -128,15 +131,15 @@ public: //- Destructor - virtual ~processorCyclicFvsPatchField(); + virtual ~processorCyclicFvsPatchField() = default; // Member Functions - //- Return true if running parallel + //- True if running parallel virtual bool coupled() const { - return Pstream::parRun(); + return UPstream::parRun(); } }; diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.C index 1f65f735ce..071abfefee 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -48,7 +49,7 @@ Foam::symmetryFvsPatchField::symmetryFvsPatchField const dictionary& dict ) : - fvsPatchField(p, iF, dict) + fvsPatchField(p, iF, dict, IOobjectOption::NO_READ) { if (!isType(p)) { @@ -83,16 +84,6 @@ Foam::symmetryFvsPatchField::symmetryFvsPatchField } -template -Foam::symmetryFvsPatchField::symmetryFvsPatchField -( - const symmetryFvsPatchField& ptf -) -: - fvsPatchField(ptf) -{} - - template Foam::symmetryFvsPatchField::symmetryFvsPatchField ( @@ -104,4 +95,14 @@ Foam::symmetryFvsPatchField::symmetryFvsPatchField {} +template +Foam::symmetryFvsPatchField::symmetryFvsPatchField +( + const symmetryFvsPatchField& ptf +) +: + symmetryFvsPatchField(ptf, ptf.internalField()) +{} + + // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.H index 4fa95f9680..4142b0d70f 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,15 +28,26 @@ Class Foam::symmetryFvsPatchField Description - Foam::symmetryFvsPatchField + This boundary condition enforces a symmetry constraint + + The "value" entry is NO_READ, NO_WRITE. + +Usage + Example of the boundary condition specification: + \verbatim + + { + type symmetry; + } + \endverbatim SourceFiles symmetryFvsPatchField.C \*---------------------------------------------------------------------------*/ -#ifndef symmetryFvsPatchField_H -#define symmetryFvsPatchField_H +#ifndef Foam_symmetryFvsPatchField_H +#define Foam_symmetryFvsPatchField_H #include "fvsPatchField.H" #include "symmetryFvPatch.H" @@ -54,7 +66,6 @@ class symmetryFvsPatchField : public fvsPatchField { - public: //- Runtime type information @@ -71,6 +82,7 @@ public: ); //- Construct from patch, internal field and dictionary + //- The "value" entry is NO_READ. symmetryFvsPatchField ( const fvPatch&, diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.C index 60bf14ab43..80d4b9378d 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2015 OpenFOAM Foundation + Copyright (C) 2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -48,7 +49,7 @@ Foam::symmetryPlaneFvsPatchField::symmetryPlaneFvsPatchField const dictionary& dict ) : - fvsPatchField(p, iF, dict) + fvsPatchField(p, iF, dict, IOobjectOption::NO_READ) { if (!isType(p)) { @@ -83,16 +84,6 @@ Foam::symmetryPlaneFvsPatchField::symmetryPlaneFvsPatchField } -template -Foam::symmetryPlaneFvsPatchField::symmetryPlaneFvsPatchField -( - const symmetryPlaneFvsPatchField& ptf -) -: - fvsPatchField(ptf) -{} - - template Foam::symmetryPlaneFvsPatchField::symmetryPlaneFvsPatchField ( @@ -104,4 +95,14 @@ Foam::symmetryPlaneFvsPatchField::symmetryPlaneFvsPatchField {} +template +Foam::symmetryPlaneFvsPatchField::symmetryPlaneFvsPatchField +( + const symmetryPlaneFvsPatchField& ptf +) +: + symmetryPlaneFvsPatchField(ptf, ptf.internalField()) +{} + + // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H index cf3f253e05..717506e082 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H @@ -27,15 +27,26 @@ Class Foam::symmetryPlaneFvsPatchField Description - Foam::symmetryPlaneFvsPatchField + This boundary condition enforces a symmetryPlane constraint + + The "value" entry is NO_READ, NO_WRITE. + +Usage + Example of the boundary condition specification: + \verbatim + + { + type symmetryPlane; + } + \endverbatim SourceFiles symmetryPlaneFvsPatchField.C \*---------------------------------------------------------------------------*/ -#ifndef symmetryPlaneFvsPatchField_H -#define symmetryPlaneFvsPatchField_H +#ifndef Foam_symmetryPlaneFvsPatchField_H +#define Foam_symmetryPlaneFvsPatchField_H #include "fvsPatchField.H" #include "symmetryPlaneFvPatch.H" @@ -54,7 +65,6 @@ class symmetryPlaneFvsPatchField : public fvsPatchField { - public: //- Runtime type information @@ -70,7 +80,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is NO_READ. symmetryPlaneFvsPatchField ( const fvPatch&, @@ -78,8 +89,7 @@ public: const dictionary& ); - //- Construct by mapping given symmetryPlaneFvsPatchField - // onto a new patch + //- Construct by mapping given patch field onto a new patch symmetryPlaneFvsPatchField ( const symmetryPlaneFvsPatchField&, diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.C index 9c243442b5..df57e01f61 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -48,7 +49,7 @@ Foam::wedgeFvsPatchField::wedgeFvsPatchField const dictionary& dict ) : - fvsPatchField(p, iF, dict) + fvsPatchField(p, iF, dict, IOobjectOption::NO_READ) { if (!isType(p)) { @@ -83,16 +84,6 @@ Foam::wedgeFvsPatchField::wedgeFvsPatchField } -template -Foam::wedgeFvsPatchField::wedgeFvsPatchField -( - const wedgeFvsPatchField& ptf -) -: - fvsPatchField(ptf) -{} - - template Foam::wedgeFvsPatchField::wedgeFvsPatchField ( @@ -104,4 +95,14 @@ Foam::wedgeFvsPatchField::wedgeFvsPatchField {} +template +Foam::wedgeFvsPatchField::wedgeFvsPatchField +( + const wedgeFvsPatchField& ptf +) +: + wedgeFvsPatchField(ptf, ptf.internalField()) +{} + + // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.H index 9c5ce9eb72..aeb04ff0bc 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,15 +28,27 @@ Class Foam::wedgeFvsPatchField Description - Foam::wedgeFvsPatchField + This boundary condition is similar to the cyclic condition, except that + it is applied to 2-D geometries. + + The "value" entry is NO_READ, NO_WRITE. + +Usage + Example of the boundary condition specification: + \verbatim + + { + type wedge; + } + \endverbatim SourceFiles wedgeFvsPatchField.C \*---------------------------------------------------------------------------*/ -#ifndef wedgeFvsPatchField_H -#define wedgeFvsPatchField_H +#ifndef Foam_wedgeFvsPatchField_H +#define Foam_wedgeFvsPatchField_H #include "fvsPatchField.H" #include "wedgeFvPatch.H" @@ -54,7 +67,6 @@ class wedgeFvsPatchField : public fvsPatchField { - public: //- Runtime type information @@ -70,7 +82,8 @@ public: const DimensionedField& ); - //- Construct from patch, internal field and dictionary + //- Construct from patch, internal field and dictionary. + //- The "value" entry is NO_READ. wedgeFvsPatchField ( const fvPatch&, diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C index b197203cb2..027b488214 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C @@ -207,7 +207,6 @@ template void Foam::fvsPatchField::write(Ostream& os) const { os.writeEntry("type", type()); - Field::writeEntry("value", os); } diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H index 26f2f4beb5..ddb7dfa8b6 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H @@ -343,13 +343,13 @@ public: const fvPatch& p, const DimensionedField& iF, const dictionary& dict, - const bool valueReqd + const bool needValue ) : fvsPatchField ( p, iF, dict, - (valueReqd? IOobjectOption::MUST_READ : IOobjectOption::NO_READ) + (needValue? IOobjectOption::MUST_READ : IOobjectOption::NO_READ) ) {} @@ -541,7 +541,7 @@ public: {} - //- Write + //- Write the patch "type" virtual void write(Ostream& os) const; //- Check against given patch field diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/specularRadiation/specularRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/specularRadiation/specularRadiationMixedFvPatchScalarField.C index d748553358..7b7f5c100c 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/specularRadiation/specularRadiationMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/specularRadiation/specularRadiationMixedFvPatchScalarField.C @@ -449,7 +449,7 @@ void specularRadiationMixedFvPatchScalarField::write(Ostream& os) const { mixedFvPatchScalarField::write(os); os.writeEntryIfDifferent("interpolate", false, interpolate_); - this->writeEntry("value", os); + this->writeValueEntry(os); }