mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: extend type aliases to include geometric boundary fields (#2348)
STYLE: LduInterfaceFieldPtrsList as alias instead of a class STYLE: define patch lists typedefs when defining the base patch - eg, polyPatchList typedef within polyPatch.H INT: relocate GeometricField::Boundary -> GeometricBoundaryField - was internal to GeometricField but moving it outside simplifies forward declarations etc. Code adapted from openfoam.org
This commit is contained in:
@ -419,7 +419,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
|
|||||||
nInterProcPatches += curSubPatchIDs[procPatchi].size();
|
nInterProcPatches += curSubPatchIDs[procPatchi].size();
|
||||||
}
|
}
|
||||||
|
|
||||||
PtrList<polyPatch> procPatches
|
polyPatchList procPatches
|
||||||
(
|
(
|
||||||
curPatchSizes.size() + nInterProcPatches
|
curPatchSizes.size() + nInterProcPatches
|
||||||
);
|
);
|
||||||
|
|||||||
@ -129,8 +129,7 @@ Foam::parFvFieldReconstructor::reconstructFvVolumeField
|
|||||||
|
|
||||||
PtrList<fvPatchField<Type>> patchFields(fld.mesh().boundary().size());
|
PtrList<fvPatchField<Type>> patchFields(fld.mesh().boundary().size());
|
||||||
|
|
||||||
const typename GeometricField<Type, fvPatchField, volMesh>::Boundary&
|
const auto& bfld = fld.boundaryField();
|
||||||
bfld = fld.boundaryField();
|
|
||||||
|
|
||||||
forAll(bfld, patchI)
|
forAll(bfld, patchI)
|
||||||
{
|
{
|
||||||
@ -293,8 +292,7 @@ Foam::parFvFieldReconstructor::reconstructFvSurfaceField
|
|||||||
|
|
||||||
PtrList<fvsPatchField<Type>> patchFields(fld.mesh().boundary().size());
|
PtrList<fvsPatchField<Type>> patchFields(fld.mesh().boundary().size());
|
||||||
|
|
||||||
const typename GeometricField<Type, fvsPatchField, surfaceMesh>::Boundary&
|
const auto& bfld = fld.boundaryField();
|
||||||
bfld = fld.boundaryField();
|
|
||||||
|
|
||||||
forAll(bfld, patchI)
|
forAll(bfld, patchI)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -0,0 +1,101 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2022 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2022 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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::SlicedDimensionedField
|
||||||
|
|
||||||
|
Description
|
||||||
|
Specialisation of DimensionedField that holds a slice of a given
|
||||||
|
field so that it acts as a DimensionedField.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef Foam_SlicedDimensionedField_H
|
||||||
|
#define Foam_SlicedDimensionedField_H
|
||||||
|
|
||||||
|
#include "DimensionedField.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class SlicedDimensionedField Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type, class GeoMesh>
|
||||||
|
class SlicedDimensionedField
|
||||||
|
:
|
||||||
|
public DimensionedField<Type, GeoMesh>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Public Typedefs
|
||||||
|
|
||||||
|
//- Type of mesh on which this SlicedDimensionedField is instantiated
|
||||||
|
typedef typename GeoMesh::Mesh Mesh;
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components and field to slice
|
||||||
|
SlicedDimensionedField
|
||||||
|
(
|
||||||
|
const IOobject& io,
|
||||||
|
const Mesh& mesh,
|
||||||
|
const dimensionSet& ds,
|
||||||
|
const Field<Type>& iField
|
||||||
|
)
|
||||||
|
:
|
||||||
|
DimensionedField<Type, GeoMesh>(io, mesh, ds, Field<Type>())
|
||||||
|
{
|
||||||
|
// Set internalField to the slice of the complete field
|
||||||
|
UList<Type>::shallowCopy
|
||||||
|
(
|
||||||
|
SubList<Type>(iField, GeoMesh::size(mesh))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
~SlicedDimensionedField()
|
||||||
|
{
|
||||||
|
// Set internalField to nullptr to avoid deletion of underlying field
|
||||||
|
UList<Type>::shallowCopy(UList<Type>());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -5,8 +5,8 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017,2022 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -26,23 +26,29 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "emptyPolyPatch.H"
|
#include "GeometricBoundaryField.H"
|
||||||
#include "globalMeshData.H"
|
#include "globalMeshData.H"
|
||||||
#include "cyclicPolyPatch.H"
|
#include "cyclicPolyPatch.H"
|
||||||
|
#include "emptyPolyPatch.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::readField
|
void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::readField
|
||||||
(
|
(
|
||||||
const DimensionedField<Type, GeoMesh>& field,
|
const DimensionedField<Type, GeoMesh>& field,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
DebugInFunction << nl;
|
///if (GeometricField<Type, PatchField, GeoMesh::debug)
|
||||||
|
///{
|
||||||
|
/// InfoInFunction << nl;
|
||||||
|
///}
|
||||||
|
|
||||||
// Clear the boundary field if already initialised
|
// Clear the boundary field if already initialised
|
||||||
this->clear();
|
this->clear();
|
||||||
|
|
||||||
this->setSize(bmesh_.size());
|
this->resize(bmesh_.size());
|
||||||
|
|
||||||
label nUnset = this->size();
|
label nUnset = this->size();
|
||||||
|
|
||||||
@ -180,7 +186,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::readField
|
|||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::GeometricBoundaryField
|
||||||
(
|
(
|
||||||
const BoundaryMesh& bmesh
|
const BoundaryMesh& bmesh
|
||||||
)
|
)
|
||||||
@ -191,7 +197,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
|||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::GeometricBoundaryField
|
||||||
(
|
(
|
||||||
const BoundaryMesh& bmesh,
|
const BoundaryMesh& bmesh,
|
||||||
const DimensionedField<Type, GeoMesh>& field,
|
const DimensionedField<Type, GeoMesh>& field,
|
||||||
@ -201,7 +207,10 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
|||||||
FieldField<PatchField, Type>(bmesh.size()),
|
FieldField<PatchField, Type>(bmesh.size()),
|
||||||
bmesh_(bmesh)
|
bmesh_(bmesh)
|
||||||
{
|
{
|
||||||
DebugInFunction << nl;
|
///if (GeometricField<Type, PatchField, GeoMesh::debug)
|
||||||
|
///{
|
||||||
|
/// InfoInFunction << nl;
|
||||||
|
///}
|
||||||
|
|
||||||
forAll(bmesh_, patchi)
|
forAll(bmesh_, patchi)
|
||||||
{
|
{
|
||||||
@ -220,7 +229,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
|||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::GeometricBoundaryField
|
||||||
(
|
(
|
||||||
const BoundaryMesh& bmesh,
|
const BoundaryMesh& bmesh,
|
||||||
const DimensionedField<Type, GeoMesh>& field,
|
const DimensionedField<Type, GeoMesh>& field,
|
||||||
@ -231,7 +240,10 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
|||||||
FieldField<PatchField, Type>(bmesh.size()),
|
FieldField<PatchField, Type>(bmesh.size()),
|
||||||
bmesh_(bmesh)
|
bmesh_(bmesh)
|
||||||
{
|
{
|
||||||
DebugInFunction << nl;
|
///if (GeometricField<Type, PatchField, GeoMesh::debug)
|
||||||
|
///{
|
||||||
|
/// InfoInFunction << nl;
|
||||||
|
///}
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -284,7 +296,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
|||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::GeometricBoundaryField
|
||||||
(
|
(
|
||||||
const BoundaryMesh& bmesh,
|
const BoundaryMesh& bmesh,
|
||||||
const DimensionedField<Type, GeoMesh>& field,
|
const DimensionedField<Type, GeoMesh>& field,
|
||||||
@ -294,7 +306,10 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
|||||||
FieldField<PatchField, Type>(bmesh.size()),
|
FieldField<PatchField, Type>(bmesh.size()),
|
||||||
bmesh_(bmesh)
|
bmesh_(bmesh)
|
||||||
{
|
{
|
||||||
DebugInFunction << nl;
|
///if (GeometricField<Type, PatchField, GeoMesh::debug)
|
||||||
|
///{
|
||||||
|
/// InfoInFunction << nl;
|
||||||
|
///}
|
||||||
|
|
||||||
forAll(bmesh_, patchi)
|
forAll(bmesh_, patchi)
|
||||||
{
|
{
|
||||||
@ -304,16 +319,19 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
|||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::GeometricBoundaryField
|
||||||
(
|
(
|
||||||
const DimensionedField<Type, GeoMesh>& field,
|
const DimensionedField<Type, GeoMesh>& field,
|
||||||
const typename GeometricField<Type, PatchField, GeoMesh>::Boundary& btf
|
const GeometricBoundaryField<Type, PatchField, GeoMesh>& btf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
FieldField<PatchField, Type>(btf.size()),
|
FieldField<PatchField, Type>(btf.size()),
|
||||||
bmesh_(btf.bmesh_)
|
bmesh_(btf.bmesh_)
|
||||||
{
|
{
|
||||||
DebugInFunction << nl;
|
///if (GeometricField<Type, PatchField, GeoMesh::debug)
|
||||||
|
///{
|
||||||
|
/// InfoInFunction << nl;
|
||||||
|
///}
|
||||||
|
|
||||||
forAll(bmesh_, patchi)
|
forAll(bmesh_, patchi)
|
||||||
{
|
{
|
||||||
@ -323,10 +341,10 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
|||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::GeometricBoundaryField
|
||||||
(
|
(
|
||||||
const DimensionedField<Type, GeoMesh>& field,
|
const DimensionedField<Type, GeoMesh>& field,
|
||||||
const typename GeometricField<Type, PatchField, GeoMesh>::Boundary& btf,
|
const GeometricBoundaryField<Type, PatchField, GeoMesh>& btf,
|
||||||
const labelList& patchIDs,
|
const labelList& patchIDs,
|
||||||
const word& patchFieldType
|
const word& patchFieldType
|
||||||
)
|
)
|
||||||
@ -334,7 +352,10 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
|||||||
FieldField<PatchField, Type>(btf.size()),
|
FieldField<PatchField, Type>(btf.size()),
|
||||||
bmesh_(btf.bmesh_)
|
bmesh_(btf.bmesh_)
|
||||||
{
|
{
|
||||||
DebugInFunction << nl;
|
///if (GeometricField<Type, PatchField, GeoMesh::debug)
|
||||||
|
///{
|
||||||
|
/// InfoInFunction << nl;
|
||||||
|
///}
|
||||||
|
|
||||||
for (const label patchi : patchIDs)
|
for (const label patchi : patchIDs)
|
||||||
{
|
{
|
||||||
@ -361,20 +382,23 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
|||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::GeometricBoundaryField
|
||||||
(
|
(
|
||||||
const typename GeometricField<Type, PatchField, GeoMesh>::Boundary& btf
|
const GeometricBoundaryField<Type, PatchField, GeoMesh>& btf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
FieldField<PatchField, Type>(btf),
|
FieldField<PatchField, Type>(btf),
|
||||||
bmesh_(btf.bmesh_)
|
bmesh_(btf.bmesh_)
|
||||||
{
|
{
|
||||||
DebugInFunction << nl;
|
///if (GeometricField<Type, PatchField, GeoMesh::debug)
|
||||||
|
///{
|
||||||
|
/// InfoInFunction << nl;
|
||||||
|
///}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::GeometricBoundaryField
|
||||||
(
|
(
|
||||||
const BoundaryMesh& bmesh,
|
const BoundaryMesh& bmesh,
|
||||||
const DimensionedField<Type, GeoMesh>& field,
|
const DimensionedField<Type, GeoMesh>& field,
|
||||||
@ -391,9 +415,12 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::Boundary
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::updateCoeffs()
|
void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::updateCoeffs()
|
||||||
{
|
{
|
||||||
DebugInFunction << nl;
|
///if (GeometricField<Type, PatchField, GeoMesh::debug)
|
||||||
|
///{
|
||||||
|
/// InfoInFunction << nl;
|
||||||
|
///}
|
||||||
|
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
{
|
{
|
||||||
@ -403,9 +430,12 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::updateCoeffs()
|
|||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::evaluate()
|
void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::evaluate()
|
||||||
{
|
{
|
||||||
DebugInFunction << nl;
|
///if (GeometricField<Type, PatchField, GeoMesh::debug)
|
||||||
|
///{
|
||||||
|
/// InfoInFunction << nl;
|
||||||
|
///}
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -468,7 +498,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::evaluate()
|
|||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
Foam::wordList
|
Foam::wordList
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::types() const
|
Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::types() const
|
||||||
{
|
{
|
||||||
const FieldField<PatchField, Type>& pff = *this;
|
const FieldField<PatchField, Type>& pff = *this;
|
||||||
|
|
||||||
@ -484,32 +514,30 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::types() const
|
|||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
typename Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary
|
Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::
|
Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::
|
||||||
boundaryInternalField() const
|
boundaryInternalField() const
|
||||||
{
|
{
|
||||||
typename GeometricField<Type, PatchField, GeoMesh>::Boundary
|
GeometricBoundaryField<Type, PatchField, GeoMesh> result(*this);
|
||||||
BoundaryInternalField(*this);
|
|
||||||
|
|
||||||
forAll(BoundaryInternalField, patchi)
|
forAll(result, patchi)
|
||||||
{
|
{
|
||||||
BoundaryInternalField[patchi] ==
|
result[patchi] == this->operator[](patchi).patchInternalField();
|
||||||
this->operator[](patchi).patchInternalField();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return BoundaryInternalField;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
Foam::LduInterfaceFieldPtrsList<Type>
|
Foam::LduInterfaceFieldPtrsList<Type>
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::interfaces() const
|
Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::interfaces() const
|
||||||
{
|
{
|
||||||
LduInterfaceFieldPtrsList<Type> list(this->size());
|
LduInterfaceFieldPtrsList<Type> list(this->size());
|
||||||
|
|
||||||
forAll(list, patchi)
|
forAll(list, patchi)
|
||||||
{
|
{
|
||||||
const LduInterfaceField<Type>* lduPtr =
|
const auto* lduPtr =
|
||||||
isA<LduInterfaceField<Type>>(this->operator[](patchi));
|
isA<LduInterfaceField<Type>>(this->operator[](patchi));
|
||||||
|
|
||||||
if (lduPtr)
|
if (lduPtr)
|
||||||
@ -524,14 +552,14 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::interfaces() const
|
|||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
Foam::lduInterfaceFieldPtrsList
|
Foam::lduInterfaceFieldPtrsList
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::
|
Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::
|
||||||
scalarInterfaces() const
|
scalarInterfaces() const
|
||||||
{
|
{
|
||||||
lduInterfaceFieldPtrsList list(this->size());
|
lduInterfaceFieldPtrsList list(this->size());
|
||||||
|
|
||||||
forAll(list, patchi)
|
forAll(list, patchi)
|
||||||
{
|
{
|
||||||
const lduInterfaceField* lduPtr =
|
const auto* lduPtr =
|
||||||
isA<lduInterfaceField>(this->operator[](patchi));
|
isA<lduInterfaceField>(this->operator[](patchi));
|
||||||
|
|
||||||
if (lduPtr)
|
if (lduPtr)
|
||||||
@ -545,7 +573,7 @@ scalarInterfaces() const
|
|||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::writeEntry
|
void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::writeEntry
|
||||||
(
|
(
|
||||||
const word& keyword,
|
const word& keyword,
|
||||||
Ostream& os
|
Ostream& os
|
||||||
@ -560,7 +588,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::writeEntry
|
|||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::writeEntries
|
void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::writeEntries
|
||||||
(
|
(
|
||||||
Ostream& os
|
Ostream& os
|
||||||
) const
|
) const
|
||||||
@ -577,10 +605,9 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::writeEntries
|
|||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::operator=
|
void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::operator=
|
||||||
(
|
(
|
||||||
const typename GeometricField<Type, PatchField, GeoMesh>::
|
const GeometricBoundaryField<Type, PatchField, GeoMesh>& bf
|
||||||
Boundary& bf
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
FieldField<PatchField, Type>::operator=(bf);
|
FieldField<PatchField, Type>::operator=(bf);
|
||||||
@ -588,30 +615,29 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::operator=
|
|||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::operator=
|
void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::operator=
|
||||||
(
|
(
|
||||||
const FieldField<PatchField, Type>& ptff
|
const FieldField<PatchField, Type>& bf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
FieldField<PatchField, Type>::operator=(ptff);
|
FieldField<PatchField, Type>::operator=(bf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::operator=
|
void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::operator=
|
||||||
(
|
(
|
||||||
const Type& t
|
const Type& val
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
FieldField<PatchField, Type>::operator=(t);
|
FieldField<PatchField, Type>::operator=(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::operator==
|
void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::operator==
|
||||||
(
|
(
|
||||||
const typename GeometricField<Type, PatchField, GeoMesh>::
|
const GeometricBoundaryField<Type, PatchField, GeoMesh>& bf
|
||||||
Boundary& bf
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
@ -622,27 +648,27 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::operator==
|
|||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::operator==
|
void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::operator==
|
||||||
(
|
(
|
||||||
const FieldField<PatchField, Type>& ptff
|
const FieldField<PatchField, Type>& bf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
{
|
{
|
||||||
this->operator[](patchi) == ptff[patchi];
|
this->operator[](patchi) == bf[patchi];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::operator==
|
void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::operator==
|
||||||
(
|
(
|
||||||
const Type& t
|
const Type& val
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
{
|
{
|
||||||
this->operator[](patchi) == t;
|
this->operator[](patchi) == val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -653,8 +679,7 @@ template<class Type, template<class> class PatchField, class GeoMesh>
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const typename GeometricField<Type, PatchField, GeoMesh>::
|
const GeometricBoundaryField<Type, PatchField, GeoMesh>& bf
|
||||||
Boundary& bf
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
os << static_cast<const FieldField<PatchField, Type>&>(bf);
|
os << static_cast<const FieldField<PatchField, Type>&>(bf);
|
||||||
|
|||||||
@ -0,0 +1,238 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2011-2017,2022 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2015-2022 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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::GeometricBoundaryField
|
||||||
|
|
||||||
|
Description
|
||||||
|
Generic GeometricBoundaryField class.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
GeometricBoundaryField.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef Foam_GeometricBoundaryField_H
|
||||||
|
#define Foam_GeometricBoundaryField_H
|
||||||
|
|
||||||
|
#include "dimensionedTypes.H"
|
||||||
|
#include "DimensionedField.H"
|
||||||
|
#include "FieldField.H"
|
||||||
|
#include "lduInterfaceFieldPtrsList.H"
|
||||||
|
#include "LduInterfaceFieldPtrsList.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// Forward Declarations
|
||||||
|
class dictionary;
|
||||||
|
|
||||||
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
|
class GeometricField;
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class GeometricBoundaryField Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
|
class GeometricBoundaryField
|
||||||
|
:
|
||||||
|
public FieldField<PatchField, Type>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Public Typedefs
|
||||||
|
|
||||||
|
//- The boundary mesh type for the boundary fields
|
||||||
|
typedef typename GeoMesh::BoundaryMesh BoundaryMesh;
|
||||||
|
|
||||||
|
//- The internal field type associated with the boundary fields
|
||||||
|
typedef DimensionedField<Type, GeoMesh> Internal;
|
||||||
|
|
||||||
|
//- The patch field type for the boundary fields
|
||||||
|
typedef PatchField<Type> Patch;
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private Data
|
||||||
|
|
||||||
|
//- Reference to BoundaryMesh for which this field is defined
|
||||||
|
const BoundaryMesh& bmesh_;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from a BoundaryMesh, setting patches later
|
||||||
|
explicit GeometricBoundaryField(const BoundaryMesh& bmesh);
|
||||||
|
|
||||||
|
//- Construct from a BoundaryMesh, reference to the internal field
|
||||||
|
//- and a patch type
|
||||||
|
GeometricBoundaryField
|
||||||
|
(
|
||||||
|
const BoundaryMesh& bmesh,
|
||||||
|
const DimensionedField<Type, GeoMesh>& field,
|
||||||
|
const word& patchFieldType = PatchField<Type>::calculatedType()
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from a BoundaryMesh, reference to the internal field
|
||||||
|
//- and a wordList of patch types and optional the actual patch
|
||||||
|
//- types (to override constraint patches)
|
||||||
|
GeometricBoundaryField
|
||||||
|
(
|
||||||
|
const BoundaryMesh& bmesh,
|
||||||
|
const DimensionedField<Type, GeoMesh>& field,
|
||||||
|
const wordList& wantedPatchTypes,
|
||||||
|
const wordList& actualPatchTypes = wordList()
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from a BoundaryMesh, reference to the internal field
|
||||||
|
//- and a PtrList<PatchField<Type>>
|
||||||
|
GeometricBoundaryField
|
||||||
|
(
|
||||||
|
const BoundaryMesh& bmesh,
|
||||||
|
const DimensionedField<Type, GeoMesh>& field,
|
||||||
|
const PtrList<PatchField<Type>>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct as copy setting the reference to the internal field
|
||||||
|
GeometricBoundaryField
|
||||||
|
(
|
||||||
|
const DimensionedField<Type, GeoMesh>& field,
|
||||||
|
const GeometricBoundaryField<Type, PatchField, GeoMesh>& btf
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct as copy setting the reference to the internal field
|
||||||
|
//- and resetting type of field for given patch IDs
|
||||||
|
GeometricBoundaryField
|
||||||
|
(
|
||||||
|
const DimensionedField<Type, GeoMesh>& field,
|
||||||
|
const GeometricBoundaryField<Type, PatchField, GeoMesh>& btf,
|
||||||
|
const labelList& patchIDs,
|
||||||
|
const word& patchFieldName
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Copy construct
|
||||||
|
// Dangerous because Field may be set to a field which gets deleted
|
||||||
|
// Need new type of BoundaryField, one which is part of a geometric
|
||||||
|
// field for which snGrad etc. may be called and a free standing
|
||||||
|
// BoundaryField for which such operations are unavailable.
|
||||||
|
GeometricBoundaryField(const GeometricBoundaryField& btf);
|
||||||
|
|
||||||
|
//- Construct from dictionary
|
||||||
|
GeometricBoundaryField
|
||||||
|
(
|
||||||
|
const BoundaryMesh& bmesh,
|
||||||
|
const DimensionedField<Type, GeoMesh>& field,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Read the boundary field
|
||||||
|
void readField
|
||||||
|
(
|
||||||
|
const DimensionedField<Type, GeoMesh>& field,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Update the boundary condition coefficients
|
||||||
|
void updateCoeffs();
|
||||||
|
|
||||||
|
//- Evaluate boundary conditions
|
||||||
|
void evaluate();
|
||||||
|
|
||||||
|
//- Return a list of the patch types
|
||||||
|
wordList types() const;
|
||||||
|
|
||||||
|
//- Return boundary field of cell values neighbouring the boundary
|
||||||
|
GeometricBoundaryField boundaryInternalField() const;
|
||||||
|
|
||||||
|
//- Return a list of pointers for each patch field with only those
|
||||||
|
//- pointing to interfaces being set
|
||||||
|
LduInterfaceFieldPtrsList<Type> interfaces() const;
|
||||||
|
|
||||||
|
//- Return a list of pointers for each patch field with only those
|
||||||
|
//- pointing to interfaces being set
|
||||||
|
lduInterfaceFieldPtrsList scalarInterfaces() const;
|
||||||
|
|
||||||
|
//- Write boundary field as dictionary entry
|
||||||
|
void writeEntry(const word& keyword, Ostream& os) const;
|
||||||
|
|
||||||
|
//- Write dictionary entries of the individual boundary fields.
|
||||||
|
void writeEntries(Ostream& os) const;
|
||||||
|
|
||||||
|
|
||||||
|
// Member Operators
|
||||||
|
|
||||||
|
//- Copy assignment from GeometricBoundaryField
|
||||||
|
void operator=(const GeometricBoundaryField& bf);
|
||||||
|
|
||||||
|
//- Copy assignment from FieldField\<PatchField, Type\>
|
||||||
|
void operator=(const FieldField<PatchField, Type>& bf);
|
||||||
|
|
||||||
|
//- Assignment to uniform value
|
||||||
|
void operator=(const Type& val);
|
||||||
|
|
||||||
|
//- Forced assignment from GeometricBoundaryField
|
||||||
|
void operator==(const GeometricBoundaryField& bf);
|
||||||
|
|
||||||
|
//- Forced assignment from FieldField\<PatchField, Type\>
|
||||||
|
void operator==(const FieldField<PatchField, Type>& bf);
|
||||||
|
|
||||||
|
//- Forced assignment to uniform value
|
||||||
|
void operator==(const Type& val);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
|
Ostream& operator<<
|
||||||
|
(
|
||||||
|
Ostream&,
|
||||||
|
const GeometricBoundaryField<Type, PatchField, GeoMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
#include "GeometricBoundaryField.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -1372,7 +1372,6 @@ Foam::Ostream& Foam::operator<<
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "GeometricFieldNew.C"
|
#include "GeometricFieldNew.C"
|
||||||
#include "GeometricBoundaryField.C"
|
|
||||||
#include "GeometricFieldFunctions.C"
|
#include "GeometricFieldFunctions.C"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -33,21 +33,16 @@ Description
|
|||||||
SourceFiles
|
SourceFiles
|
||||||
GeometricFieldI.H
|
GeometricFieldI.H
|
||||||
GeometricField.C
|
GeometricField.C
|
||||||
GeometricBoundaryField.C
|
|
||||||
GeometricFieldFunctions.H
|
GeometricFieldFunctions.H
|
||||||
GeometricFieldFunctions.C
|
GeometricFieldFunctions.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef GeometricField_H
|
#ifndef Foam_GeometricField_H
|
||||||
#define GeometricField_H
|
#define Foam_GeometricField_H
|
||||||
|
|
||||||
#include "regIOobject.H"
|
#include "regIOobject.H"
|
||||||
#include "dimensionedTypes.H"
|
#include "GeometricBoundaryField.H"
|
||||||
#include "DimensionedField.H"
|
|
||||||
#include "FieldField.H"
|
|
||||||
#include "lduInterfaceFieldPtrsList.H"
|
|
||||||
#include "LduInterfaceFieldPtrsList.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -84,178 +79,32 @@ class GeometricField
|
|||||||
:
|
:
|
||||||
public DimensionedField<Type, GeoMesh>
|
public DimensionedField<Type, GeoMesh>
|
||||||
{
|
{
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- Read from file if it is present
|
|
||||||
bool readIfPresent();
|
|
||||||
|
|
||||||
//- Read old time field from file if it is present
|
|
||||||
bool readOldTimeIfPresent();
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Public Typedefs
|
// Public Typedefs
|
||||||
|
|
||||||
//- Type of mesh on which this GeometricField is instantiated
|
//- The mesh type for the GeometricField
|
||||||
typedef typename GeoMesh::Mesh Mesh;
|
typedef typename GeoMesh::Mesh Mesh;
|
||||||
|
|
||||||
//- Type of boundary mesh on which this GeometricField::Boundary is
|
//- The boundary mesh type for the boundary fields
|
||||||
//- instantiated
|
|
||||||
typedef typename GeoMesh::BoundaryMesh BoundaryMesh;
|
typedef typename GeoMesh::BoundaryMesh BoundaryMesh;
|
||||||
|
|
||||||
//- Type of the internal field from which this GeometricField is derived
|
//- The internal field type from which this GeometricField is derived
|
||||||
typedef DimensionedField<Type, GeoMesh> Internal;
|
typedef DimensionedField<Type, GeoMesh> Internal;
|
||||||
|
|
||||||
//- Type of the patch field of which the GeometricField::Boundary is
|
//- Type of boundary fields
|
||||||
//- composed
|
typedef GeometricBoundaryField<Type, PatchField, GeoMesh> Boundary;
|
||||||
|
|
||||||
|
//- The patch field type for the GeometricBoundaryField
|
||||||
typedef PatchField<Type> Patch;
|
typedef PatchField<Type> Patch;
|
||||||
|
|
||||||
|
//- The field component type
|
||||||
//- The boundary fields
|
typedef typename Field<Type>::cmptType cmptType;
|
||||||
class Boundary
|
|
||||||
:
|
|
||||||
public FieldField<PatchField, Type>
|
|
||||||
{
|
|
||||||
// Private Data
|
|
||||||
|
|
||||||
//- Reference to BoundaryMesh for which this field is defined
|
|
||||||
const BoundaryMesh& bmesh_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from a BoundaryMesh, setting patches later
|
|
||||||
explicit Boundary(const BoundaryMesh& bmesh);
|
|
||||||
|
|
||||||
//- Construct from a BoundaryMesh, reference to the internal field
|
|
||||||
//- and a patch type
|
|
||||||
Boundary
|
|
||||||
(
|
|
||||||
const BoundaryMesh& bmesh,
|
|
||||||
const Internal& field,
|
|
||||||
const word& patchFieldType = PatchField<Type>::calculatedType()
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from a BoundaryMesh, reference to the internal field
|
|
||||||
//- and a wordList of patch types and optional the actual patch
|
|
||||||
//- types (to override constraint patches)
|
|
||||||
Boundary
|
|
||||||
(
|
|
||||||
const BoundaryMesh& bmesh,
|
|
||||||
const Internal& field,
|
|
||||||
const wordList& wantedPatchTypes,
|
|
||||||
const wordList& actualPatchTypes = wordList()
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from a BoundaryMesh, reference to the internal field
|
|
||||||
//- and a PtrList<PatchField<Type>>
|
|
||||||
Boundary
|
|
||||||
(
|
|
||||||
const BoundaryMesh& bmesh,
|
|
||||||
const Internal& field,
|
|
||||||
const PtrList<PatchField<Type>>&
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct as copy setting the reference to the internal field
|
|
||||||
Boundary
|
|
||||||
(
|
|
||||||
const Internal& field,
|
|
||||||
const Boundary& btf
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct as copy setting the reference to the internal field
|
|
||||||
//- and resetting type of field for given patch IDs
|
|
||||||
Boundary
|
|
||||||
(
|
|
||||||
const Internal& field,
|
|
||||||
const Boundary& btf,
|
|
||||||
const labelList& patchIDs,
|
|
||||||
const word& patchFieldName
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Copy construct
|
|
||||||
// Dangerous because Field may be set to a field which gets deleted
|
|
||||||
// Need new type of BoundaryField, one which is part of a geometric
|
|
||||||
// field for which snGrad etc. may be called and a free standing
|
|
||||||
// BoundaryField for which such operations are unavailable.
|
|
||||||
Boundary(const Boundary& btf);
|
|
||||||
|
|
||||||
//- Construct from dictionary
|
|
||||||
Boundary
|
|
||||||
(
|
|
||||||
const BoundaryMesh& bmesh,
|
|
||||||
const Internal& field,
|
|
||||||
const dictionary& dict
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
//- Read the boundary field
|
|
||||||
void readField
|
|
||||||
(
|
|
||||||
const Internal& field,
|
|
||||||
const dictionary& dict
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Update the boundary condition coefficients
|
|
||||||
void updateCoeffs();
|
|
||||||
|
|
||||||
//- Evaluate boundary conditions
|
|
||||||
void evaluate();
|
|
||||||
|
|
||||||
//- Return a list of the patch types
|
|
||||||
wordList types() const;
|
|
||||||
|
|
||||||
//- Return BoundaryField of the cell values neighbouring
|
|
||||||
//- the boundary
|
|
||||||
Boundary boundaryInternalField() const;
|
|
||||||
|
|
||||||
//- Return a list of pointers for each patch field with only those
|
|
||||||
//- pointing to interfaces being set
|
|
||||||
LduInterfaceFieldPtrsList<Type> interfaces() const;
|
|
||||||
|
|
||||||
//- Return a list of pointers for each patch field with only those
|
|
||||||
//- pointing to interfaces being set
|
|
||||||
lduInterfaceFieldPtrsList scalarInterfaces() const;
|
|
||||||
|
|
||||||
//- Write boundary field as dictionary entry
|
|
||||||
void writeEntry(const word& keyword, Ostream& os) const;
|
|
||||||
|
|
||||||
//- Write dictionary entries of the individual boundary fields.
|
|
||||||
void writeEntries(Ostream& os) const;
|
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
|
||||||
|
|
||||||
//- Assignment to BoundaryField<Type, PatchField, BoundaryMesh>
|
|
||||||
void operator=(const Boundary&);
|
|
||||||
|
|
||||||
//- Assignment to FieldField<PatchField, Type>
|
|
||||||
void operator=(const FieldField<PatchField, Type>&);
|
|
||||||
|
|
||||||
//- Assignment to Type
|
|
||||||
void operator=(const Type&);
|
|
||||||
|
|
||||||
|
|
||||||
//- Forced assignment to
|
|
||||||
// BoundaryField<Type, PatchField, BoundaryMesh>
|
|
||||||
void operator==(const Boundary&);
|
|
||||||
|
|
||||||
//- Forced assignment to FieldField<PatchField, Type>
|
|
||||||
void operator==(const FieldField<PatchField, Type>&);
|
|
||||||
|
|
||||||
//- Forced assignment to Type
|
|
||||||
void operator==(const Type&);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Current time index.
|
//- Current time index.
|
||||||
// Used to trigger the storing of the old-time value
|
// Used to trigger the storing of the old-time value
|
||||||
@ -267,12 +116,18 @@ private:
|
|||||||
//- Pointer to previous iteration (used for under-relaxation)
|
//- Pointer to previous iteration (used for under-relaxation)
|
||||||
mutable GeometricField<Type, PatchField, GeoMesh>* fieldPrevIterPtr_;
|
mutable GeometricField<Type, PatchField, GeoMesh>* fieldPrevIterPtr_;
|
||||||
|
|
||||||
//- Boundary Type field containing boundary field values
|
//- Boundary field containing boundary field values
|
||||||
Boundary boundaryField_;
|
Boundary boundaryField_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Read from file if it is present
|
||||||
|
bool readIfPresent();
|
||||||
|
|
||||||
|
//- Read old time field from file if it is present
|
||||||
|
bool readOldTimeIfPresent();
|
||||||
|
|
||||||
//- Read the field from the dictionary
|
//- Read the field from the dictionary
|
||||||
void readFields(const dictionary& dict);
|
void readFields(const dictionary& dict);
|
||||||
|
|
||||||
@ -286,10 +141,6 @@ public:
|
|||||||
TypeName("GeometricField");
|
TypeName("GeometricField");
|
||||||
|
|
||||||
|
|
||||||
// Public typedefs
|
|
||||||
|
|
||||||
typedef typename Field<Type>::cmptType cmptType;
|
|
||||||
|
|
||||||
// Static Member Functions
|
// Static Member Functions
|
||||||
|
|
||||||
//- Return a null geometric field
|
//- Return a null geometric field
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2022 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -47,11 +48,8 @@ slicedBoundaryField
|
|||||||
const bool preserveProcessorOnly
|
const bool preserveProcessorOnly
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmp<FieldField<PatchField, Type>> tbf
|
auto tbf = tmp<FieldField<PatchField, Type>>::New(mesh.boundary().size());
|
||||||
(
|
auto& bf = tbf.ref();
|
||||||
new FieldField<PatchField, Type>(mesh.boundary().size())
|
|
||||||
);
|
|
||||||
FieldField<PatchField, Type>& bf = tbf.ref();
|
|
||||||
|
|
||||||
forAll(mesh.boundary(), patchi)
|
forAll(mesh.boundary(), patchi)
|
||||||
{
|
{
|
||||||
@ -123,11 +121,8 @@ slicedBoundaryField
|
|||||||
const bool preserveCouples
|
const bool preserveCouples
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmp<FieldField<PatchField, Type>> tbf
|
auto tbf = tmp<FieldField<PatchField, Type>>::New(mesh.boundary().size());
|
||||||
(
|
auto& bf = tbf.ref();
|
||||||
new FieldField<PatchField, Type>(mesh.boundary().size())
|
|
||||||
);
|
|
||||||
FieldField<PatchField, Type>& bf = tbf.ref();
|
|
||||||
|
|
||||||
forAll(mesh.boundary(), patchi)
|
forAll(mesh.boundary(), patchi)
|
||||||
{
|
{
|
||||||
@ -157,10 +152,10 @@ slicedBoundaryField
|
|||||||
new SlicedPatchField<Type>
|
new SlicedPatchField<Type>
|
||||||
(
|
(
|
||||||
mesh.boundary()[patchi],
|
mesh.boundary()[patchi],
|
||||||
DimensionedField<Type, GeoMesh>::null()
|
DimensionedField<Type, GeoMesh>::null(),
|
||||||
|
bField[patchi]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
bf[patchi].UList<Type>::shallowCopy(bField[patchi]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,38 +165,6 @@ slicedBoundaryField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template
|
|
||||||
<
|
|
||||||
class Type,
|
|
||||||
template<class> class PatchField,
|
|
||||||
template<class> class SlicedPatchField,
|
|
||||||
class GeoMesh
|
|
||||||
>
|
|
||||||
Foam::SlicedGeometricField<Type, PatchField, SlicedPatchField, GeoMesh>::
|
|
||||||
Internal::Internal
|
|
||||||
(
|
|
||||||
const IOobject& io,
|
|
||||||
const Mesh& mesh,
|
|
||||||
const dimensionSet& ds,
|
|
||||||
const Field<Type>& iField
|
|
||||||
)
|
|
||||||
:
|
|
||||||
DimensionedField<Type, GeoMesh>
|
|
||||||
(
|
|
||||||
io,
|
|
||||||
mesh,
|
|
||||||
ds,
|
|
||||||
Field<Type>()
|
|
||||||
)
|
|
||||||
{
|
|
||||||
// Set the internalField to the slice of the complete field
|
|
||||||
UList<Type>::shallowCopy
|
|
||||||
(
|
|
||||||
typename Field<Type>::subField(iField, GeoMesh::size(mesh))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template
|
template
|
||||||
<
|
<
|
||||||
class Type,
|
class Type,
|
||||||
@ -228,10 +191,10 @@ SlicedGeometricField
|
|||||||
slicedBoundaryField(mesh, completeField, preserveCouples)
|
slicedBoundaryField(mesh, completeField, preserveCouples)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Set the internalField to the slice of the complete field
|
// Set internalField to the slice of the complete field
|
||||||
UList<Type>::shallowCopy
|
UList<Type>::shallowCopy
|
||||||
(
|
(
|
||||||
typename Field<Type>::subField(completeField, GeoMesh::size(mesh))
|
SubList<Type>(completeField, GeoMesh::size(mesh))
|
||||||
);
|
);
|
||||||
|
|
||||||
correctBoundaryConditions();
|
correctBoundaryConditions();
|
||||||
@ -272,10 +235,10 @@ SlicedGeometricField
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Set the internalField to the slice of the complete field
|
// Set internalField to the slice of the complete field
|
||||||
UList<Type>::shallowCopy
|
UList<Type>::shallowCopy
|
||||||
(
|
(
|
||||||
typename Field<Type>::subField(completeIField, GeoMesh::size(mesh))
|
SubList<Type>(completeIField, GeoMesh::size(mesh))
|
||||||
);
|
);
|
||||||
|
|
||||||
correctBoundaryConditions();
|
correctBoundaryConditions();
|
||||||
@ -306,7 +269,7 @@ SlicedGeometricField
|
|||||||
slicedBoundaryField(gf.mesh(), gf.boundaryField(), preserveCouples)
|
slicedBoundaryField(gf.mesh(), gf.boundaryField(), preserveCouples)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Set the internalField to the supplied internal field
|
// Set internalField to the internal field
|
||||||
UList<Type>::shallowCopy(gf.primitiveField());
|
UList<Type>::shallowCopy(gf.primitiveField());
|
||||||
|
|
||||||
correctBoundaryConditions();
|
correctBoundaryConditions();
|
||||||
@ -335,7 +298,7 @@ SlicedGeometricField
|
|||||||
slicedBoundaryField(gf.mesh(), gf.boundaryField(), true)
|
slicedBoundaryField(gf.mesh(), gf.boundaryField(), true)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Set the internalField to the supplied internal field
|
// Set internalField to the internal field
|
||||||
UList<Type>::shallowCopy(gf.primitiveField());
|
UList<Type>::shallowCopy(gf.primitiveField());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -357,12 +320,9 @@ clone() const
|
|||||||
return tmp
|
return tmp
|
||||||
<
|
<
|
||||||
SlicedGeometricField<Type, PatchField, SlicedPatchField, GeoMesh>
|
SlicedGeometricField<Type, PatchField, SlicedPatchField, GeoMesh>
|
||||||
>
|
>::New
|
||||||
(
|
|
||||||
new SlicedGeometricField<Type, PatchField, SlicedPatchField, GeoMesh>
|
|
||||||
(
|
(
|
||||||
*this
|
*this
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,25 +339,8 @@ template
|
|||||||
Foam::SlicedGeometricField<Type, PatchField, SlicedPatchField, GeoMesh>::
|
Foam::SlicedGeometricField<Type, PatchField, SlicedPatchField, GeoMesh>::
|
||||||
~SlicedGeometricField()
|
~SlicedGeometricField()
|
||||||
{
|
{
|
||||||
// Set the internalField storage pointer to nullptr before its destruction
|
// Set internalField to nullptr to avoid deletion of underlying field
|
||||||
// to protect the field it a slice of.
|
UList<Type>::shallowCopy(UList<Type>());
|
||||||
UList<Type>::shallowCopy(UList<Type>(nullptr, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template
|
|
||||||
<
|
|
||||||
class Type,
|
|
||||||
template<class> class PatchField,
|
|
||||||
template<class> class SlicedPatchField,
|
|
||||||
class GeoMesh
|
|
||||||
>
|
|
||||||
Foam::SlicedGeometricField<Type, PatchField, SlicedPatchField, GeoMesh>::
|
|
||||||
Internal::~Internal()
|
|
||||||
{
|
|
||||||
// Set the internalField storage pointer to nullptr before its destruction
|
|
||||||
// to protect the field it a slice of.
|
|
||||||
UList<Type>::shallowCopy(UList<Type>(nullptr, 0));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017,2022 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -42,10 +42,11 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef SlicedGeometricField_H
|
#ifndef Foam_SlicedGeometricField_H
|
||||||
#define SlicedGeometricField_H
|
#define Foam_SlicedGeometricField_H
|
||||||
|
|
||||||
#include "GeometricField.H"
|
#include "GeometricField.H"
|
||||||
|
#include "SlicedDimensionedField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -69,10 +70,13 @@ class SlicedGeometricField
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
// Public Typedefs
|
||||||
|
|
||||||
typedef typename GeoMesh::Mesh Mesh;
|
typedef typename GeoMesh::Mesh Mesh;
|
||||||
typedef typename GeoMesh::BoundaryMesh BoundaryMesh;
|
typedef typename GeoMesh::BoundaryMesh BoundaryMesh;
|
||||||
|
|
||||||
class Internal;
|
//- The internal field slice for this SlicedGeometricField
|
||||||
|
typedef SlicedDimensionedField<Type, GeoMesh> Internal;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -81,7 +85,8 @@ private:
|
|||||||
|
|
||||||
//- Slice the given field and a create a PtrList of SlicedPatchField
|
//- Slice the given field and a create a PtrList of SlicedPatchField
|
||||||
// from which the boundary field is built
|
// from which the boundary field is built
|
||||||
tmp<FieldField<PatchField, Type>> slicedBoundaryField
|
tmp<FieldField<PatchField, Type>>
|
||||||
|
slicedBoundaryField
|
||||||
(
|
(
|
||||||
const Mesh& mesh,
|
const Mesh& mesh,
|
||||||
const Field<Type>& completeField,
|
const Field<Type>& completeField,
|
||||||
@ -91,7 +96,8 @@ private:
|
|||||||
|
|
||||||
//- Slice the given field and a create a PtrList of SlicedPatchField
|
//- Slice the given field and a create a PtrList of SlicedPatchField
|
||||||
// from which the boundary field is built
|
// from which the boundary field is built
|
||||||
tmp<FieldField<PatchField, Type>> slicedBoundaryField
|
tmp<FieldField<PatchField, Type>>
|
||||||
|
slicedBoundaryField
|
||||||
(
|
(
|
||||||
const Mesh& mesh,
|
const Mesh& mesh,
|
||||||
const FieldField<PatchField, Type>& bField,
|
const FieldField<PatchField, Type>& bField,
|
||||||
@ -133,7 +139,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from components and separate fields to slice for the
|
//- Construct from components and separate fields to slice for the
|
||||||
// internal field and boundary field
|
//- internal field and boundary field
|
||||||
SlicedGeometricField
|
SlicedGeometricField
|
||||||
(
|
(
|
||||||
const IOobject&,
|
const IOobject&,
|
||||||
@ -146,7 +152,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from GeometricField. Reuses full internal and
|
//- Construct from GeometricField. Reuses full internal and
|
||||||
// patch fields except on couples (preserveCouples=true).
|
//- patch fields except on couples (preserveCouples=true).
|
||||||
SlicedGeometricField
|
SlicedGeometricField
|
||||||
(
|
(
|
||||||
const IOobject&,
|
const IOobject&,
|
||||||
@ -154,7 +160,7 @@ public:
|
|||||||
const bool preserveCouples=true
|
const bool preserveCouples=true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct as copy
|
//- Copy construct
|
||||||
SlicedGeometricField
|
SlicedGeometricField
|
||||||
(
|
(
|
||||||
const SlicedGeometricField
|
const SlicedGeometricField
|
||||||
@ -175,50 +181,13 @@ public:
|
|||||||
~SlicedGeometricField();
|
~SlicedGeometricField();
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member Functions
|
||||||
|
|
||||||
//- Correct boundary field
|
//- Correct boundary field
|
||||||
void correctBoundaryConditions();
|
void correctBoundaryConditions();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class SlicedGeometricField::Internal Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
//- The internalField of a SlicedGeometricField
|
|
||||||
template
|
|
||||||
<
|
|
||||||
class Type,
|
|
||||||
template<class> class PatchField,
|
|
||||||
template<class> class SlicedPatchField,
|
|
||||||
class GeoMesh
|
|
||||||
>
|
|
||||||
class SlicedGeometricField<Type, PatchField, SlicedPatchField, GeoMesh>::
|
|
||||||
Internal
|
|
||||||
:
|
|
||||||
public GeometricField<Type, PatchField, GeoMesh>::Internal
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from components and field to slice
|
|
||||||
Internal
|
|
||||||
(
|
|
||||||
const IOobject&,
|
|
||||||
const Mesh&,
|
|
||||||
const dimensionSet&,
|
|
||||||
const Field<Type>& iField
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
~Internal();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -45,7 +45,14 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Geometric internal field
|
||||||
template<class Type, class GeoMesh> class DimensionedField;
|
template<class Type, class GeoMesh> class DimensionedField;
|
||||||
|
|
||||||
|
// Geometric boundary field
|
||||||
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
|
class GeometricBoundaryField;
|
||||||
|
|
||||||
|
// Geometric field (internal + boundary)
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
class GeometricField;
|
class GeometricField;
|
||||||
|
|
||||||
@ -61,6 +68,11 @@ template<class Type> class pointPatchField;
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
using PointField = GeometricField<Type, pointPatchField, pointMesh>;
|
using PointField = GeometricField<Type, pointPatchField, pointMesh>;
|
||||||
|
|
||||||
|
//- A point boundary field for a given Type
|
||||||
|
template<class Type>
|
||||||
|
using PointBoundaryField =
|
||||||
|
GeometricBoundaryField<Type, pointPatchField, pointMesh>;
|
||||||
|
|
||||||
//- A point internal field for a given type
|
//- A point internal field for a given type
|
||||||
template<class Type>
|
template<class Type>
|
||||||
using PointInternalField = DimensionedField<Type, pointMesh>;
|
using PointInternalField = DimensionedField<Type, pointMesh>;
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -36,8 +36,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef LduInterfaceField_H
|
#ifndef Foam_LduInterfaceField_H
|
||||||
#define LduInterfaceField_H
|
#define Foam_LduInterfaceField_H
|
||||||
|
|
||||||
#include "lduInterfaceField.H"
|
#include "lduInterfaceField.H"
|
||||||
#include "primitiveFieldsFwd.H"
|
#include "primitiveFieldsFwd.H"
|
||||||
@ -48,8 +48,9 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declarations
|
// Forward Declarations
|
||||||
class lduMatrix;
|
class lduMatrix;
|
||||||
|
template<class Type> class LduInterfaceField;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class LduInterfaceField Declaration
|
Class LduInterfaceField Declaration
|
||||||
|
|||||||
@ -24,15 +24,15 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Type
|
Type
|
||||||
lduInterfaceFieldPtrsList
|
LduInterfaceFieldPtrsList
|
||||||
|
|
||||||
Description
|
Description
|
||||||
List of coupled interface fields to be used in coupling.
|
List of coupled interface fields to be used in coupling.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef LduInterfaceFieldPtrsList_H
|
#ifndef Foam_LduInterfaceFieldPtrsList_H
|
||||||
#define LduInterfaceFieldPtrsList_H
|
#define Foam_LduInterfaceFieldPtrsList_H
|
||||||
|
|
||||||
#include "LduInterfaceField.H"
|
#include "LduInterfaceField.H"
|
||||||
#include "UPtrList.H"
|
#include "UPtrList.H"
|
||||||
@ -42,25 +42,9 @@ Description
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
//- Store lists of LduInterfaceField as a UPtrList
|
||||||
Class LduInterfaceFieldPtrsList Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
class LduInterfaceFieldPtrsList
|
using LduInterfaceFieldPtrsList = UPtrList<const LduInterfaceField<Type>>;
|
||||||
:
|
|
||||||
public UPtrList<const LduInterfaceField<Type>>
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
LduInterfaceFieldPtrsList(label size)
|
|
||||||
:
|
|
||||||
UPtrList<const LduInterfaceField<Type>>(size)
|
|
||||||
{}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
|
|||||||
@ -50,8 +50,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef LduMatrix_H
|
#ifndef Foam_LduMatrix_H
|
||||||
#define LduMatrix_H
|
#define Foam_LduMatrix_H
|
||||||
|
|
||||||
#include "lduMesh.H"
|
#include "lduMesh.H"
|
||||||
#include "Field.H"
|
#include "Field.H"
|
||||||
|
|||||||
@ -27,7 +27,6 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "LduMatrix.H"
|
#include "LduMatrix.H"
|
||||||
#include "LduInterfaceFieldPtrsList.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -36,8 +36,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef lduInterface_H
|
#ifndef Foam_lduInterface_H
|
||||||
#define lduInterface_H
|
#define Foam_lduInterface_H
|
||||||
|
|
||||||
#include "labelField.H"
|
#include "labelField.H"
|
||||||
#include "typeInfo.H"
|
#include "typeInfo.H"
|
||||||
@ -48,6 +48,9 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Forward Declarations
|
||||||
|
class lduInterface;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class lduInterface Declaration
|
Class lduInterface Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -31,8 +31,8 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef lduInterfacePtrsList_H
|
#ifndef Foam_lduInterfacePtrsList_H
|
||||||
#define lduInterfacePtrsList_H
|
#define Foam_lduInterfacePtrsList_H
|
||||||
|
|
||||||
#include "lduInterface.H"
|
#include "lduInterface.H"
|
||||||
#include "UPtrList.H"
|
#include "UPtrList.H"
|
||||||
@ -41,8 +41,11 @@ Description
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
typedef UPtrList<const lduInterface> lduInterfacePtrsList;
|
|
||||||
}
|
//- Store lists of lduInterface as a UPtrList
|
||||||
|
typedef UPtrList<const lduInterface> lduInterfacePtrsList;
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -35,10 +35,10 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef pointBoundaryMesh_H
|
#ifndef Foam_pointBoundaryMesh_H
|
||||||
#define pointBoundaryMesh_H
|
#define Foam_pointBoundaryMesh_H
|
||||||
|
|
||||||
#include "pointPatchList.H"
|
#include "pointPatch.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -35,12 +35,13 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef pointPatch_H
|
#ifndef Foam_pointPatch_H
|
||||||
#define pointPatch_H
|
#define Foam_pointPatch_H
|
||||||
|
|
||||||
#include "labelList.H"
|
#include "labelList.H"
|
||||||
#include "vectorField.H"
|
#include "vectorField.H"
|
||||||
#include "pointField.H"
|
#include "pointField.H"
|
||||||
|
#include "PtrList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -50,8 +51,12 @@ namespace Foam
|
|||||||
// Forward Declarations
|
// Forward Declarations
|
||||||
class pointBoundaryMesh;
|
class pointBoundaryMesh;
|
||||||
class pointConstraint;
|
class pointConstraint;
|
||||||
|
class pointPatch;
|
||||||
class PstreamBuffers;
|
class PstreamBuffers;
|
||||||
|
|
||||||
|
//- Store lists of pointPatch as a PtrList
|
||||||
|
typedef PtrList<pointPatch> pointPatchList;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class pointPatch Declaration
|
Class pointPatch Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,57 +1,9 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | www.openfoam.com
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2011 OpenFOAM Foundation
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Typedef
|
|
||||||
Foam::pointPatchList
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
container classes for pointPatch
|
Compatibility include (MAR-2022)
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef pointPatchList_H
|
|
||||||
#define pointPatchList_H
|
|
||||||
|
|
||||||
#include "pointPatch.H"
|
#include "pointPatch.H"
|
||||||
#include "PtrList.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
typedef PtrList<pointPatch> pointPatchList;
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -39,8 +39,8 @@ SourceFiles
|
|||||||
#ifndef Foam_polyBoundaryMesh_H
|
#ifndef Foam_polyBoundaryMesh_H
|
||||||
#define Foam_polyBoundaryMesh_H
|
#define Foam_polyBoundaryMesh_H
|
||||||
|
|
||||||
#include "polyPatchList.H"
|
|
||||||
#include "regIOobject.H"
|
#include "regIOobject.H"
|
||||||
|
#include "polyPatch.H"
|
||||||
#include "labelPair.H"
|
#include "labelPair.H"
|
||||||
#include "HashSet.H"
|
#include "HashSet.H"
|
||||||
|
|
||||||
@ -56,7 +56,6 @@ class wordRes;
|
|||||||
|
|
||||||
Ostream& operator<<(Ostream& os, const polyBoundaryMesh& pbm);
|
Ostream& operator<<(Ostream& os, const polyBoundaryMesh& pbm);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class polyBoundaryMesh Declaration
|
Class polyBoundaryMesh Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -959,7 +959,7 @@ Foam::polyMesh::cellTree() const
|
|||||||
|
|
||||||
void Foam::polyMesh::addPatches
|
void Foam::polyMesh::addPatches
|
||||||
(
|
(
|
||||||
PtrList<polyPatch>& plist,
|
polyPatchList& plist,
|
||||||
const bool validBoundary
|
const bool validBoundary
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -1060,7 +1060,7 @@ void Foam::polyMesh::addPatches
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Acquire ownership of the pointers
|
// Acquire ownership of the pointers
|
||||||
PtrList<polyPatch> plist(const_cast<List<polyPatch*>&>(p));
|
polyPatchList plist(const_cast<List<polyPatch*>&>(p));
|
||||||
|
|
||||||
addPatches(plist, validBoundary);
|
addPatches(plist, validBoundary);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -583,7 +583,7 @@ public:
|
|||||||
//- Add boundary patches
|
//- Add boundary patches
|
||||||
void addPatches
|
void addPatches
|
||||||
(
|
(
|
||||||
PtrList<polyPatch>& plist,
|
polyPatchList& plist,
|
||||||
const bool validBoundary = true
|
const bool validBoundary = true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -39,14 +39,15 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef polyPatch_H
|
#ifndef Foam_polyPatch_H
|
||||||
#define polyPatch_H
|
#define Foam_polyPatch_H
|
||||||
|
|
||||||
#include "patchIdentifier.H"
|
#include "patchIdentifier.H"
|
||||||
#include "primitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
#include "typeInfo.H"
|
#include "typeInfo.H"
|
||||||
#include "runTimeSelectionTables.H"
|
#include "runTimeSelectionTables.H"
|
||||||
#include "SubField.H"
|
#include "SubField.H"
|
||||||
|
#include "PtrList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -59,8 +60,10 @@ class polyPatch;
|
|||||||
class polyTopoChange;
|
class polyTopoChange;
|
||||||
class PstreamBuffers;
|
class PstreamBuffers;
|
||||||
|
|
||||||
Ostream& operator<<(Ostream&, const polyPatch&);
|
//- Store lists of polyPatch as a PtrList
|
||||||
|
typedef PtrList<polyPatch> polyPatchList;
|
||||||
|
|
||||||
|
Ostream& operator<<(Ostream&, const polyPatch&);
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class polyPatch Declaration
|
Class polyPatch Declaration
|
||||||
|
|||||||
@ -1,57 +1,9 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | www.openfoam.com
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2011 OpenFOAM Foundation
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Typedef
|
|
||||||
Foam::polyPatchList
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
container classes for polyPatch
|
Compatibility include (MAR-2022)
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef polyPatchList_H
|
|
||||||
#define polyPatchList_H
|
|
||||||
|
|
||||||
#include "polyPatch.H"
|
#include "polyPatch.H"
|
||||||
#include "PtrList.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
typedef PtrList<polyPatch> polyPatchList;
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -36,15 +36,15 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef boundaryMesh_H
|
#ifndef Foam_boundaryMesh_H
|
||||||
#define boundaryMesh_H
|
#define Foam_boundaryMesh_H
|
||||||
|
|
||||||
#include "bMesh.H"
|
#include "bMesh.H"
|
||||||
#include "boundaryPatch.H"
|
#include "boundaryPatch.H"
|
||||||
|
#include "className.H"
|
||||||
|
#include "polyPatch.H"
|
||||||
#include "PrimitivePatch.H"
|
#include "PrimitivePatch.H"
|
||||||
#include "PtrList.H"
|
#include "PtrList.H"
|
||||||
#include "polyPatchList.H"
|
|
||||||
#include "className.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -37,8 +37,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef boundaryPatch_H
|
#ifndef Foam_boundaryPatch_H
|
||||||
#define boundaryPatch_H
|
#define Foam_boundaryPatch_H
|
||||||
|
|
||||||
#include "patchIdentifier.H"
|
#include "patchIdentifier.H"
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
|
|||||||
@ -42,7 +42,7 @@ Author
|
|||||||
#ifndef Foam_faBoundaryMesh_H
|
#ifndef Foam_faBoundaryMesh_H
|
||||||
#define Foam_faBoundaryMesh_H
|
#define Foam_faBoundaryMesh_H
|
||||||
|
|
||||||
#include "faPatchList.H"
|
#include "faPatch.H"
|
||||||
#include "lduInterfacePtrsList.H"
|
#include "lduInterfacePtrsList.H"
|
||||||
#include "wordList.H"
|
#include "wordList.H"
|
||||||
#include "pointField.H"
|
#include "pointField.H"
|
||||||
|
|||||||
@ -34,11 +34,10 @@ Author
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef faProcessorTopology_H
|
#ifndef Foam_faProcessorTopology_H
|
||||||
#define faProcessorTopology_H
|
#define Foam_faProcessorTopology_H
|
||||||
|
|
||||||
#include "ProcessorTopology.H"
|
#include "ProcessorTopology.H"
|
||||||
#include "faPatchList.H"
|
|
||||||
#include "processorFaPatch.H"
|
#include "processorFaPatch.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -438,7 +438,7 @@ Foam::faMesh::faMesh(const polyPatch& pp)
|
|||||||
DebugInFunction << "Creating from polyPatch:" << pp.name() << endl;
|
DebugInFunction << "Creating from polyPatch:" << pp.name() << endl;
|
||||||
|
|
||||||
// Add single faPatch "default", but with processor connections
|
// Add single faPatch "default", but with processor connections
|
||||||
PtrList<faPatch> newPatches
|
faPatchList newPatches
|
||||||
(
|
(
|
||||||
createOnePatch("default")
|
createOnePatch("default")
|
||||||
);
|
);
|
||||||
@ -479,7 +479,7 @@ Foam::faMesh::faMesh
|
|||||||
{
|
{
|
||||||
DebugInFunction << "Creating from definition (dictionary)" << endl;
|
DebugInFunction << "Creating from definition (dictionary)" << endl;
|
||||||
|
|
||||||
PtrList<faPatch> newPatches
|
faPatchList newPatches
|
||||||
(
|
(
|
||||||
createPatchList
|
createPatchList
|
||||||
(
|
(
|
||||||
|
|||||||
@ -414,14 +414,14 @@ class faMesh
|
|||||||
// Helpers
|
// Helpers
|
||||||
|
|
||||||
//- Create a single patch
|
//- Create a single patch
|
||||||
PtrList<faPatch> createOnePatch
|
faPatchList createOnePatch
|
||||||
(
|
(
|
||||||
const word& patchName,
|
const word& patchName,
|
||||||
const word& patchType = ""
|
const word& patchType = ""
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Create list of patches from boundary definition
|
//- Create list of patches from boundary definition
|
||||||
PtrList<faPatch> createPatchList
|
faPatchList createPatchList
|
||||||
(
|
(
|
||||||
const dictionary& bndDict,
|
const dictionary& bndDict,
|
||||||
const word& emptyPatchName = "",
|
const word& emptyPatchName = "",
|
||||||
@ -526,7 +526,7 @@ public:
|
|||||||
//- Add boundary patches. Constructor helper
|
//- Add boundary patches. Constructor helper
|
||||||
void addFaPatches
|
void addFaPatches
|
||||||
(
|
(
|
||||||
PtrList<faPatch>& plist,
|
faPatchList& plist,
|
||||||
const bool validBoundary = true
|
const bool validBoundary = true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ License
|
|||||||
|
|
||||||
void Foam::faMesh::addFaPatches
|
void Foam::faMesh::addFaPatches
|
||||||
(
|
(
|
||||||
PtrList<faPatch>& plist,
|
faPatchList& plist,
|
||||||
const bool validBoundary
|
const bool validBoundary
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -67,13 +67,13 @@ void Foam::faMesh::addFaPatches
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Acquire ownership of the pointers
|
// Acquire ownership of the pointers
|
||||||
PtrList<faPatch> plist(const_cast<List<faPatch*>&>(p));
|
faPatchList plist(const_cast<List<faPatch*>&>(p));
|
||||||
|
|
||||||
addFaPatches(plist, validBoundary);
|
addFaPatches(plist, validBoundary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::PtrList<Foam::faPatch> Foam::faMesh::createOnePatch
|
Foam::faPatchList Foam::faMesh::createOnePatch
|
||||||
(
|
(
|
||||||
const word& patchName,
|
const word& patchName,
|
||||||
const word& patchType
|
const word& patchType
|
||||||
@ -98,7 +98,7 @@ Foam::PtrList<Foam::faPatch> Foam::faMesh::createOnePatch
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::PtrList<Foam::faPatch> Foam::faMesh::createPatchList
|
Foam::faPatchList Foam::faMesh::createPatchList
|
||||||
(
|
(
|
||||||
const dictionary& bndDict,
|
const dictionary& bndDict,
|
||||||
const word& emptyPatchName,
|
const word& emptyPatchName,
|
||||||
@ -495,7 +495,7 @@ Foam::PtrList<Foam::faPatch> Foam::faMesh::createPatchList
|
|||||||
// Now convert list of definitions to list of patches
|
// Now convert list of definitions to list of patches
|
||||||
|
|
||||||
label nPatches = 0;
|
label nPatches = 0;
|
||||||
PtrList<faPatch> newPatches(faPatchDefs.size());
|
faPatchList newPatches(faPatchDefs.size());
|
||||||
|
|
||||||
for (faPatchData& patchDef : faPatchDefs)
|
for (faPatchData& patchDef : faPatchDefs)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -49,6 +49,7 @@ SourceFiles
|
|||||||
#include "labelList.H"
|
#include "labelList.H"
|
||||||
#include "pointField.H"
|
#include "pointField.H"
|
||||||
#include "typeInfo.H"
|
#include "typeInfo.H"
|
||||||
|
#include "PtrList.H"
|
||||||
#include "faPatchFieldsFwd.H"
|
#include "faPatchFieldsFwd.H"
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
#include "runTimeSelectionTables.H"
|
#include "runTimeSelectionTables.H"
|
||||||
@ -61,6 +62,10 @@ namespace Foam
|
|||||||
// Forward Declarations
|
// Forward Declarations
|
||||||
class faBoundaryMesh;
|
class faBoundaryMesh;
|
||||||
class faPatch;
|
class faPatch;
|
||||||
|
|
||||||
|
//- Store lists of faPatch as a PtrList
|
||||||
|
typedef PtrList<faPatch> faPatchList;
|
||||||
|
|
||||||
Ostream& operator<<(Ostream&, const faPatch&);
|
Ostream& operator<<(Ostream&, const faPatch&);
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
|
|||||||
@ -1,57 +1,9 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | www.openfoam.com
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2016-2017 Wikki 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Typedef
|
|
||||||
foam::faPatchList
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Container classes for faPatch
|
Compatibility include (MAR-2022)
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef faPatchList_H
|
|
||||||
#define faPatchList_H
|
|
||||||
|
|
||||||
#include "faPatch.H"
|
#include "faPatch.H"
|
||||||
#include "PtrList.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
typedef PtrList<faPatch> faPatchList;
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -42,7 +42,14 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Geometric internal field
|
||||||
template<class Type, class GeoMesh> class DimensionedField;
|
template<class Type, class GeoMesh> class DimensionedField;
|
||||||
|
|
||||||
|
// Geometric boundary field
|
||||||
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
|
class GeometricBoundaryField;
|
||||||
|
|
||||||
|
// Geometric field (internal + boundary)
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
class GeometricField;
|
class GeometricField;
|
||||||
|
|
||||||
@ -57,6 +64,10 @@ template<class Type> class faPatchField;
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
using AreaField = GeometricField<Type, faPatchField, areaMesh>;
|
using AreaField = GeometricField<Type, faPatchField, areaMesh>;
|
||||||
|
|
||||||
|
//- An area boundary field for a given Type
|
||||||
|
template<class Type>
|
||||||
|
using AreaBoundaryField = GeometricBoundaryField<Type, faPatchField, areaMesh>;
|
||||||
|
|
||||||
//- An area internal field for a given type
|
//- An area internal field for a given type
|
||||||
template<class Type>
|
template<class Type>
|
||||||
using AreaInternalField = DimensionedField<Type, areaMesh>;
|
using AreaInternalField = DimensionedField<Type, areaMesh>;
|
||||||
|
|||||||
@ -41,6 +41,7 @@ Description
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Geometric field (internal + boundary)
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
class GeometricField;
|
class GeometricField;
|
||||||
|
|
||||||
|
|||||||
@ -138,8 +138,7 @@ lnGradScheme<Type>::lnGrad
|
|||||||
deltaCoeffs[faceI]*(vf[neighbour[faceI]] - vf[owner[faceI]]);
|
deltaCoeffs[faceI]*(vf[neighbour[faceI]] - vf[owner[faceI]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename GeometricField<Type, faePatchField, edgeMesh>::Boundary& ssfb =
|
auto& ssfb = ssf.boundaryFieldRef();
|
||||||
ssf.boundaryFieldRef();
|
|
||||||
|
|
||||||
forAll(vf.boundaryField(), patchI)
|
forAll(vf.boundaryField(), patchI)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -317,8 +317,7 @@ Foam::edgeInterpolationScheme<Type>::interpolate
|
|||||||
|
|
||||||
// Interpolate across coupled patches using given lambdas
|
// Interpolate across coupled patches using given lambdas
|
||||||
|
|
||||||
const typename GeometricField<Type, faPatchField, areaMesh>::Boundary&
|
const auto& vfb = vf.boundaryField();
|
||||||
vfb = vf.boundaryField();
|
|
||||||
|
|
||||||
forAll(lambdas.boundaryField(), pi)
|
forAll(lambdas.boundaryField(), pi)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -123,8 +123,7 @@ Foam::tmp<Foam::edgeScalarField> Foam::faNVDscheme<Type,NVDweight>::weights
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GeometricField<scalar, faePatchField, edgeMesh>::Boundary&
|
auto& bWeights = weightingFactors.boundaryFieldRef();
|
||||||
bWeights = weightingFactors.boundaryFieldRef();
|
|
||||||
|
|
||||||
forAll(bWeights, patchI)
|
forAll(bWeights, patchI)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -33,7 +33,7 @@ License
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type>> Foam::volSurfaceMapping::mapToSurface
|
Foam::tmp<Foam::Field<Type>> Foam::volSurfaceMapping::mapToSurface
|
||||||
(
|
(
|
||||||
const typename GeometricField<Type, fvPatchField, volMesh>::Boundary& df
|
const GeometricBoundaryField<Type, fvPatchField, volMesh>& df
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Grab labels for all faces in faMesh
|
// Grab labels for all faces in faMesh
|
||||||
@ -98,7 +98,7 @@ Foam::tmp<Foam::Field<Type>> Foam::volSurfaceMapping::mapToSurface
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type>> Foam::volSurfaceMapping::mapInternalToSurface
|
Foam::tmp<Foam::Field<Type>> Foam::volSurfaceMapping::mapInternalToSurface
|
||||||
(
|
(
|
||||||
const typename GeometricField<Type, fvPatchField, volMesh>::Boundary& df
|
const GeometricBoundaryField<Type, fvPatchField, volMesh>& df
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Grab labels for all faces in faMesh
|
// Grab labels for all faces in faMesh
|
||||||
@ -134,7 +134,7 @@ template<class Type>
|
|||||||
void Foam::volSurfaceMapping::mapToVolume
|
void Foam::volSurfaceMapping::mapToVolume
|
||||||
(
|
(
|
||||||
const GeometricField<Type, faPatchField, areaMesh>& af,
|
const GeometricField<Type, faPatchField, areaMesh>& af,
|
||||||
typename GeometricField<Type, fvPatchField, volMesh>::Boundary& bf
|
GeometricBoundaryField<Type, fvPatchField, volMesh>& bf
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Grab labels for all faces in faMesh
|
// Grab labels for all faces in faMesh
|
||||||
@ -166,7 +166,7 @@ template<class Type>
|
|||||||
void Foam::volSurfaceMapping::mapToVolume
|
void Foam::volSurfaceMapping::mapToVolume
|
||||||
(
|
(
|
||||||
const tmp<GeometricField<Type, faPatchField, areaMesh>>& taf,
|
const tmp<GeometricField<Type, faPatchField, areaMesh>>& taf,
|
||||||
typename GeometricField<Type, fvPatchField, volMesh>::Boundary& bf
|
GeometricBoundaryField<Type, fvPatchField, volMesh>& bf
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
mapToVolume(taf(), bf);
|
mapToVolume(taf(), bf);
|
||||||
|
|||||||
@ -38,8 +38,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef volSurfaceMapping_H
|
#ifndef Foam_volSurfaceMapping_H
|
||||||
#define volSurfaceMapping_H
|
#define Foam_volSurfaceMapping_H
|
||||||
|
|
||||||
#include "faMesh.H"
|
#include "faMesh.H"
|
||||||
#include "volMesh.H"
|
#include "volMesh.H"
|
||||||
@ -49,6 +49,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Forward Declarations
|
||||||
template<class Type> class fvPatchField;
|
template<class Type> class fvPatchField;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
@ -86,12 +87,11 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Map Boundary field to surface
|
//- Map volume boundary field to surface
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type>> mapToSurface
|
tmp<Field<Type>> mapToSurface
|
||||||
(
|
(
|
||||||
const typename
|
const GeometricBoundaryField<Type, fvPatchField, volMesh>& df
|
||||||
GeometricField<Type, fvPatchField, volMesh>::Boundary& df
|
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Map vol Field to surface Field
|
//- Map vol Field to surface Field
|
||||||
@ -102,8 +102,7 @@ public:
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type>> mapInternalToSurface
|
tmp<Field<Type>> mapInternalToSurface
|
||||||
(
|
(
|
||||||
const typename
|
const GeometricBoundaryField<Type, fvPatchField, volMesh>& df
|
||||||
GeometricField<Type, fvPatchField, volMesh>::Boundary& df
|
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Map surface field to volume boundary field
|
//- Map surface field to volume boundary field
|
||||||
@ -111,7 +110,7 @@ public:
|
|||||||
void mapToVolume
|
void mapToVolume
|
||||||
(
|
(
|
||||||
const GeometricField<Type, faPatchField, areaMesh>& af,
|
const GeometricField<Type, faPatchField, areaMesh>& af,
|
||||||
typename GeometricField<Type, fvPatchField, volMesh>::Boundary& bf
|
GeometricBoundaryField<Type, fvPatchField, volMesh>& bf
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Map surface tmp field to volume boundary field
|
//- Map surface tmp field to volume boundary field
|
||||||
@ -119,7 +118,7 @@ public:
|
|||||||
void mapToVolume
|
void mapToVolume
|
||||||
(
|
(
|
||||||
const tmp<GeometricField<Type, faPatchField, areaMesh>>& taf,
|
const tmp<GeometricField<Type, faPatchField, areaMesh>>& taf,
|
||||||
typename GeometricField<Type, fvPatchField, volMesh>::Boundary& bf
|
GeometricBoundaryField<Type, fvPatchField, volMesh>& bf
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Map surface field to field
|
//- Map surface field to field
|
||||||
|
|||||||
@ -227,8 +227,7 @@ void Foam::MRFZone::zero
|
|||||||
phii[internalFaces_[i]] = Zero;
|
phii[internalFaces_[i]] = Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
typename GeometricField<Type, fvsPatchField, surfaceMesh>::Boundary& phibf =
|
auto& phibf = phi.boundaryFieldRef();
|
||||||
phi.boundaryFieldRef();
|
|
||||||
|
|
||||||
forAll(includedFaces_, patchi)
|
forAll(includedFaces_, patchi)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -40,7 +40,7 @@ Foam::slicedFvPatchField<Type>::slicedFvPatchField
|
|||||||
:
|
:
|
||||||
fvPatchField<Type>(p, iF, Field<Type>())
|
fvPatchField<Type>(p, iF, Field<Type>())
|
||||||
{
|
{
|
||||||
// Set the fvPatchField to a slice of the given complete field
|
// Set fvPatchField to a slice of the given complete field
|
||||||
UList<Type>::shallowCopy(p.patchSlice(completeField));
|
UList<Type>::shallowCopy(p.patchSlice(completeField));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,9 +145,8 @@ Foam::slicedFvPatchField<Type>::clone
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::slicedFvPatchField<Type>::~slicedFvPatchField()
|
Foam::slicedFvPatchField<Type>::~slicedFvPatchField()
|
||||||
{
|
{
|
||||||
// Set the fvPatchField storage pointer to nullptr before its destruction
|
// Set fvPatchField to nullptr to avoid deletion of underlying field
|
||||||
// to protect the field it a slice of.
|
UList<Type>::shallowCopy(UList<Type>());
|
||||||
UList<Type>::shallowCopy(UList<Type>(nullptr, 0));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,7 @@ Foam::slicedFvsPatchField<Type>::slicedFvsPatchField
|
|||||||
:
|
:
|
||||||
fvsPatchField<Type>(p, iF, Field<Type>())
|
fvsPatchField<Type>(p, iF, Field<Type>())
|
||||||
{
|
{
|
||||||
// Set the fvsPatchField to a slice of the given complete field
|
// Set fvsPatchField to a slice of the given complete field
|
||||||
UList<Type>::shallowCopy(p.patchSlice(completeField));
|
UList<Type>::shallowCopy(p.patchSlice(completeField));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,9 +144,8 @@ Foam::slicedFvsPatchField<Type>::clone
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::slicedFvsPatchField<Type>::~slicedFvsPatchField()
|
Foam::slicedFvsPatchField<Type>::~slicedFvsPatchField()
|
||||||
{
|
{
|
||||||
// Set the fvsPatchField storage pointer to nullptr before its destruction
|
// Set fvsPatchField to nullptr to avoid deletion of underlying field
|
||||||
// to protect the field it a slice of.
|
UList<Type>::shallowCopy(UList<Type>());
|
||||||
UList<Type>::shallowCopy(UList<Type>(nullptr, 0));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -44,6 +44,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Geometric field (internal + boundary)
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
class GeometricField;
|
class GeometricField;
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,14 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Geometric internal field
|
||||||
template<class Type, class GeoMesh> class DimensionedField;
|
template<class Type, class GeoMesh> class DimensionedField;
|
||||||
|
|
||||||
|
// Geometric boundary field
|
||||||
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
|
class GeometricBoundaryField;
|
||||||
|
|
||||||
|
// Geometric field (internal + boundary)
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
class GeometricField;
|
class GeometricField;
|
||||||
|
|
||||||
@ -61,6 +68,10 @@ template<class Type> class fvPatchField;
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
using VolumeField = GeometricField<Type, fvPatchField, volMesh>;
|
using VolumeField = GeometricField<Type, fvPatchField, volMesh>;
|
||||||
|
|
||||||
|
//- A volume boundary field for a given Type
|
||||||
|
template<class Type>
|
||||||
|
using VolumeBoundaryField = GeometricBoundaryField<Type, fvPatchField, volMesh>;
|
||||||
|
|
||||||
//- A volume internal field for a given Type
|
//- A volume internal field for a given Type
|
||||||
template<class Type>
|
template<class Type>
|
||||||
using VolumeInternalField = DimensionedField<Type, volMesh>;
|
using VolumeInternalField = DimensionedField<Type, volMesh>;
|
||||||
|
|||||||
@ -150,10 +150,7 @@ void Foam::fv::gaussGrad<Type>::correctBoundaryConditions
|
|||||||
>& gGrad
|
>& gGrad
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
typename GeometricField
|
auto& gGradbf = gGrad.boundaryFieldRef();
|
||||||
<
|
|
||||||
typename outerProduct<vector, Type>::type, fvPatchField, volMesh
|
|
||||||
>::Boundary& gGradbf = gGrad.boundaryFieldRef();
|
|
||||||
|
|
||||||
forAll(vsf.boundaryField(), patchi)
|
forAll(vsf.boundaryField(), patchi)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -122,8 +122,7 @@ Foam::fv::cellLimitedGrad<Type, Limiter>::calcGrad
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const typename GeometricField<Type, fvPatchField, volMesh>::Boundary& bsf =
|
const auto& bsf = vsf.boundaryField();
|
||||||
vsf.boundaryField();
|
|
||||||
|
|
||||||
forAll(bsf, patchi)
|
forAll(bsf, patchi)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -35,10 +35,10 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef fvBoundaryMesh_H
|
#ifndef Foam_fvBoundaryMesh_H
|
||||||
#define fvBoundaryMesh_H
|
#define Foam_fvBoundaryMesh_H
|
||||||
|
|
||||||
#include "fvPatchList.H"
|
#include "fvPatch.H"
|
||||||
#include "lduInterfacePtrsList.H"
|
#include "lduInterfacePtrsList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -5,8 +5,8 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017,2022 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2021 OpenCFD Ltd.
|
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -67,11 +67,7 @@ void Foam::fvMesh::clearGeomNotOldVol()
|
|||||||
MoveableMeshObject
|
MoveableMeshObject
|
||||||
>(*this);
|
>(*this);
|
||||||
|
|
||||||
slicedVolScalarField::Internal* VPtr =
|
deleteDemandDrivenData(VPtr_);
|
||||||
static_cast<slicedVolScalarField::Internal*>(VPtr_);
|
|
||||||
deleteDemandDrivenData(VPtr);
|
|
||||||
VPtr_ = nullptr;
|
|
||||||
|
|
||||||
deleteDemandDrivenData(SfPtr_);
|
deleteDemandDrivenData(SfPtr_);
|
||||||
deleteDemandDrivenData(magSfPtr_);
|
deleteDemandDrivenData(magSfPtr_);
|
||||||
deleteDemandDrivenData(CPtr_);
|
deleteDemandDrivenData(CPtr_);
|
||||||
@ -81,11 +77,11 @@ void Foam::fvMesh::clearGeomNotOldVol()
|
|||||||
|
|
||||||
void Foam::fvMesh::updateGeomNotOldVol()
|
void Foam::fvMesh::updateGeomNotOldVol()
|
||||||
{
|
{
|
||||||
bool haveV = (VPtr_ != nullptr);
|
const bool haveV = (VPtr_ != nullptr);
|
||||||
bool haveSf = (SfPtr_ != nullptr);
|
const bool haveSf = (SfPtr_ != nullptr);
|
||||||
bool haveMagSf = (magSfPtr_ != nullptr);
|
const bool haveMagSf = (magSfPtr_ != nullptr);
|
||||||
bool haveCP = (CPtr_ != nullptr);
|
const bool haveCP = (CPtr_ != nullptr);
|
||||||
bool haveCf = (CfPtr_ != nullptr);
|
const bool haveCf = (CfPtr_ != nullptr);
|
||||||
|
|
||||||
clearGeomNotOldVol();
|
clearGeomNotOldVol();
|
||||||
|
|
||||||
@ -603,7 +599,7 @@ Foam::SolverPerformance<Foam::tensor> Foam::fvMesh::solve
|
|||||||
|
|
||||||
void Foam::fvMesh::addFvPatches
|
void Foam::fvMesh::addFvPatches
|
||||||
(
|
(
|
||||||
PtrList<polyPatch>& plist,
|
polyPatchList& plist,
|
||||||
const bool validBoundary
|
const bool validBoundary
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -626,7 +622,7 @@ void Foam::fvMesh::addFvPatches
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Acquire ownership of the pointers
|
// Acquire ownership of the pointers
|
||||||
PtrList<polyPatch> plist(const_cast<List<polyPatch*>&>(p));
|
polyPatchList plist(const_cast<List<polyPatch*>&>(p));
|
||||||
|
|
||||||
addFvPatches(plist, validBoundary);
|
addFvPatches(plist, validBoundary);
|
||||||
}
|
}
|
||||||
@ -970,10 +966,10 @@ void Foam::fvMesh::updateMesh(const mapPolyMesh& mpm)
|
|||||||
storeOldVol(mpm.oldCellVolumes());
|
storeOldVol(mpm.oldCellVolumes());
|
||||||
|
|
||||||
// Few checks
|
// Few checks
|
||||||
if (VPtr_ && (V().size() != mpm.nOldCells()))
|
if (VPtr_ && (VPtr_->size() != mpm.nOldCells()))
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "V:" << V().size()
|
<< "V:" << VPtr_->size()
|
||||||
<< " not equal to the number of old cells "
|
<< " not equal to the number of old cells "
|
||||||
<< mpm.nOldCells()
|
<< mpm.nOldCells()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
|
|||||||
@ -5,8 +5,8 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017,2022 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2021 OpenCFD Ltd.
|
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -47,8 +47,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef fvMesh_H
|
#ifndef Foam_fvMesh_H
|
||||||
#define fvMesh_H
|
#define Foam_fvMesh_H
|
||||||
|
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "lduMesh.H"
|
#include "lduMesh.H"
|
||||||
@ -58,26 +58,24 @@ SourceFiles
|
|||||||
#include "fvSchemes.H"
|
#include "fvSchemes.H"
|
||||||
#include "fvSolution.H"
|
#include "fvSolution.H"
|
||||||
#include "data.H"
|
#include "data.H"
|
||||||
#include "DimensionedField.H"
|
|
||||||
#include "volFieldsFwd.H"
|
#include "volFieldsFwd.H"
|
||||||
#include "surfaceFieldsFwd.H"
|
#include "surfaceFieldsFwd.H"
|
||||||
#include "pointFieldsFwd.H"
|
#include "pointFieldsFwd.H"
|
||||||
|
#include "SlicedDimensionedField.H"
|
||||||
#include "slicedVolFieldsFwd.H"
|
#include "slicedVolFieldsFwd.H"
|
||||||
#include "slicedSurfaceFieldsFwd.H"
|
#include "slicedSurfaceFieldsFwd.H"
|
||||||
#include "className.H"
|
#include "className.H"
|
||||||
#include "SolverPerformance.H"
|
#include "SolverPerformance.H"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Forward Declarations
|
||||||
class fvMeshLduAddressing;
|
class fvMeshLduAddressing;
|
||||||
class volMesh;
|
class volMesh;
|
||||||
template<class Type>
|
template<class Type> class fvMatrix;
|
||||||
class fvMatrix;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class fvMesh Declaration
|
Class fvMesh Declaration
|
||||||
@ -109,8 +107,8 @@ protected:
|
|||||||
// will take care of the old-time levels.
|
// will take care of the old-time levels.
|
||||||
mutable label curTimeIndex_;
|
mutable label curTimeIndex_;
|
||||||
|
|
||||||
//- Cell volumes old time level
|
//- Cell volumes
|
||||||
mutable void* VPtr_;
|
mutable SlicedDimensionedField<scalar, volMesh>* VPtr_;
|
||||||
|
|
||||||
//- Cell volumes old time level
|
//- Cell volumes old time level
|
||||||
mutable DimensionedField<scalar, volMesh>* V0Ptr_;
|
mutable DimensionedField<scalar, volMesh>* V0Ptr_;
|
||||||
@ -259,7 +257,7 @@ public:
|
|||||||
//- Add boundary patches. Constructor helper
|
//- Add boundary patches. Constructor helper
|
||||||
void addFvPatches
|
void addFvPatches
|
||||||
(
|
(
|
||||||
PtrList<polyPatch>& plist,
|
polyPatchList& plist,
|
||||||
const bool validBoundary = true
|
const bool validBoundary = true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,8 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017,2022 OpenFOAM Foundation
|
||||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -183,7 +183,7 @@ const Foam::volScalarField::Internal& Foam::fvMesh::V() const
|
|||||||
DebugInFunction
|
DebugInFunction
|
||||||
<< "Constructing from primitiveMesh::cellVolumes()" << endl;
|
<< "Constructing from primitiveMesh::cellVolumes()" << endl;
|
||||||
|
|
||||||
VPtr_ = new slicedVolScalarField::Internal
|
VPtr_ = new SlicedDimensionedField<scalar, volMesh>
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
@ -200,7 +200,7 @@ const Foam::volScalarField::Internal& Foam::fvMesh::V() const
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return *static_cast<slicedVolScalarField::Internal*>(VPtr_);
|
return *VPtr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -275,15 +275,9 @@ Foam::tmp<Foam::volScalarField::Internal> Foam::fvMesh::Vsc() const
|
|||||||
{
|
{
|
||||||
return V0() + tFrac*(V() - V0());
|
return V0() + tFrac*(V() - V0());
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
|
||||||
return V();
|
return V();
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return V();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -304,15 +298,9 @@ Foam::tmp<Foam::volScalarField::Internal> Foam::fvMesh::Vsc0() const
|
|||||||
{
|
{
|
||||||
return V0() + t0Frac*(V() - V0());
|
return V0() + t0Frac*(V() - V0());
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
|
||||||
return V0();
|
return V0();
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return V0();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -36,18 +36,19 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef fvPatch_H
|
#ifndef Foam_fvPatch_H
|
||||||
#define fvPatch_H
|
#define Foam_fvPatch_H
|
||||||
|
|
||||||
#include "polyPatch.H"
|
#include "polyPatch.H"
|
||||||
#include "labelList.H"
|
#include "labelList.H"
|
||||||
#include "SubList.H"
|
#include "SubList.H"
|
||||||
|
#include "SubField.H"
|
||||||
|
#include "PtrList.H"
|
||||||
#include "typeInfo.H"
|
#include "typeInfo.H"
|
||||||
|
#include "autoPtr.H"
|
||||||
#include "tmp.H"
|
#include "tmp.H"
|
||||||
#include "primitiveFields.H"
|
#include "primitiveFields.H"
|
||||||
#include "SubField.H"
|
|
||||||
#include "fvPatchFieldsFwd.H"
|
#include "fvPatchFieldsFwd.H"
|
||||||
#include "autoPtr.H"
|
|
||||||
#include "runTimeSelectionTables.H"
|
#include "runTimeSelectionTables.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -57,8 +58,12 @@ namespace Foam
|
|||||||
|
|
||||||
// Forward Declarations
|
// Forward Declarations
|
||||||
class fvBoundaryMesh;
|
class fvBoundaryMesh;
|
||||||
|
class fvPatch;
|
||||||
class surfaceInterpolation;
|
class surfaceInterpolation;
|
||||||
|
|
||||||
|
//- Store lists of fvPatch as a PtrList
|
||||||
|
typedef PtrList<fvPatch> fvPatchList;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class fvPatch Declaration
|
Class fvPatch Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,57 +1,9 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | www.openfoam.com
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2011 OpenFOAM Foundation
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Typedef
|
|
||||||
Foam::fvPatchList
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
container classes for fvPatch
|
Compatibility include (MAR-2022)
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef fvPatchList_H
|
|
||||||
#define fvPatchList_H
|
|
||||||
|
|
||||||
#include "fvPatch.H"
|
#include "fvPatch.H"
|
||||||
#include "PtrList.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
typedef PtrList<fvPatch> fvPatchList;
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -37,8 +37,7 @@ bool Foam::functionObjects::zeroGradient::accept
|
|||||||
const GeometricField<Type, fvPatchField, volMesh>& input
|
const GeometricField<Type, fvPatchField, volMesh>& input
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const typename GeometricField<Type, fvPatchField, volMesh>::Boundary&
|
const auto& patches = input.boundaryField();
|
||||||
patches = input.boundaryField();
|
|
||||||
|
|
||||||
forAll(patches, patchi)
|
forAll(patches, patchi)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -343,7 +343,7 @@ Foam::PDRblock::innerMesh(const IOobject& io) const
|
|||||||
);
|
);
|
||||||
polyMesh& pmesh = *meshPtr;
|
polyMesh& pmesh = *meshPtr;
|
||||||
|
|
||||||
PtrList<polyPatch> patches(patches_.size());
|
polyPatchList patches(patches_.size());
|
||||||
|
|
||||||
label startFace = nInternalFaces();
|
label startFace = nInternalFaces();
|
||||||
|
|
||||||
|
|||||||
@ -333,7 +333,7 @@ Foam::blockMesh::topology(bool applyTransform) const
|
|||||||
const polyBoundaryMesh& pbmOld = origTopo.boundaryMesh();
|
const polyBoundaryMesh& pbmOld = origTopo.boundaryMesh();
|
||||||
const polyBoundaryMesh& pbmNew = topoMesh.boundaryMesh();
|
const polyBoundaryMesh& pbmNew = topoMesh.boundaryMesh();
|
||||||
|
|
||||||
PtrList<polyPatch> newPatches(pbmOld.size());
|
polyPatchList newPatches(pbmOld.size());
|
||||||
|
|
||||||
forAll(pbmOld, patchi)
|
forAll(pbmOld, patchi)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1225,7 +1225,7 @@ bool Foam::faMeshDecomposition::writeDecomposition()
|
|||||||
|
|
||||||
const faPatchList& meshPatches = boundary();
|
const faPatchList& meshPatches = boundary();
|
||||||
|
|
||||||
PtrList<faPatch> procPatches
|
faPatchList procPatches
|
||||||
(
|
(
|
||||||
curPatchSizes.size() + curProcessorPatchSizes.size()
|
curPatchSizes.size() + curProcessorPatchSizes.size()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -495,7 +495,7 @@ void Foam::faMeshReconstructor::createMesh()
|
|||||||
auto& completeMesh = *serialAreaMesh_;
|
auto& completeMesh = *serialAreaMesh_;
|
||||||
|
|
||||||
// Add in non-processor boundary patches
|
// Add in non-processor boundary patches
|
||||||
PtrList<faPatch> completePatches(singlePatchEdgeLabels_.size());
|
faPatchList completePatches(singlePatchEdgeLabels_.size());
|
||||||
forAll(completePatches, patchi)
|
forAll(completePatches, patchi)
|
||||||
{
|
{
|
||||||
const labelList& patchEdgeLabels = singlePatchEdgeLabels_[patchi];
|
const labelList& patchEdgeLabels = singlePatchEdgeLabels_[patchi];
|
||||||
|
|||||||
Reference in New Issue
Block a user