From ed83890ec99b9d263b459409c833c93cfac5b269 Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 23 Feb 2023 16:07:19 +0000 Subject: [PATCH 1/6] meshTools/mappedPatches: Put mesh change functions under correct heading --- .../mappedInternalPolyPatch.C | 101 ++++++++--------- .../mappedExtrudedWallPolyPatch.C | 4 +- .../mappedPolyPatch/mappedPolyPatch.C | 104 +++++++++--------- .../mappedPolyPatch/mappedWallPolyPatch.C | 103 ++++++++--------- 4 files changed, 159 insertions(+), 153 deletions(-) diff --git a/src/meshTools/mappedPatches/mappedInternalPolyPatch/mappedInternalPolyPatch.C b/src/meshTools/mappedPatches/mappedInternalPolyPatch/mappedInternalPolyPatch.C index 2c25617ea6..cd05897f73 100644 --- a/src/meshTools/mappedPatches/mappedInternalPolyPatch/mappedInternalPolyPatch.C +++ b/src/meshTools/mappedPatches/mappedInternalPolyPatch/mappedInternalPolyPatch.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) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,57 @@ namespace Foam } -// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +void Foam::mappedInternalPolyPatch::initCalcGeometry(PstreamBuffers& pBufs) +{ + polyPatch::initCalcGeometry(pBufs); +} + + +void Foam::mappedInternalPolyPatch::calcGeometry(PstreamBuffers& pBufs) +{ + polyPatch::calcGeometry(pBufs); + mappedInternalPatchBase::clearOut(); +} + + +void Foam::mappedInternalPolyPatch::initMovePoints +( + PstreamBuffers& pBufs, + const pointField& p +) +{ + polyPatch::initMovePoints(pBufs, p); +} + + +void Foam::mappedInternalPolyPatch::movePoints +( + PstreamBuffers& pBufs, + const pointField& p +) +{ + polyPatch::movePoints(pBufs, p); + mappedInternalPatchBase::clearOut(); +} + + +void Foam::mappedInternalPolyPatch::initTopoChange(PstreamBuffers& pBufs) +{ + polyPatch::initTopoChange(pBufs); +} + + +void Foam::mappedInternalPolyPatch::topoChange(PstreamBuffers& pBufs) +{ + polyPatch::topoChange(pBufs); + mappedInternalPatchBase::clearOut(); +} + + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::mappedInternalPolyPatch::mappedInternalPolyPatch ( @@ -111,53 +161,6 @@ Foam::mappedInternalPolyPatch::~mappedInternalPolyPatch() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::mappedInternalPolyPatch::initCalcGeometry(PstreamBuffers& pBufs) -{ - polyPatch::initCalcGeometry(pBufs); -} - - -void Foam::mappedInternalPolyPatch::calcGeometry(PstreamBuffers& pBufs) -{ - polyPatch::calcGeometry(pBufs); - mappedInternalPatchBase::clearOut(); -} - - -void Foam::mappedInternalPolyPatch::initMovePoints -( - PstreamBuffers& pBufs, - const pointField& p -) -{ - polyPatch::initMovePoints(pBufs, p); -} - - -void Foam::mappedInternalPolyPatch::movePoints -( - PstreamBuffers& pBufs, - const pointField& p -) -{ - polyPatch::movePoints(pBufs, p); - mappedInternalPatchBase::clearOut(); -} - - -void Foam::mappedInternalPolyPatch::initTopoChange(PstreamBuffers& pBufs) -{ - polyPatch::initTopoChange(pBufs); -} - - -void Foam::mappedInternalPolyPatch::topoChange(PstreamBuffers& pBufs) -{ - polyPatch::topoChange(pBufs); - mappedInternalPatchBase::clearOut(); -} - - void Foam::mappedInternalPolyPatch::write(Ostream& os) const { polyPatch::write(os); diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedExtrudedWallPolyPatch.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedExtrudedWallPolyPatch.C index 152816aabe..7a606bd981 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedExtrudedWallPolyPatch.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedExtrudedWallPolyPatch.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) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -216,7 +216,7 @@ Foam::mappedExtrudedWallPolyPatch::patchLocalPoints() const } -// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::mappedExtrudedWallPolyPatch::mappedExtrudedWallPolyPatch ( diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPolyPatch.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPolyPatch.C index c06928ea13..7e61cea890 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPolyPatch.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPolyPatch.C @@ -37,7 +37,59 @@ namespace Foam } -// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +void Foam::mappedPolyPatch::initCalcGeometry(PstreamBuffers& pBufs) +{ + polyPatch::initCalcGeometry(pBufs); +} + + +void Foam::mappedPolyPatch::calcGeometry(PstreamBuffers& pBufs) +{ + polyPatch::calcGeometry(pBufs); + mappedPatchBase::clearOut(); +} + + +void Foam::mappedPolyPatch::initMovePoints +( + PstreamBuffers& pBufs, + const pointField& p +) +{ + polyPatch::initMovePoints(pBufs, p); +} + + +void Foam::mappedPolyPatch::movePoints +( + PstreamBuffers& pBufs, + const pointField& p +) +{ + polyPatch::movePoints(pBufs, p); + if (reMapAfterMove_) + { + mappedPatchBase::clearOut(); + } +} + + +void Foam::mappedPolyPatch::initTopoChange(PstreamBuffers& pBufs) +{ + polyPatch::initTopoChange(pBufs); +} + + +void Foam::mappedPolyPatch::topoChange(PstreamBuffers& pBufs) +{ + polyPatch::topoChange(pBufs); + mappedPatchBase::clearOut(); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::mappedPolyPatch::mappedPolyPatch ( @@ -117,56 +169,6 @@ Foam::mappedPolyPatch::~mappedPolyPatch() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::mappedPolyPatch::initCalcGeometry(PstreamBuffers& pBufs) -{ - polyPatch::initCalcGeometry(pBufs); -} - - -void Foam::mappedPolyPatch::calcGeometry(PstreamBuffers& pBufs) -{ - polyPatch::calcGeometry(pBufs); - mappedPatchBase::clearOut(); -} - - -void Foam::mappedPolyPatch::initMovePoints -( - PstreamBuffers& pBufs, - const pointField& p -) -{ - polyPatch::initMovePoints(pBufs, p); -} - - -void Foam::mappedPolyPatch::movePoints -( - PstreamBuffers& pBufs, - const pointField& p -) -{ - polyPatch::movePoints(pBufs, p); - if (reMapAfterMove_) - { - mappedPatchBase::clearOut(); - } -} - - -void Foam::mappedPolyPatch::initTopoChange(PstreamBuffers& pBufs) -{ - polyPatch::initTopoChange(pBufs); -} - - -void Foam::mappedPolyPatch::topoChange(PstreamBuffers& pBufs) -{ - polyPatch::topoChange(pBufs); - mappedPatchBase::clearOut(); -} - - void Foam::mappedPolyPatch::write(Ostream& os) const { polyPatch::write(os); diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C index 9be1b14278..ea1773dcfc 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C @@ -42,8 +42,59 @@ namespace Foam ); } +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * // +void Foam::mappedWallPolyPatch::initCalcGeometry(PstreamBuffers& pBufs) +{ + wallPolyPatch::initCalcGeometry(pBufs); +} + + +void Foam::mappedWallPolyPatch::calcGeometry(PstreamBuffers& pBufs) +{ + wallPolyPatch::calcGeometry(pBufs); + mappedPatchBase::clearOut(); +} + + +void Foam::mappedWallPolyPatch::initMovePoints +( + PstreamBuffers& pBufs, + const pointField& p +) +{ + wallPolyPatch::initMovePoints(pBufs, p); +} + + +void Foam::mappedWallPolyPatch::movePoints +( + PstreamBuffers& pBufs, + const pointField& p +) +{ + wallPolyPatch::movePoints(pBufs, p); + if (reMapAfterMove_) + { + mappedPatchBase::clearOut(); + } +} + + +void Foam::mappedWallPolyPatch::initTopoChange(PstreamBuffers& pBufs) +{ + wallPolyPatch::initTopoChange(pBufs); +} + + +void Foam::mappedWallPolyPatch::topoChange(PstreamBuffers& pBufs) +{ + wallPolyPatch::topoChange(pBufs); + mappedPatchBase::clearOut(); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::mappedWallPolyPatch::mappedWallPolyPatch ( @@ -146,56 +197,6 @@ Foam::mappedWallPolyPatch::~mappedWallPolyPatch() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::mappedWallPolyPatch::initCalcGeometry(PstreamBuffers& pBufs) -{ - wallPolyPatch::initCalcGeometry(pBufs); -} - - -void Foam::mappedWallPolyPatch::calcGeometry(PstreamBuffers& pBufs) -{ - wallPolyPatch::calcGeometry(pBufs); - mappedPatchBase::clearOut(); -} - - -void Foam::mappedWallPolyPatch::initMovePoints -( - PstreamBuffers& pBufs, - const pointField& p -) -{ - wallPolyPatch::initMovePoints(pBufs, p); -} - - -void Foam::mappedWallPolyPatch::movePoints -( - PstreamBuffers& pBufs, - const pointField& p -) -{ - wallPolyPatch::movePoints(pBufs, p); - if (reMapAfterMove_) - { - mappedPatchBase::clearOut(); - } -} - - -void Foam::mappedWallPolyPatch::initTopoChange(PstreamBuffers& pBufs) -{ - wallPolyPatch::initTopoChange(pBufs); -} - - -void Foam::mappedWallPolyPatch::topoChange(PstreamBuffers& pBufs) -{ - wallPolyPatch::topoChange(pBufs); - mappedPatchBase::clearOut(); -} - - void Foam::mappedWallPolyPatch::write(Ostream& os) const { wallPolyPatch::write(os); From c7a69ef8285df4c1fe94fb2d739d8542f220997a Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Fri, 24 Feb 2023 13:37:25 +0000 Subject: [PATCH 2/6] meshTools/nonConformal: Minor reorganisation --- src/meshTools/Make/files | 2 +- .../boundary}/nonConformalBoundary.C | 0 .../boundary}/nonConformalBoundary.H | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename src/meshTools/{nonConformalBoundary => nonConformal/boundary}/nonConformalBoundary.C (100%) rename src/meshTools/{nonConformalBoundary => nonConformal/boundary}/nonConformalBoundary.H (98%) diff --git a/src/meshTools/Make/files b/src/meshTools/Make/files index 9b483128df..e260435c39 100644 --- a/src/meshTools/Make/files +++ b/src/meshTools/Make/files @@ -266,6 +266,6 @@ nonConformal/pointPatchFields/nonConformalCyclic/nonConformalCyclicPointPatchFie nonConformal/pointPatchFields/nonConformalError/nonConformalErrorPointPatchFields.C nonConformal/pointPatchFields/nonConformalProcessorCyclic/nonConformalProcessorCyclicPointPatchFields.C -nonConformalBoundary/nonConformalBoundary.C +nonConformal/boundary/nonConformalBoundary.C LIB = $(FOAM_LIBBIN)/libmeshTools diff --git a/src/meshTools/nonConformalBoundary/nonConformalBoundary.C b/src/meshTools/nonConformal/boundary/nonConformalBoundary.C similarity index 100% rename from src/meshTools/nonConformalBoundary/nonConformalBoundary.C rename to src/meshTools/nonConformal/boundary/nonConformalBoundary.C diff --git a/src/meshTools/nonConformalBoundary/nonConformalBoundary.H b/src/meshTools/nonConformal/boundary/nonConformalBoundary.H similarity index 98% rename from src/meshTools/nonConformalBoundary/nonConformalBoundary.H rename to src/meshTools/nonConformal/boundary/nonConformalBoundary.H index 69dc323e0f..8e0fcbeecb 100644 --- a/src/meshTools/nonConformalBoundary/nonConformalBoundary.H +++ b/src/meshTools/nonConformal/boundary/nonConformalBoundary.H @@ -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) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License From ac1d67754aa1289b410d733768c7f0dcd3ac447f Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Fri, 24 Feb 2023 14:49:52 +0000 Subject: [PATCH 3/6] GeometricBoundaryField::reset: Removed field dereference This permits this function to be applied to boundary fields without a valid reference to an internal field --- .../GeometricField/GeometricBoundaryField.C | 15 +++++++++++---- .../GeometricField/GeometricBoundaryField.H | 8 ++------ .../GeometricField/GeometricField.C | 4 ++-- 3 files changed, 15 insertions(+), 12 deletions(-) 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(); } From 2e93d37b906a4e842cd126acaa1d86401a8c6fc5 Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Fri, 24 Feb 2023 14:30:08 +0000 Subject: [PATCH 4/6] nonConformal: Use explicit patch fields in fvMesh/polyFaces field This permits further non-conformal connnection types to store additional or alternative information in the fvMesh::polyFacesBf patch fields. Previously, this field just used calculated patch fields types. This change has required an update to the fvsPatchFields to make their handling of IO of the value field consistent with the fvPatchFields. The base class no longer writes out the value field by default. --- src/finiteVolume/Make/files | 5 +- .../basicSymmetry/basicSymmetryFvPatchField.C | 3 +- .../basic/coupled/coupledFvPatchField.C | 4 +- .../fixedGradient/fixedGradientFvPatchField.C | 2 +- .../basic/fixedValue/fixedValueFvPatchField.C | 4 +- .../basic/mixed/mixedFvPatchField.C | 2 +- .../basic/sliced/slicedFvPatchField.C | 18 +-- .../basic/sliced/slicedFvPatchField.H | 10 +- .../basic/transform/transformFvPatchField.C | 4 +- .../zeroGradient/zeroGradientFvPatchField.C | 4 +- .../calculated/calculatedFvsPatchField.C | 13 +- .../calculated/calculatedFvsPatchField.H | 5 + .../basic/coupled/coupledFvsPatchField.C | 14 +- .../basic/coupled/coupledFvsPatchField.H | 5 +- .../fixedValue/fixedValueFvsPatchField.C | 43 +----- .../fixedValue/fixedValueFvsPatchField.H | 27 +--- .../nonConformalCalculatedFvsPatchFields.C | 44 ------ .../nonConformalCalculatedFvsPatchFields.H | 50 ------- .../nonConformalCalculatedFvsPatchFieldsFwd.H | 56 -------- .../basic/sliced/slicedFvsPatchField.C | 16 ++- .../basic/sliced/slicedFvsPatchField.H | 6 +- .../internal/internalFvsPatchField.C | 12 +- .../internal/internalFvsPatchField.H | 8 +- .../nonConformalErrorFvsPatchField.C | 12 +- .../nonConformalErrorFvsPatchField.H | 8 +- .../symmetry/symmetryFvsPatchField.C | 12 +- .../symmetry/symmetryFvsPatchField.H | 8 +- .../symmetryPlaneFvsPatchField.C | 12 +- .../symmetryPlaneFvsPatchField.H | 8 +- .../constraint/wedge/wedgeFvsPatchField.C | 12 +- .../constraint/wedge/wedgeFvsPatchField.H | 8 +- ...nonConformalPolyFacesFvsPatchLabelField.C} | 74 ++++++----- ...nonConformalPolyFacesFvsPatchLabelField.H} | 73 ++++------ .../polyFaces/polyFacesFvsPatchLabelField.C | 103 +++++++++++++++ .../polyFaces/polyFacesFvsPatchLabelField.H | 125 ++++++++++++++++++ .../fvsPatchField/fvsPatchField.C | 66 +++++---- .../fvsPatchField/fvsPatchField.H | 6 +- src/finiteVolume/fvMesh/fvMesh.C | 27 +--- .../fvMeshStitcher/fvMeshStitcher.C | 19 +-- 39 files changed, 522 insertions(+), 406 deletions(-) delete mode 100644 src/finiteVolume/fields/fvsPatchFields/basic/nonConformalCalculated/nonConformalCalculatedFvsPatchFields.C delete mode 100644 src/finiteVolume/fields/fvsPatchFields/basic/nonConformalCalculated/nonConformalCalculatedFvsPatchFields.H delete mode 100644 src/finiteVolume/fields/fvsPatchFields/basic/nonConformalCalculated/nonConformalCalculatedFvsPatchFieldsFwd.H rename src/finiteVolume/fields/fvsPatchFields/{basic/nonConformalCalculated/nonConformalCalculatedFvsPatchField.C => derived/nonConformalPolyFaces/nonConformalPolyFacesFvsPatchLabelField.C} (52%) rename src/finiteVolume/fields/fvsPatchFields/{basic/nonConformalCalculated/nonConformalCalculatedFvsPatchField.H => derived/nonConformalPolyFaces/nonConformalPolyFacesFvsPatchLabelField.H} (58%) create mode 100644 src/finiteVolume/fields/fvsPatchFields/derived/polyFaces/polyFacesFvsPatchLabelField.C create mode 100644 src/finiteVolume/fields/fvsPatchFields/derived/polyFaces/polyFacesFvsPatchLabelField.H 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