diff --git a/applications/test/slicedField/Make/options b/applications/test/slicedField/Make/options index d27c95d033..bbfa2b552d 100644 --- a/applications/test/slicedField/Make/options +++ b/applications/test/slicedField/Make/options @@ -1,7 +1,9 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/finiteArea/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ -lfiniteVolume \ + -lfiniteArea \ -lmeshTools diff --git a/applications/test/slicedField/Test-slicedField.C b/applications/test/slicedField/Test-slicedField.C index 23a18bc491..a7e85d1c0f 100644 --- a/applications/test/slicedField/Test-slicedField.C +++ b/applications/test/slicedField/Test-slicedField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,31 +35,86 @@ Description #include "SlicedGeometricField.H" #include "slicedFvPatchFields.H" #include "slicedSurfaceFields.H" +#include "slicedVolFields.H" + +#include "areaFaMesh.H" +#include "areaFields.H" +#include "edgeFields.H" +#include "slicedAreaFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { + argList::addBoolOption + ( + "finite-area", + "Test finite-area mesh/fields" + ); #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" - Info<< "Reading field p\n" << endl; - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + if (args.found("finite-area")) + { + autoPtr faMeshPtr(faMesh::TryNew(mesh)); - //Info<< min(p, p); + if (!faMeshPtr) + { + Info<< "Stop: no finiteArea" << nl; + return 0; + } + + auto& aMesh = faMeshPtr(); + + Info<< "Test with finiteArea" << nl; + + (void)aMesh.areaCentres(), + (void)aMesh.faceAreaNormals(); + + vectorField flatBoundary(aMesh.nBoundaryEdges(), Zero); + + { + const auto& bfld = aMesh.faceAreaNormals().boundaryField(); + + forAll(aMesh.boundary(), patchi) + { + const auto& src = bfld[patchi]; + const auto& p = aMesh.boundary()[patchi]; + + vectorList::subList out = p.boundarySlice(flatBoundary); + + if (out.size() == src.size()) + { + out = src; + } + } + } + flatBoundary *= 100; + + + slicedAreaVectorField foo + ( + IOobject + ( + "centres", + runTime.timeName(), + aMesh.thisDb(), + IOobject::NO_REGISTER + ), + aMesh, + dimLength, + aMesh.areaCentres(), + flatBoundary + ); + + Info<< "Weird combination of centres and normals!" << nl << nl; + foo.writeData(Info.stream()); + + Info<< "Done" << nl; + return 0; + } Info<< "Reading field U\n" << endl; volVectorField U @@ -67,15 +123,13 @@ int main(int argc, char *argv[]) ( "U", runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE + mesh.thisDb(), + IOobject::MUST_READ ), mesh ); - SlicedGeometricField - C + slicedVolVectorField C ( IOobject ( @@ -92,14 +146,7 @@ int main(int argc, char *argv[]) Info<< C << endl; Info<< (C & U) << endl; - SlicedGeometricField - < - vector, - fvsPatchField, - slicedFvsPatchField, - surfaceMesh - > - Sf + slicedSurfaceVectorField Sf ( IOobject ( diff --git a/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.C b/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.C index 5b552e009b..efa92277d2 100644 --- a/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2022 OpenCFD Ltd. + Copyright (C) 2022-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,7 +27,6 @@ License \*---------------------------------------------------------------------------*/ #include "SlicedGeometricField.H" -#include "processorFvPatch.H" // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * * // @@ -38,41 +37,67 @@ template template class SlicedPatchField, class GeoMesh > -Foam::tmp> +bool Foam::SlicedGeometricField:: -slicedBoundaryField +isBoundaryAddressing ( const Mesh& mesh, - const Field& completeField, - const bool preserveCouples, - const bool preserveProcessorOnly + const label fieldSize ) { + label maxAddress(0); + + if (!mesh.boundary().empty()) + { + const auto& p = mesh.boundary().back(); + maxAddress = (p.start() + p.size()); + } + + // If field size appear to not include internal field + return (fieldSize < maxAddress); +} + + +template +< + class Type, + template class PatchField, + template class SlicedPatchField, + class GeoMesh +> +Foam::tmp> +Foam::SlicedGeometricField:: +makeBoundary +( + const Mesh& mesh, + const Field& completeOrBoundaryField, + const bool preserveCouples, + const bool preserveProcessorOnly, + const bool isBoundaryOnly +) const +{ + typedef typename + SlicedPatchField::processorPatchType + processorPatchType; + auto tbf = tmp>::New(mesh.boundary().size()); auto& bf = tbf.ref(); forAll(mesh.boundary(), patchi) { + const auto& p = mesh.boundary()[patchi]; + if ( - preserveCouples - && mesh.boundary()[patchi].coupled() - && ( - !preserveProcessorOnly - || isA(mesh.boundary()[patchi]) - ) + preserveCouples && p.coupled() + && (!preserveProcessorOnly || isA(p)) ) { // For coupled patched construct the correct patch field type bf.set ( patchi, - PatchField::New - ( - mesh.boundary()[patchi].type(), - mesh.boundary()[patchi], - *this - ) + PatchField::New(p.type(), p, *this) ); // Initialize the values on the coupled patch to those of the slice @@ -81,9 +106,10 @@ slicedBoundaryField // evaluation e.g. in the case of processor and cyclic patches. bf[patchi] = SlicedPatchField ( - mesh.boundary()[patchi], + p, DimensionedField::null(), - completeField + completeOrBoundaryField, + isBoundaryOnly ); } else @@ -93,9 +119,10 @@ slicedBoundaryField patchi, new SlicedPatchField ( - mesh.boundary()[patchi], + p, DimensionedField::null(), - completeField + completeOrBoundaryField, + isBoundaryOnly ) ); } @@ -114,30 +141,27 @@ template > Foam::tmp> Foam::SlicedGeometricField:: -slicedBoundaryField +makeBoundary ( const Mesh& mesh, const FieldField& bField, const bool preserveCouples -) +) const { auto tbf = tmp>::New(mesh.boundary().size()); auto& bf = tbf.ref(); forAll(mesh.boundary(), patchi) { - if (preserveCouples && mesh.boundary()[patchi].coupled()) + const auto& p = mesh.boundary()[patchi]; + + if (preserveCouples && p.coupled()) { // For coupled patched construct the correct patch field type bf.set ( patchi, - PatchField::New - ( - mesh.boundary()[patchi].type(), - mesh.boundary()[patchi], - *this - ) + PatchField::New(p.type(), p, *this) ); // Assign field @@ -151,7 +175,7 @@ slicedBoundaryField patchi, new SlicedPatchField ( - mesh.boundary()[patchi], + p, DimensionedField::null(), bField[patchi] ) @@ -188,7 +212,9 @@ SlicedGeometricField mesh, ds, Field(), - slicedBoundaryField(mesh, completeField, preserveCouples) + // preserveProcessorOnly = false + // isBoundaryOnly = false + makeBoundary(mesh, completeField, preserveCouples) ) { // Set internalField to the slice of the complete field @@ -226,12 +252,13 @@ SlicedGeometricField mesh, ds, Field(), - slicedBoundaryField + makeBoundary ( mesh, completeBField, preserveCouples, - preserveProcessorOnly + preserveProcessorOnly, + isBoundaryAddressing(mesh, completeBField.size()) ) ) { @@ -266,7 +293,7 @@ SlicedGeometricField gf.mesh(), gf.dimensions(), Field(), - slicedBoundaryField(gf.mesh(), gf.boundaryField(), preserveCouples) + makeBoundary(gf.mesh(), gf.boundaryField(), preserveCouples) ) { // Set internalField to the internal field @@ -295,7 +322,8 @@ SlicedGeometricField gf.mesh(), gf.dimensions(), Field(), - slicedBoundaryField(gf.mesh(), gf.boundaryField(), true) + // preserveCouples = true + makeBoundary(gf.mesh(), gf.boundaryField(), true) ) { // Set internalField to the internal field diff --git a/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.H b/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.H index 85448c2c7b..1ae1df29a8 100644 --- a/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.H +++ b/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017,2022 OpenFOAM Foundation + Copyright (C) 2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -83,26 +84,32 @@ private: // Private Member Functions - //- Slice the given field and a create a PtrList of SlicedPatchField - // from which the boundary field is built - tmp> - slicedBoundaryField - ( - const Mesh& mesh, - const Field& completeField, - const bool preserveCouples, - const bool preserveProcessorOnly = false - ); + //- Return true if field size is too small to be the complete field + //- (ie, it must be boundary field addressing) + static bool + isBoundaryAddressing(const Mesh& mesh, const label fieldSize); //- Slice the given field and a create a PtrList of SlicedPatchField // from which the boundary field is built tmp> - slicedBoundaryField + makeBoundary + ( + const Mesh& mesh, + const Field& completeOrBoundaryField, + const bool preserveCouples, + const bool preserveProcessorOnly = false, + const bool isBoundaryOnly = false + ) const; + + //- Slice the given field and a create a PtrList of SlicedPatchField + // from which the boundary field is built + tmp> + makeBoundary ( const Mesh& mesh, const FieldField& bField, const bool preserveCouples - ); + ) const; // Note - copy construct allowed @@ -135,7 +142,7 @@ public: const Mesh&, const dimensionSet&, const Field& completeField, - const bool preserveCouples=true + const bool preserveCouples = true ); //- Construct from components and separate fields to slice for the @@ -147,7 +154,7 @@ public: const dimensionSet&, const Field& completeIField, const Field& completeBField, - const bool preserveCouples=true, + const bool preserveCouples = true, const bool preserveProcessorOnly = false ); @@ -157,7 +164,7 @@ public: ( const IOobject&, const GeometricField&, - const bool preserveCouples=true + const bool preserveCouples = true ); //- Copy construct diff --git a/src/finiteArea/Make/files b/src/finiteArea/Make/files index 8bcad5e551..3743ff8522 100644 --- a/src/finiteArea/Make/files +++ b/src/finiteArea/Make/files @@ -49,6 +49,7 @@ $(basicFaPatchFields)/zeroGradient/zeroGradientFaPatchFields.C $(basicFaPatchFields)/fixedValue/fixedValueFaPatchFields.C $(basicFaPatchFields)/fixedGradient/fixedGradientFaPatchFields.C $(basicFaPatchFields)/mixed/mixedFaPatchFields.C +$(basicFaPatchFields)/sliced/slicedFaPatchFields.C $(basicFaPatchFields)/transform/transformFaPatchFields.C constraintFaPatchFields = $(faPatchFields)/constraint @@ -74,6 +75,7 @@ basicFaePatchFields = $(faePatchFields)/basic $(basicFaePatchFields)/calculated/calculatedFaePatchFields.C $(basicFaePatchFields)/coupled/coupledFaePatchFields.C $(basicFaePatchFields)/fixedValue/fixedValueFaePatchFields.C +$(basicFaePatchFields)/sliced/slicedFaePatchFields.C constraintFaePatchFields = $(faePatchFields)/constraint $(constraintFaePatchFields)/empty/emptyFaePatchFields.C diff --git a/src/finiteArea/fields/areaFields/slicedAreaFields.H b/src/finiteArea/fields/areaFields/slicedAreaFields.H new file mode 100644 index 0000000000..f5cec36421 --- /dev/null +++ b/src/finiteArea/fields/areaFields/slicedAreaFields.H @@ -0,0 +1,41 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2023 OpenCFD Ltd. +------------------------------------------------------------------------------- +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::slicedAreaFields + +\*---------------------------------------------------------------------------*/ + +#ifndef Foam_slicedAreaFields_H +#define Foam_slicedAreaFields_H + +#include "SlicedGeometricField.H" +#include "slicedFaPatchField.H" +#include "areaFaMesh.H" +#include "slicedAreaFieldsFwd.H" + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/areaFields/slicedAreaFieldsFwd.H b/src/finiteArea/fields/areaFields/slicedAreaFieldsFwd.H new file mode 100644 index 0000000000..1858c28472 --- /dev/null +++ b/src/finiteArea/fields/areaFields/slicedAreaFieldsFwd.H @@ -0,0 +1,99 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2023 OpenCFD Ltd. +------------------------------------------------------------------------------- +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 . + +Description + Forwards and collection of common sliced area field types + +\*---------------------------------------------------------------------------*/ + +#ifndef Foam_slicedAreaFieldsFwd_H +#define Foam_slicedAreaFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template +< + class Type, + template class PatchField, + template class SlicedPatchField, + class GeoMesh +> +class SlicedGeometricField; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Forward Declarations +class areaMesh; +template class faPatchField; +template class slicedFaPatchField; + +//- An aree field slice for a given type +template +using AreaSliceField = +SlicedGeometricField; + + +// Typedefs + +typedef + SlicedGeometricField + + slicedAreaScalarField; + +typedef + SlicedGeometricField + + slicedAreaVectorField; + +typedef + SlicedGeometricField + + slicedAreaSphericalTensorField; + +typedef + SlicedGeometricField + + slicedAreaSymmTensorField; + +typedef + SlicedGeometricField + + slicedAreaTensorField; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/edgeFields/slicedEdgeFields.H b/src/finiteArea/fields/edgeFields/slicedEdgeFields.H new file mode 100644 index 0000000000..57c0e696c9 --- /dev/null +++ b/src/finiteArea/fields/edgeFields/slicedEdgeFields.H @@ -0,0 +1,98 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2023 OpenCFD Ltd. +------------------------------------------------------------------------------- +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::slicedEdgeFields + +\*---------------------------------------------------------------------------*/ + +#ifndef Foam_slicedEdgeFields_H +#define Foam_slicedEdgeFields_H + +#include "SlicedGeometricField.H" +#include "slicedFaePatchField.H" +#include "edgeFaMesh.H" +#include "slicedEdgeFieldsFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<> +inline void +SlicedGeometricField:: +correctBoundaryConditions() +{} + +template<> +inline void +SlicedGeometricField:: +correctBoundaryConditions() +{} + +template<> +inline void +SlicedGeometricField +< + sphericalTensor, + faePatchField, + slicedFaePatchField, + edgeMesh +>:: +correctBoundaryConditions() +{} + +template<> +inline void +SlicedGeometricField +< + symmTensor, + faePatchField, + slicedFaePatchField, + edgeMesh +>:: +correctBoundaryConditions() +{} + +template<> +inline void +SlicedGeometricField:: +correctBoundaryConditions() +{} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/edgeFields/slicedEdgeFieldsFwd.H b/src/finiteArea/fields/edgeFields/slicedEdgeFieldsFwd.H new file mode 100644 index 0000000000..7716749d68 --- /dev/null +++ b/src/finiteArea/fields/edgeFields/slicedEdgeFieldsFwd.H @@ -0,0 +1,101 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2023 OpenCFD Ltd. +------------------------------------------------------------------------------- +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 . + +Description + Forwards and collection of common sliced edge field types + +\*---------------------------------------------------------------------------*/ + +#ifndef Foam_slicedEdgeFieldsFwd_H +#define Foam_slicedEdgeFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template +< + class Type, + template class PatchField, + template class SlicedPatchField, + class GeoMesh +> +class SlicedGeometricField; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Forward Declarations +class edgeMesh; +template class faePatchField; +template class slicedFaePatchField; + + +//- A (volume) surface field slice for a given type +template +using EdgeSliceField = +SlicedGeometricField; + + +// Typedefs + +typedef + SlicedGeometricField + + slicedEdgeScalarField; + +typedef + SlicedGeometricField + + slicedEdgeVectorField; + +typedef + SlicedGeometricField + + slicedEdgeSphericalTensorField; + +typedef + SlicedGeometricField + + slicedEdgeSymmTensorField; + +typedef + SlicedGeometricField + + slicedEdgeTensorField; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.C new file mode 100644 index 0000000000..06bc08d8e9 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.C @@ -0,0 +1,272 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2023 OpenCFD Ltd. +------------------------------------------------------------------------------- +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 "slicedFaPatchField.H" + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +Foam::slicedFaPatchField::slicedFaPatchField +( + const faPatch& p, + const DimensionedField& iF, + const Field& completeOrBoundaryField, + const bool isBoundaryOnly +) +: + faPatchField(p, iF, Field()) +{ + if (isBoundaryOnly) + { + // Set to a slice of the boundary field + UList::shallowCopy(p.boundarySlice(completeOrBoundaryField)); + } + else + { + // Set to a slice of the complete field + UList::shallowCopy(p.patchSlice(completeOrBoundaryField)); + } +} + + +template +Foam::slicedFaPatchField::slicedFaPatchField +( + const faPatch& p, + const DimensionedField& iF +) +: + faPatchField(p, iF, Field()) +{} + + +template +Foam::slicedFaPatchField::slicedFaPatchField +( + const faPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + faPatchField(p, iF) // bypass dictionary constructor +{ + faPatchFieldBase::readDict(dict); + // Read "value" if present... + + NotImplemented; +} + + +template +Foam::slicedFaPatchField::slicedFaPatchField +( + const slicedFaPatchField& ptf, + const faPatch& p, + const DimensionedField& iF, + const faPatchFieldMapper& mapper +) +: + faPatchField(ptf, p, iF, mapper) +{ + NotImplemented; +} + + +template +Foam::slicedFaPatchField::slicedFaPatchField +( + const slicedFaPatchField& ptf, + const DimensionedField& iF +) +: + faPatchField(ptf.patch(), iF, Field()) +{ + // Transfer the slice from the argument + UList::shallowCopy(ptf); +} + + +template +Foam::tmp> +Foam::slicedFaPatchField::clone() const +{ + return tmp> + ( + new slicedFaPatchField(*this) + ); +} + + +template +Foam::slicedFaPatchField::slicedFaPatchField +( + const slicedFaPatchField& ptf +) +: + faPatchField + ( + ptf.patch(), + ptf.internalField(), + Field() + ) +{ + // Transfer the slice from the argument + UList::shallowCopy(ptf); +} + + +template +Foam::tmp> +Foam::slicedFaPatchField::clone +( + const DimensionedField& iF +) const +{ + return tmp> + ( + new slicedFaPatchField(*this, iF) + ); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template +Foam::slicedFaPatchField::~slicedFaPatchField() +{ + // Set to nullptr to avoid deletion of underlying field + UList::shallowCopy(UList()); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +Foam::tmp> Foam::slicedFaPatchField::snGrad() const +{ + NotImplemented; + + return Field::null(); +} + + +template +Foam::tmp> +Foam::slicedFaPatchField::patchInternalField() const +{ + NotImplemented; + + return Field::null(); +} + + +template +void Foam::slicedFaPatchField::patchInternalField(Field&) const +{ + NotImplemented; +} + + +template +Foam::tmp> +Foam::slicedFaPatchField::patchNeighbourField +( + const Field& iField +) const +{ + NotImplemented; + + return Field::null(); +} + + +template +Foam::tmp> +Foam::slicedFaPatchField::patchNeighbourField() const +{ + NotImplemented; + + return Field::null(); +} + + +template +Foam::tmp> +Foam::slicedFaPatchField::valueInternalCoeffs +( + const tmp& +) const +{ + NotImplemented; + + return Field::null(); +} + + +template +Foam::tmp> +Foam::slicedFaPatchField::valueBoundaryCoeffs +( + const tmp& +) const +{ + NotImplemented; + + return Field::null(); +} + + +template +Foam::tmp> +Foam::slicedFaPatchField::gradientInternalCoeffs() const +{ + NotImplemented; + + return Field::null(); +} + + +template +Foam::tmp> +Foam::slicedFaPatchField::gradientBoundaryCoeffs() const +{ + NotImplemented; + + return Field::null(); +} + + +template +void Foam::slicedFaPatchField::write(Ostream& os) const +{ + faPatchField::write(os); + this->writeEntry("value", os); +} + + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.H new file mode 100644 index 0000000000..32f1b350a1 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchField.H @@ -0,0 +1,253 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2023 OpenCFD Ltd. +------------------------------------------------------------------------------- +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 . + +Class + Foam::slicedFaPatchField + +Group + grpGenericBoundaryConditions + +Description + Specialization of faPatchField which creates the underlying + faPatchField as a slice of the given complete field. + + The destructor is wrapped to avoid deallocation of the storage of the + complete fields when this is destroyed. + + Should only used as a template argument for SlicedGeometricField. + +See also + Foam::faPatchField + +SourceFiles + slicedFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Foam_slicedFaPatchField_H +#define Foam_slicedFaPatchField_H + +#include "faPatchField.H" +#include "processorFaPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class slicedFaPatchField Declaration +\*---------------------------------------------------------------------------*/ + +template +class slicedFaPatchField +: + public faPatchField +{ +public: + + //- Type for the mesh processor patch + typedef processorFaPatch processorPatchType; + + + //- Runtime type information + TypeName("sliced"); + + + // Constructors + + //- Construct from patch, internal field and field to slice + slicedFaPatchField + ( + const faPatch&, + const DimensionedField&, + const Field& completeOrBoundaryField, + const bool isBoundaryOnly = false + ); + + //- Construct from patch and internal field. Assign value later. + slicedFaPatchField + ( + const faPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + slicedFaPatchField + ( + const faPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping the given slicedFaPatchField + // onto a new patch + slicedFaPatchField + ( + const slicedFaPatchField&, + const faPatch&, + const DimensionedField&, + const faPatchFieldMapper& + ); + + //- Construct as copy + slicedFaPatchField(const slicedFaPatchField&); + + //- Construct and return a clone + virtual tmp> clone() const; + + //- Construct as copy setting internal field reference + slicedFaPatchField + ( + const slicedFaPatchField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp> clone + ( + const DimensionedField& iF + ) const; + + + //- Destructor + virtual ~slicedFaPatchField(); + + + // Member Functions + + // Attributes + + //- True: this patch field fixes a value. + virtual bool fixesValue() const { return true; } + + //- False: this patch field is not altered by assignment + virtual bool assignable() const { return false; } + + + // Evaluation functions + + //- Return patch-normal gradient + virtual tmp> snGrad() const; + + //- Return internal field next to patch as patch field + virtual tmp> patchInternalField() const; + + //- Return internal field next to patch as patch field + virtual void patchInternalField(Field&) const; + + //- Return neighbour coupled given internal cell data + virtual tmp> patchNeighbourField + ( + const Field& iField + ) const; + + //- Return patchField of the values on the patch or on the + // opposite patch + virtual tmp> patchNeighbourField() const; + + //- Initialise the evaluation of the patch field + virtual void initEvaluate + ( + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking + ) + {} + + //- Evaluate the patch field, sets Updated to false + virtual void evaluate + ( + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking + ) + {} + + //- 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 + + virtual void operator=(const UList&) {} + + virtual void operator=(const faPatchField&) {} + virtual void operator+=(const faPatchField&) {} + virtual void operator-=(const faPatchField&) {} + virtual void operator*=(const faPatchField&) {} + virtual void operator/=(const faPatchField&) {} + + virtual void operator+=(const Field&) {} + virtual void operator-=(const Field&) {} + + virtual void operator*=(const Field&) {} + virtual void operator/=(const Field&) {} + + virtual void operator=(const Type&) {} + virtual void operator+=(const Type&) {} + virtual void operator-=(const Type&) {} + virtual void operator*=(const scalar) {} + virtual void operator/=(const scalar) {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "slicedFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchFields.C b/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchFields.C new file mode 100644 index 0000000000..895d2c39f2 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchFields.C @@ -0,0 +1,39 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2023 OpenCFD Ltd. +------------------------------------------------------------------------------- +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 "slicedFaPatchFields.H" +#include "addToRunTimeSelectionTable.H" +#include "areaFields.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + makeFaPatchFieldsTypeName(sliced); +} + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchFields.H b/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchFields.H new file mode 100644 index 0000000000..187c7c10bf --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/sliced/slicedFaPatchFields.H @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2023 OpenCFD Ltd. +------------------------------------------------------------------------------- +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 Foam_slicedFaPatchFields_H +#define Foam_slicedFaPatchFields_H + +#include "slicedFaPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(sliced); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchField.C b/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchField.C new file mode 100644 index 0000000000..6ddf22fb42 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchField.C @@ -0,0 +1,167 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2023 OpenCFD Ltd. +------------------------------------------------------------------------------- +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 "slicedFaePatchField.H" + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +Foam::slicedFaePatchField::slicedFaePatchField +( + const faPatch& p, + const DimensionedField& iF, + const Field& completeOrBoundaryField, + const bool isBoundaryOnly +) +: + faePatchField(p, iF, Field()) +{ + if (isBoundaryOnly) + { + // Set to a slice of the boundary field + UList::shallowCopy(p.boundarySlice(completeOrBoundaryField)); + } + else + { + // Set to a slice of the complete field + UList::shallowCopy(p.patchSlice(completeOrBoundaryField)); + } +} + + +template +Foam::slicedFaePatchField::slicedFaePatchField +( + const faPatch& p, + const DimensionedField& iF +) +: + faePatchField(p, iF) +{} + + +template +Foam::slicedFaePatchField::slicedFaePatchField +( + const faPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + faePatchField(p, iF) // bypass dictionary constructor +{ + faePatchFieldBase::readDict(dict); + // Read "value" if present... + + NotImplemented; +} + + +template +Foam::slicedFaePatchField::slicedFaePatchField +( + const slicedFaePatchField& ptf, + const faPatch& p, + const DimensionedField& iF, + const faPatchFieldMapper& mapper +) +: + faePatchField(ptf, p, iF, mapper) +{ + NotImplemented; +} + + +template +Foam::slicedFaePatchField::slicedFaePatchField +( + const slicedFaePatchField& ptf, + const DimensionedField& iF +) +: + faePatchField(ptf.patch(), iF, Field()) +{ + // Transfer the slice from the argument + UList::shallowCopy(ptf); +} + + +template +Foam::tmp> +Foam::slicedFaePatchField::clone() const +{ + return tmp> + ( + new slicedFaePatchField(*this) + ); +} + + +template +Foam::slicedFaePatchField::slicedFaePatchField +( + const slicedFaePatchField& ptf +) +: + faePatchField + ( + ptf.patch(), + ptf.internalField(), + Field() + ) +{ + // Transfer the slice from the argument + UList::shallowCopy(ptf); +} + + +template +Foam::tmp> +Foam::slicedFaePatchField::clone +( + const DimensionedField& iF +) const +{ + return tmp> + ( + new slicedFaePatchField(*this, iF) + ); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template +Foam::slicedFaePatchField::~slicedFaePatchField() +{ + // Set to nullptr to avoid deletion of underlying field + UList::shallowCopy(UList()); +} + + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchField.H b/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchField.H new file mode 100644 index 0000000000..134d1cda39 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchField.H @@ -0,0 +1,180 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2023 OpenCFD Ltd. +------------------------------------------------------------------------------- +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 . + +Class + Foam::slicedFaePatchField + +Description + Specialization of faePatchField which creates the underlying + faePatchField as a slice of the given complete field. + + The destructor is wrapped to avoid deallocation of the storage of the + complete fields when this is destroyed. + + Should only used as a template argument for SlicedGeometricField. + +SourceFiles + slicedFaePatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Foam_slicedFaePatchField_H +#define Foam_slicedFaePatchField_H + +#include "faePatchField.H" +#include "processorFaPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class slicedFaePatchField Declaration +\*---------------------------------------------------------------------------*/ + +template +class slicedFaePatchField +: + public faePatchField +{ +public: + + //- Type for the mesh processor patch + typedef processorFaPatch processorPatchType; + + + //- Runtime type information + TypeName("sliced"); + + + // Constructors + + //- Construct from patch, internal field and field to slice + slicedFaePatchField + ( + const faPatch&, + const DimensionedField&, + const Field& completeOrBoundaryField, + const bool isBoundaryOnly = false + ); + + //- Construct from patch and internal field + slicedFaePatchField + ( + const faPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + slicedFaePatchField + ( + const faPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping the given slicedFaePatchField + // onto a new patch + slicedFaePatchField + ( + const slicedFaePatchField&, + const faPatch&, + const DimensionedField&, + const faPatchFieldMapper& + ); + + //- Construct as copy + slicedFaePatchField(const slicedFaePatchField&); + + //- Construct and return a clone + virtual tmp> clone() const; + + //- Construct as copy setting internal field reference + slicedFaePatchField + ( + const slicedFaePatchField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp> clone + ( + const DimensionedField& iF + ) const; + + + //- Destructor + virtual ~slicedFaePatchField(); + + + // Member Functions + + // Attributes + + //- True: this patch field fixes a value. + virtual bool fixesValue() const { return true; } + + + // Member Operators + + virtual void operator=(const UList&) {} + + virtual void operator=(const faePatchField&) {} + virtual void operator+=(const faePatchField&) {} + virtual void operator-=(const faePatchField&) {} + virtual void operator*=(const faePatchField&) {} + virtual void operator/=(const faePatchField&) {} + + virtual void operator+=(const Field&) {} + virtual void operator-=(const Field&) {} + + virtual void operator*=(const Field&) {} + virtual void operator/=(const Field&) {} + + virtual void operator=(const Type&) {} + virtual void operator+=(const Type&) {} + virtual void operator-=(const Type&) {} + virtual void operator*=(const scalar) {} + virtual void operator/=(const scalar) {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "slicedFaePatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchFields.C b/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchFields.C new file mode 100644 index 0000000000..d576a082d3 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchFields.C @@ -0,0 +1,39 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2023 OpenCFD Ltd. +------------------------------------------------------------------------------- +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 "slicedFaePatchFields.H" +#include "addToRunTimeSelectionTable.H" +#include "faePatchFields.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + makeFaePatchFields(sliced); +} + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchFields.H b/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchFields.H new file mode 100644 index 0000000000..47f19aead4 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/sliced/slicedFaePatchFields.H @@ -0,0 +1,58 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2023 OpenCFD Ltd. +------------------------------------------------------------------------------- +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::slicedFaePatchFields + +Description + +SourceFiles + slicedFaePatchFields.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Foam_slicedFaePatchFields_H +#define Foam_slicedFaePatchFields_H + +#include "slicedFaePatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaePatchTypeFieldTypedefs(sliced); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* //