diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C index 5b2350bbfb..d0948dffd6 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -633,14 +633,13 @@ scalarInterfaces() const template class PatchField, class GeoMesh> void Foam::GeometricBoundaryField::reset ( - const DimensionedField& field, const GeometricBoundaryField& btf ) { // Reset the number of patches in case the decomposition changed this->setSize(btf.size()); - const polyBoundaryMesh& pbm = field.mesh()().boundaryMesh(); + const polyBoundaryMesh& pbm = bmesh_.mesh().boundaryMesh(); forAll(*this, patchi) { @@ -648,7 +647,15 @@ void Foam::GeometricBoundaryField::reset // changed if (isA(pbm[patchi])) { - this->set(patchi, btf[patchi].clone(bmesh_[patchi], field)); + this->set + ( + patchi, + btf[patchi].clone + ( + bmesh_[patchi], + this->operator[](0).internalField() + ) + ); } else { diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.H index cf5668c1e4..7dd7040f11 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -169,11 +169,7 @@ public: //- Reset the boundary field contents to the given field // Used for mesh to mesh mapping - void reset - ( - const Internal&, - const GeometricBoundaryField& - ); + void reset(const GeometricBoundaryField&); //- Write boundary field as dictionary entry void writeEntry(const word& keyword, Ostream& os) const; diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index 0e73d60205..00f201c873 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1296,7 +1296,7 @@ void Foam::GeometricField::reset const GeometricField& gf = tgf(); Internal::reset(gf); - boundaryField_.reset(*this, gf.boundaryField()); + boundaryField_.reset(gf.boundaryField()); tgf.clear(); } diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 4e299686aa..9c3829408e 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -258,7 +258,6 @@ $(fvsPatchFields)/fvsPatchField/fvsPatchFields.C basicFvsPatchFields = $(fvsPatchFields)/basic $(basicFvsPatchFields)/calculated/calculatedFvsPatchFields.C -$(basicFvsPatchFields)/nonConformalCalculated/nonConformalCalculatedFvsPatchFields.C $(basicFvsPatchFields)/coupled/coupledFvsPatchFields.C $(basicFvsPatchFields)/fixedValue/fixedValueFvsPatchFields.C $(basicFvsPatchFields)/sliced/slicedFvsPatchFields.C @@ -277,6 +276,10 @@ $(constraintFvsPatchFields)/nonConformalCyclic/nonConformalCyclicFvsPatchFields. $(constraintFvsPatchFields)/nonConformalError/nonConformalErrorFvsPatchFields.C $(constraintFvsPatchFields)/nonConformalProcessorCyclic/nonConformalProcessorCyclicFvsPatchFields.C +derivedFvsPatchFields = $(fvsPatchFields)/derived +$(derivedFvsPatchFields)/polyFaces/polyFacesFvsPatchLabelField.C +$(derivedFvsPatchFields)/nonConformalPolyFaces/nonConformalPolyFacesFvsPatchLabelField.C + fields/volFields/volFields.C fields/surfaceFields/surfaceFields.C diff --git a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.C index 78da35aa2e..949d8528b2 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,6 @@ License #include "basicSymmetryFvPatchField.H" #include "symmTransformField.H" - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template diff --git a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C index 419f1ccf01..e1c08cb0a7 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ License #include "coupledFvPatchField.H" -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template Foam::coupledFvPatchField::coupledFvPatchField diff --git a/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.C index 0bc5cee587..03f590be92 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.C @@ -26,7 +26,7 @@ License #include "fixedGradientFvPatchField.H" #include "dictionary.H" -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template Foam::fixedGradientFvPatchField::fixedGradientFvPatchField diff --git a/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.C index f0f2e13017..641f4c8017 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ License #include "fixedValueFvPatchField.H" -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template Foam::fixedValueFvPatchField::fixedValueFvPatchField diff --git a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.C index 436adabc84..819d60ada3 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.C @@ -25,7 +25,7 @@ License #include "mixedFvPatchField.H" -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template Foam::mixedFvPatchField::mixedFvPatchField diff --git a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C index 5926306f07..99206b66ec 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ License #include "slicedFvPatchField.H" -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template Foam::slicedFvPatchField::slicedFvPatchField @@ -71,19 +71,7 @@ Foam::slicedFvPatchField::slicedFvPatchField } -template -Foam::tmp> -Foam::slicedFvPatchField::clone -( - const DimensionedField& iF -) const -{ - return tmp> - ( - new slicedFvPatchField(*this, iF) - ); -} - +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template Foam::slicedFvPatchField::~slicedFvPatchField() diff --git a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H index 516c658dcb..eda023dd16 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -99,7 +99,13 @@ public: virtual tmp> clone ( const DimensionedField& iF - ) const; + ) const + { + return tmp> + ( + new slicedFvPatchField(*this, iF) + ); + }; //- Destructor diff --git a/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.C index 2fb357cf89..de709b478e 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,7 +27,7 @@ License #include "IOstreams.H" #include "transformField.H" -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template Foam::transformFvPatchField::transformFvPatchField diff --git a/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.C index beb4f6a229..54c69f1ee5 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,7 @@ License #include "zeroGradientFvPatchField.H" #include "fvPatchFieldMapper.H" -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template Foam::zeroGradientFvPatchField::zeroGradientFvPatchField diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C index d0f37064ed..bc783c3428 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,6 +34,7 @@ const Foam::word& Foam::fvsPatchField::calculatedType() return calculatedFvsPatchField::typeName; } + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template @@ -127,4 +128,14 @@ Foam::fvsPatchField::NewCalculatedType } +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::calculatedFvsPatchField::write(Ostream& os) const +{ + fvsPatchField::write(os); + writeEntry(os, "value", *this); +} + + // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.H index de46adbefc..dab066334b 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.H @@ -105,6 +105,11 @@ public: new calculatedFvsPatchField(*this, iF) ); } + + // Member Functions + + //- Write + 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 b30a66db67..4af8f1e07b 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ License #include "coupledFvsPatchField.H" -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template Foam::coupledFvsPatchField::coupledFvsPatchField @@ -86,4 +86,14 @@ Foam::coupledFvsPatchField::coupledFvsPatchField {} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::coupledFvsPatchField::write(Ostream& os) const +{ + fvsPatchField::write(os); + writeEntry(os, "value", *this); +} + + // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.H index 93dadce73d..1108a04bba 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -120,6 +120,9 @@ public: { return true; } + + //- Write + 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 3c3734247b..49f25b6441 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ License #include "fixedValueFvsPatchField.H" -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template Foam::fixedValueFvsPatchField::fixedValueFvsPatchField @@ -77,43 +77,10 @@ Foam::fixedValueFvsPatchField::fixedValueFvsPatchField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -Foam::tmp> -Foam::fixedValueFvsPatchField::valueInternalCoeffs -( - const tmp& -) const +void Foam::fixedValueFvsPatchField::write(Ostream& os) const { - return tmp> - ( - new Field(this->size(), Zero) - ); -} - - -template -Foam::tmp> -Foam::fixedValueFvsPatchField::valueBoundaryCoeffs -( - const tmp& -) const -{ - return *this; -} - - -template -Foam::tmp> -Foam::fixedValueFvsPatchField::gradientInternalCoeffs() const -{ - return -pTraits::one*this->patch().deltaCoeffs(); -} - - -template -Foam::tmp> -Foam::fixedValueFvsPatchField::gradientBoundaryCoeffs() const -{ - return this->patch().deltaCoeffs()*(*this); + fvsPatchField::write(os); + writeEntry(os, "value", *this); } diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.H index 20949f1c35..f9045a0db1 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -124,29 +124,8 @@ public: } - // Evaluation functions - - //- Return the matrix diagonal coefficients corresponding to the - // evaluation of the value of this patchField with given weights - virtual tmp> valueInternalCoeffs - ( - const tmp& - ) const; - - //- Return the matrix source coefficients corresponding to the - // evaluation of the value of this patchField with given weights - virtual tmp> valueBoundaryCoeffs - ( - const tmp& - ) const; - - //- Return the matrix diagonal coefficients corresponding to the - // evaluation of the gradient of this patchField - virtual tmp> gradientInternalCoeffs() const; - - //- Return the matrix source coefficients corresponding to the - // evaluation of the gradient of this patchField - virtual tmp> gradientBoundaryCoeffs() const; + //- Write + virtual void write(Ostream&) const; // Member Operators diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/nonConformalCalculated/nonConformalCalculatedFvsPatchFields.C b/src/finiteVolume/fields/fvsPatchFields/basic/nonConformalCalculated/nonConformalCalculatedFvsPatchFields.C deleted file mode 100644 index 0a9c36d901..0000000000 --- a/src/finiteVolume/fields/fvsPatchFields/basic/nonConformalCalculated/nonConformalCalculatedFvsPatchFields.C +++ /dev/null @@ -1,44 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "nonConformalCalculatedFvsPatchFields.H" -#include "fvsPatchFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -makeTemplateFvsPatchTypeField(label, nonConformalCalculated); -makeFvsPatchFields(nonConformalCalculated); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/nonConformalCalculated/nonConformalCalculatedFvsPatchFields.H b/src/finiteVolume/fields/fvsPatchFields/basic/nonConformalCalculated/nonConformalCalculatedFvsPatchFields.H deleted file mode 100644 index 1763961b13..0000000000 --- a/src/finiteVolume/fields/fvsPatchFields/basic/nonConformalCalculated/nonConformalCalculatedFvsPatchFields.H +++ /dev/null @@ -1,50 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#ifndef nonConformalCalculatedFvsPatchFields_H -#define nonConformalCalculatedFvsPatchFields_H - -#include "nonConformalCalculatedFvsPatchField.H" -#include "fieldTypes.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makeFvsPatchTypeFieldTypedef(label, nonConformalCalculated); -makeFvsPatchTypeFieldTypedefs(nonConformalCalculated); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/nonConformalCalculated/nonConformalCalculatedFvsPatchFieldsFwd.H b/src/finiteVolume/fields/fvsPatchFields/basic/nonConformalCalculated/nonConformalCalculatedFvsPatchFieldsFwd.H deleted file mode 100644 index c5073723f8..0000000000 --- a/src/finiteVolume/fields/fvsPatchFields/basic/nonConformalCalculated/nonConformalCalculatedFvsPatchFieldsFwd.H +++ /dev/null @@ -1,56 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -InClass - Foam::nonConformalCalculatedFvsPatchField - -Description - -\*---------------------------------------------------------------------------*/ - -#ifndef nonConformalCalculatedFvsPatchFieldsFwd_H -#define nonConformalCalculatedFvsPatchFieldsFwd_H - -#include "fieldTypes.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -template class nonConformalCalculatedFvsPatchField; - -makeFvsPatchTypeFieldTypedef(label, nonConformalCalculated); -makeFvsPatchTypeFieldTypedefs(nonConformalCalculated); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C index a2ac047943..d39c77ff4f 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ License #include "slicedFvsPatchField.H" -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template Foam::slicedFvsPatchField::slicedFvsPatchField @@ -85,6 +85,8 @@ Foam::slicedFvsPatchField::clone } +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + template Foam::slicedFvsPatchField::~slicedFvsPatchField() { @@ -94,4 +96,14 @@ Foam::slicedFvsPatchField::~slicedFvsPatchField() } +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::slicedFvsPatchField::write(Ostream& os) const +{ + fvsPatchField::write(os); + writeEntry(os, "value", *this); +} + + // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.H index 97eaf134ff..15093217b8 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -116,6 +116,10 @@ public: } + //- Write + virtual void write(Ostream&) const; + + // Member Operators virtual void operator=(const UList&) {} diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/internal/internalFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/internal/internalFvsPatchField.C index 6a228e0129..b3659adc3f 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/internal/internalFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/internal/internalFvsPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -96,4 +96,14 @@ Foam::internalFvsPatchField::internalFvsPatchField {} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::internalFvsPatchField::write(Ostream& os) const +{ + fvsPatchField::write(os); + writeEntry(os, "value", *this); +} + + // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/internal/internalFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/internal/internalFvsPatchField.H index 813a2fca3f..0b613dcde1 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/internal/internalFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/internal/internalFvsPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -107,6 +107,12 @@ public: new internalFvsPatchField(*this, iF) ); } + + + // Member Functions + + //- Write + virtual void write(Ostream&) const; }; diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/nonConformalError/nonConformalErrorFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/nonConformalError/nonConformalErrorFvsPatchField.C index 1f7af58bfa..66976a5ed8 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/nonConformalError/nonConformalErrorFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/nonConformalError/nonConformalErrorFvsPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -97,4 +97,14 @@ Foam::nonConformalErrorFvsPatchField::nonConformalErrorFvsPatchField {} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::nonConformalErrorFvsPatchField::write(Ostream& os) const +{ + fvsPatchField::write(os); + writeEntry(os, "value", *this); +} + + // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/nonConformalError/nonConformalErrorFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/nonConformalError/nonConformalErrorFvsPatchField.H index 40fcc8a8f1..56075b9d90 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/nonConformalError/nonConformalErrorFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/nonConformalError/nonConformalErrorFvsPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -111,6 +111,12 @@ public: new nonConformalErrorFvsPatchField(*this, iF) ); } + + + // Member Functions + + //- Write + virtual void write(Ostream&) const; }; diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.C index 966555f389..7f0c0b3271 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -94,4 +94,14 @@ Foam::symmetryFvsPatchField::symmetryFvsPatchField {} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::symmetryFvsPatchField::write(Ostream& os) const +{ + fvsPatchField::write(os); + writeEntry(os, "value", *this); +} + + // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.H index 89b3779b6a..daf80359eb 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -106,6 +106,12 @@ public: new symmetryFvsPatchField(*this, iF) ); } + + + // Member Functions + + //- Write + virtual void write(Ostream&) const; }; diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.C index fd7ce2c99c..f02e67683a 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -94,4 +94,14 @@ Foam::symmetryPlaneFvsPatchField::symmetryPlaneFvsPatchField {} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::symmetryPlaneFvsPatchField::write(Ostream& os) const +{ + fvsPatchField::write(os); + writeEntry(os, "value", *this); +} + + // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H index 155580c0c4..bd83480270 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -110,6 +110,12 @@ public: new symmetryPlaneFvsPatchField(*this, iF) ); } + + + // Member Functions + + //- Write + virtual void write(Ostream&) const; }; diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.C index d4026652e5..c5121c7368 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -94,4 +94,14 @@ Foam::wedgeFvsPatchField::wedgeFvsPatchField {} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::wedgeFvsPatchField::write(Ostream& os) const +{ + fvsPatchField::write(os); + writeEntry(os, "value", *this); +} + + // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.H index ead056ff11..b5a0dfe7cd 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -106,6 +106,12 @@ public: new wedgeFvsPatchField(*this, iF) ); } + + + // Member Functions + + //- Write + virtual void write(Ostream&) const; }; diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/nonConformalCalculated/nonConformalCalculatedFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/derived/nonConformalPolyFaces/nonConformalPolyFacesFvsPatchLabelField.C similarity index 52% rename from src/finiteVolume/fields/fvsPatchFields/basic/nonConformalCalculated/nonConformalCalculatedFvsPatchField.C rename to src/finiteVolume/fields/fvsPatchFields/derived/nonConformalPolyFaces/nonConformalPolyFacesFvsPatchLabelField.C index cfded8a10d..65af644539 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/nonConformalCalculated/nonConformalCalculatedFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/derived/nonConformalPolyFaces/nonConformalPolyFacesFvsPatchLabelField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,75 +23,83 @@ License \*---------------------------------------------------------------------------*/ -#include "nonConformalCalculatedFvsPatchField.H" +#include "nonConformalPolyFacesFvsPatchLabelField.H" #include "fvPatchFieldMapper.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -Foam::nonConformalCalculatedFvsPatchField:: -nonConformalCalculatedFvsPatchField +Foam::nonConformalPolyFacesFvsPatchLabelField:: +nonConformalPolyFacesFvsPatchLabelField ( const fvPatch& p, - const DimensionedField& iF + const DimensionedField& iF ) : - fvsPatchField(p, iF) + fvsPatchLabelField(p, iF) {} -template -Foam::nonConformalCalculatedFvsPatchField:: -nonConformalCalculatedFvsPatchField +Foam::nonConformalPolyFacesFvsPatchLabelField:: +nonConformalPolyFacesFvsPatchLabelField ( const fvPatch& p, - const DimensionedField& iF, + const DimensionedField& iF, const dictionary& dict ) : - fvsPatchField + fvsPatchLabelField(p, iF, dict, false) +{ + labelField::operator= ( - p, - iF, - Field("value", dict, dict.lookup