ENH: use typedef for MeshObject within derived classes
- use an internal 'typedef MeshObject<...> MeshObject_type' within derived classes. Reduces clutter and eases any updates.
This commit is contained in:
parent
1b212789e5
commit
a803516b16
@ -243,7 +243,7 @@ Foam::GAMGAgglomeration::GAMGAgglomeration
|
||||
const dictionary& controlDict
|
||||
)
|
||||
:
|
||||
MeshObject<lduMesh, Foam::GeometricMeshObject, GAMGAgglomeration>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
|
||||
maxLevels_(50),
|
||||
|
||||
|
@ -67,9 +67,19 @@ class GAMGAgglomeration
|
||||
:
|
||||
public MeshObject<lduMesh, GeometricMeshObject, GAMGAgglomeration>
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
lduMesh,
|
||||
GeometricMeshObject,
|
||||
GAMGAgglomeration
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
// Protected Data
|
||||
|
||||
//- Max number of levels
|
||||
const label maxLevels_;
|
||||
|
@ -37,9 +37,10 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(pointMesh, 0);
|
||||
defineTypeNameAndDebug(pointMesh, 0);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::pointMesh::mapFields(const mapPolyMesh& mpm)
|
||||
@ -72,7 +73,7 @@ void Foam::pointMesh::mapFields(const mapPolyMesh& mpm)
|
||||
|
||||
Foam::pointMesh::pointMesh(const polyMesh& pMesh)
|
||||
:
|
||||
MeshObject<polyMesh, Foam::UpdateableMeshObject, pointMesh>(pMesh),
|
||||
MeshObject_type(pMesh),
|
||||
GeoMesh<polyMesh>(pMesh),
|
||||
boundary_(*this, pMesh.boundaryMesh())
|
||||
{
|
||||
|
@ -54,6 +54,16 @@ class pointMesh
|
||||
public MeshObject<polyMesh, UpdateableMeshObject, pointMesh>,
|
||||
public GeoMesh<polyMesh>
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
polyMesh,
|
||||
UpdateableMeshObject,
|
||||
pointMesh
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Permanent Data
|
||||
|
||||
//- Boundary mesh
|
||||
|
@ -166,7 +166,7 @@ Foam::refPtr<Foam::cellList> Foam::manifoldCellsMeshObject::filter
|
||||
|
||||
Foam::manifoldCellsMeshObject::manifoldCellsMeshObject(const polyMesh& mesh)
|
||||
:
|
||||
MeshObject<polyMesh, UpdateableMeshObject, manifoldCellsMeshObject>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
cellsPtr_(nullptr),
|
||||
nCorrected_(-1)
|
||||
{}
|
||||
|
@ -55,6 +55,16 @@ class manifoldCellsMeshObject
|
||||
:
|
||||
public MeshObject<polyMesh, UpdateableMeshObject, manifoldCellsMeshObject>
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
polyMesh,
|
||||
UpdateableMeshObject,
|
||||
manifoldCellsMeshObject
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
|
||||
//- The adjusted cells list
|
||||
@ -90,7 +100,7 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh
|
||||
manifoldCellsMeshObject(const polyMesh& mesh);
|
||||
explicit manifoldCellsMeshObject(const polyMesh& mesh);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
@ -29,7 +29,6 @@ License
|
||||
#include "leastSquaresFaVectors.H"
|
||||
#include "edgeFields.H"
|
||||
#include "areaFields.H"
|
||||
#include "demandDrivenData.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -43,7 +42,7 @@ namespace Foam
|
||||
|
||||
Foam::leastSquaresFaVectors::leastSquaresFaVectors(const faMesh& mesh)
|
||||
:
|
||||
MeshObject<faMesh, Foam::MoveableMeshObject, leastSquaresFaVectors>(mesh)
|
||||
MeshObject_type(mesh)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -55,8 +55,18 @@ namespace Foam
|
||||
|
||||
class leastSquaresFaVectors
|
||||
:
|
||||
public MeshObject<faMesh, Foam::MoveableMeshObject, leastSquaresFaVectors>
|
||||
public MeshObject<faMesh, MoveableMeshObject, leastSquaresFaVectors>
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
faMesh,
|
||||
MoveableMeshObject,
|
||||
leastSquaresFaVectors
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
|
||||
//- Least-squares gradient vectors
|
||||
|
@ -42,7 +42,7 @@ namespace meshObjects
|
||||
|
||||
Foam::meshObjects::gravity::gravity(const word& name, const Time& runTime)
|
||||
:
|
||||
MeshObject<Time, TopologicalMeshObject, gravity>(name, runTime),
|
||||
MeshObject_type(name, runTime),
|
||||
uniformDimensionedVectorField
|
||||
(
|
||||
IOobject
|
||||
@ -50,7 +50,7 @@ Foam::meshObjects::gravity::gravity(const word& name, const Time& runTime)
|
||||
name,
|
||||
runTime.constant(),
|
||||
runTime,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::READ_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER // Already registered by MeshObject
|
||||
)
|
||||
|
@ -60,10 +60,19 @@ class gravity
|
||||
<
|
||||
Time,
|
||||
TopologicalMeshObject,
|
||||
gravity
|
||||
meshObjects::gravity
|
||||
>,
|
||||
public uniformDimensionedVectorField
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
Time,
|
||||
TopologicalMeshObject,
|
||||
meshObjects::gravity
|
||||
> MeshObject_type;
|
||||
|
||||
public:
|
||||
|
||||
//- Run-time type information
|
||||
@ -72,12 +81,10 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct with given name on Time from \c constant
|
||||
//- (MUST_READ_IF_MODIFIED)
|
||||
//- Construct with given name on Time from \c constant (READ_MODIFIED)
|
||||
gravity(const word& name, const Time& runTime);
|
||||
|
||||
//- Construct "g" field on Time from \c constant
|
||||
//- (MUST_READ_IF_MODIFIED)
|
||||
//- Construct "g" field on Time from \c constant (READ_MODIFIED)
|
||||
explicit gravity(const Time& runTime)
|
||||
:
|
||||
gravity("g", runTime)
|
||||
@ -86,20 +93,13 @@ public:
|
||||
//- Return named gravity field cached or construct on Time
|
||||
static const gravity& New(const word& name, const Time& runTime)
|
||||
{
|
||||
return MeshObject<Time, TopologicalMeshObject, gravity>::New
|
||||
(
|
||||
name,
|
||||
runTime
|
||||
);
|
||||
return MeshObject_type::New(name, runTime);
|
||||
}
|
||||
|
||||
//- Return gravity "g" field cached or construct on Time
|
||||
static const gravity& New(const Time& runTime)
|
||||
{
|
||||
return MeshObject<Time, TopologicalMeshObject, gravity>::New
|
||||
(
|
||||
runTime
|
||||
);
|
||||
return MeshObject_type::New(runTime);
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,7 +36,7 @@ Foam::fv::LeastSquaresVectors<Stencil>::LeastSquaresVectors
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
MeshObject<fvMesh, Foam::MoveableMeshObject, LeastSquaresVectors>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
vectors_(mesh.nCells())
|
||||
{
|
||||
calcLeastSquaresVectors();
|
||||
|
@ -63,6 +63,16 @@ class LeastSquaresVectors
|
||||
:
|
||||
public MeshObject<fvMesh, MoveableMeshObject, LeastSquaresVectors<Stencil>>
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
MoveableMeshObject,
|
||||
LeastSquaresVectors<Stencil>
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
|
||||
//- Least-squares gradient vectors
|
||||
@ -84,17 +94,14 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct given an fvMesh and the minimum determinant criterion
|
||||
LeastSquaresVectors
|
||||
(
|
||||
const fvMesh&
|
||||
);
|
||||
explicit LeastSquaresVectors(const fvMesh& mesh);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~LeastSquaresVectors();
|
||||
|
||||
|
||||
// Member functions
|
||||
// Member Functions
|
||||
|
||||
//- Return const reference to the stencil
|
||||
const extendedCentredCellToCellStencil& stencil() const
|
||||
|
@ -41,7 +41,7 @@ namespace Foam
|
||||
|
||||
Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh)
|
||||
:
|
||||
MeshObject<fvMesh, Foam::MoveableMeshObject, leastSquaresVectors>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
pVectors_
|
||||
(
|
||||
IOobject
|
||||
|
@ -41,7 +41,7 @@ namespace Foam
|
||||
|
||||
Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh)
|
||||
:
|
||||
MeshObject<fvMesh, Foam::MoveableMeshObject, leastSquaresVectors>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
pVectors_
|
||||
(
|
||||
IOobject
|
||||
|
@ -55,6 +55,16 @@ class leastSquaresVectors
|
||||
:
|
||||
public MeshObject<fvMesh, MoveableMeshObject, leastSquaresVectors>
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
MoveableMeshObject,
|
||||
leastSquaresVectors
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
|
||||
//- Owner least-squares gradient vectors
|
||||
|
@ -41,7 +41,7 @@ namespace Foam
|
||||
|
||||
Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh)
|
||||
:
|
||||
MeshObject<fvMesh, Foam::MoveableMeshObject, leastSquaresVectors>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
pVectors_
|
||||
(
|
||||
IOobject
|
||||
|
@ -59,6 +59,14 @@ class centredCECCellToCellStencilObject
|
||||
>,
|
||||
public extendedCentredCellToCellStencil
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
TopologicalMeshObject,
|
||||
centredCECCellToCellStencilObject
|
||||
> MeshObject_type;
|
||||
|
||||
public:
|
||||
|
||||
@ -72,12 +80,7 @@ public:
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::TopologicalMeshObject,
|
||||
centredCECCellToCellStencilObject
|
||||
>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
extendedCentredCellToCellStencil(CECCellToCellStencil(mesh))
|
||||
{}
|
||||
|
||||
|
@ -59,6 +59,14 @@ class centredCFCCellToCellStencilObject
|
||||
>,
|
||||
public extendedCentredCellToCellStencil
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
TopologicalMeshObject,
|
||||
centredCFCCellToCellStencilObject
|
||||
> MeshObject_type;
|
||||
|
||||
public:
|
||||
|
||||
@ -72,12 +80,7 @@ public:
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::TopologicalMeshObject,
|
||||
centredCFCCellToCellStencilObject
|
||||
>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
extendedCentredCellToCellStencil(CFCCellToCellStencil(mesh))
|
||||
{}
|
||||
|
||||
|
@ -59,11 +59,20 @@ class centredCPCCellToCellStencilObject
|
||||
>,
|
||||
public extendedCentredCellToCellStencil
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
TopologicalMeshObject,
|
||||
centredCPCCellToCellStencilObject
|
||||
> MeshObject_type;
|
||||
|
||||
public:
|
||||
|
||||
TypeName("centredCPCCellToCellStencil");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from uncompacted cell stencil
|
||||
@ -72,12 +81,7 @@ public:
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::TopologicalMeshObject,
|
||||
centredCPCCellToCellStencilObject
|
||||
>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
extendedCentredCellToCellStencil(CPCCellToCellStencil(mesh))
|
||||
{}
|
||||
|
||||
|
@ -59,11 +59,20 @@ class centredCECCellToFaceStencilObject
|
||||
>,
|
||||
public extendedCentredCellToFaceStencil
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
TopologicalMeshObject,
|
||||
centredCECCellToFaceStencilObject
|
||||
> MeshObject_type;
|
||||
|
||||
public:
|
||||
|
||||
TypeName("centredCECCellToFaceStencil");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from uncompacted face stencil
|
||||
@ -72,12 +81,7 @@ public:
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::TopologicalMeshObject,
|
||||
centredCECCellToFaceStencilObject
|
||||
>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
extendedCentredCellToFaceStencil(CECCellToFaceStencil(mesh))
|
||||
{
|
||||
if (extendedCellToFaceStencil::debug)
|
||||
|
@ -59,11 +59,20 @@ class centredCFCCellToFaceStencilObject
|
||||
>,
|
||||
public extendedCentredCellToFaceStencil
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
TopologicalMeshObject,
|
||||
centredCFCCellToFaceStencilObject
|
||||
> MeshObject_type;
|
||||
|
||||
public:
|
||||
|
||||
TypeName("centredCFCCellToFaceStencil");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from uncompacted face stencil
|
||||
@ -72,12 +81,7 @@ public:
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::TopologicalMeshObject,
|
||||
centredCFCCellToFaceStencilObject
|
||||
>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
extendedCentredCellToFaceStencil(CFCCellToFaceStencil(mesh))
|
||||
{
|
||||
if (extendedCellToFaceStencil::debug)
|
||||
|
@ -59,11 +59,20 @@ class centredCPCCellToFaceStencilObject
|
||||
>,
|
||||
public extendedCentredCellToFaceStencil
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
TopologicalMeshObject,
|
||||
centredCPCCellToFaceStencilObject
|
||||
> MeshObject_type;
|
||||
|
||||
public:
|
||||
|
||||
TypeName("centredCPCCellToFaceStencil");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from uncompacted face stencil
|
||||
@ -72,12 +81,7 @@ public:
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::TopologicalMeshObject,
|
||||
centredCPCCellToFaceStencilObject
|
||||
>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
extendedCentredCellToFaceStencil(CPCCellToFaceStencil(mesh))
|
||||
{
|
||||
if (extendedCellToFaceStencil::debug)
|
||||
|
@ -59,11 +59,20 @@ class centredFECCellToFaceStencilObject
|
||||
>,
|
||||
public extendedCentredCellToFaceStencil
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
TopologicalMeshObject,
|
||||
centredFECCellToFaceStencilObject
|
||||
> MeshObject_type;
|
||||
|
||||
public:
|
||||
|
||||
TypeName("centredFECCellToFaceStencil");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from uncompacted face stencil
|
||||
@ -72,12 +81,7 @@ public:
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::TopologicalMeshObject,
|
||||
centredFECCellToFaceStencilObject
|
||||
>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
extendedCentredCellToFaceStencil(FECCellToFaceStencil(mesh))
|
||||
{
|
||||
if (extendedCellToFaceStencil::debug)
|
||||
|
@ -59,11 +59,20 @@ class pureUpwindCFCCellToFaceStencilObject
|
||||
>,
|
||||
public extendedUpwindCellToFaceStencil
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
TopologicalMeshObject,
|
||||
pureUpwindCFCCellToFaceStencilObject
|
||||
> MeshObject_type;
|
||||
|
||||
public:
|
||||
|
||||
TypeName("pureUpwindCFCCellToFaceStencil");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from uncompacted face stencil
|
||||
@ -72,12 +81,7 @@ public:
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::TopologicalMeshObject,
|
||||
pureUpwindCFCCellToFaceStencilObject
|
||||
>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
extendedUpwindCellToFaceStencil(CFCCellToFaceStencil(mesh))
|
||||
{
|
||||
if (extendedCellToFaceStencil::debug)
|
||||
|
@ -59,11 +59,20 @@ class upwindCECCellToFaceStencilObject
|
||||
>,
|
||||
public extendedUpwindCellToFaceStencil
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
TopologicalMeshObject,
|
||||
upwindCECCellToFaceStencilObject
|
||||
> MeshObject_type;
|
||||
|
||||
public:
|
||||
|
||||
TypeName("upwindCECCellToFaceStencil");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from uncompacted face stencil
|
||||
@ -74,12 +83,7 @@ public:
|
||||
const scalar minOpposedness
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::TopologicalMeshObject,
|
||||
upwindCECCellToFaceStencilObject
|
||||
>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
extendedUpwindCellToFaceStencil
|
||||
(
|
||||
CECCellToFaceStencil(mesh),
|
||||
|
@ -59,11 +59,21 @@ class upwindCFCCellToFaceStencilObject
|
||||
>,
|
||||
public extendedUpwindCellToFaceStencil
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
TopologicalMeshObject,
|
||||
upwindCFCCellToFaceStencilObject
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
TypeName("upwindCFCCellToFaceStencil");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from uncompacted face stencil
|
||||
@ -74,12 +84,7 @@ public:
|
||||
const scalar minOpposedness
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::TopologicalMeshObject,
|
||||
upwindCFCCellToFaceStencilObject
|
||||
>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
extendedUpwindCellToFaceStencil
|
||||
(
|
||||
CFCCellToFaceStencil(mesh),
|
||||
|
@ -59,11 +59,20 @@ class upwindCPCCellToFaceStencilObject
|
||||
>,
|
||||
public extendedUpwindCellToFaceStencil
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
TopologicalMeshObject,
|
||||
upwindCPCCellToFaceStencilObject
|
||||
> MeshObject_type;
|
||||
|
||||
public:
|
||||
|
||||
TypeName("upwindCPCCellToFaceStencil");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from uncompacted face stencil
|
||||
@ -74,12 +83,7 @@ public:
|
||||
const scalar minOpposedness
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::TopologicalMeshObject,
|
||||
upwindCPCCellToFaceStencilObject
|
||||
>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
extendedUpwindCellToFaceStencil
|
||||
(
|
||||
CPCCellToFaceStencil(mesh),
|
||||
|
@ -59,6 +59,14 @@ class upwindFECCellToFaceStencilObject
|
||||
>,
|
||||
public extendedUpwindCellToFaceStencil
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
TopologicalMeshObject,
|
||||
upwindFECCellToFaceStencilObject
|
||||
> MeshObject_type;
|
||||
|
||||
public:
|
||||
|
||||
@ -74,12 +82,7 @@ public:
|
||||
const scalar minOpposedness
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::TopologicalMeshObject,
|
||||
upwindFECCellToFaceStencilObject
|
||||
>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
extendedUpwindCellToFaceStencil
|
||||
(
|
||||
FECCellToFaceStencil(mesh),
|
||||
|
@ -59,11 +59,20 @@ class centredCFCFaceToCellStencilObject
|
||||
>,
|
||||
public extendedCentredFaceToCellStencil
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
TopologicalMeshObject,
|
||||
centredCFCFaceToCellStencilObject
|
||||
> MeshObject_type;
|
||||
|
||||
public:
|
||||
|
||||
TypeName("centredCFCFaceToCellStencil");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from uncompacted face stencil
|
||||
@ -72,12 +81,7 @@ public:
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::TopologicalMeshObject,
|
||||
centredCFCFaceToCellStencilObject
|
||||
>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
extendedCentredFaceToCellStencil(CFCFaceToCellStencil(mesh))
|
||||
{}
|
||||
|
||||
|
@ -39,7 +39,7 @@ namespace Foam
|
||||
|
||||
Foam::cellAspectRatio::cellAspectRatio(const polyMesh& mesh)
|
||||
:
|
||||
MeshObject<polyMesh, Foam::MoveableMeshObject, cellAspectRatio>(mesh)
|
||||
MeshObject_type(mesh)
|
||||
{
|
||||
calcAspectRatio();
|
||||
}
|
||||
|
@ -54,6 +54,16 @@ class cellAspectRatio
|
||||
public MeshObject<polyMesh, MoveableMeshObject, cellAspectRatio>,
|
||||
public scalarField
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
polyMesh,
|
||||
MoveableMeshObject,
|
||||
cellAspectRatio
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Construct aspect ratio
|
||||
|
@ -90,7 +90,7 @@ Foam::wallDist::wallDist
|
||||
const word& patchTypeName
|
||||
)
|
||||
:
|
||||
MeshObject<fvMesh, Foam::UpdateableMeshObject, wallDist>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
patchIDs_(patchIDs),
|
||||
patchTypeName_(patchTypeName),
|
||||
dict_
|
||||
@ -154,6 +154,22 @@ Foam::wallDist::~wallDist()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::wallDist::try_movePoints(const fvMesh& mesh)
|
||||
{
|
||||
auto* ptr =
|
||||
mesh.getObjectPtr<UpdateableMeshObject<fvMesh>>("wallDist");
|
||||
|
||||
if (ptr)
|
||||
{
|
||||
return ptr->movePoints();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::volVectorField& Foam::wallDist::n() const
|
||||
|
@ -77,7 +77,17 @@ class wallDist
|
||||
:
|
||||
public MeshObject<fvMesh, UpdateableMeshObject, wallDist>
|
||||
{
|
||||
// Private data
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
UpdateableMeshObject,
|
||||
wallDist
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
|
||||
//- Set of patch IDs
|
||||
const labelHashSet patchIDs_;
|
||||
@ -157,6 +167,13 @@ public:
|
||||
virtual ~wallDist();
|
||||
|
||||
|
||||
// Static Member Functions
|
||||
|
||||
//- Trigger update of y-field for the "wallDist" MeshObject on the
|
||||
//- given mesh. A no-op if the wallDist is not found.
|
||||
static bool try_movePoints(const fvMesh& mesh);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the patchIDs
|
||||
|
@ -387,7 +387,7 @@ Foam::wallDistAddressing::wallDistAddressing
|
||||
)
|
||||
:
|
||||
// Register as "wallDistAddressing"
|
||||
MeshObject<fvMesh, Foam::UpdateableMeshObject, wallDistAddressing>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
cellDistFuncs(mesh),
|
||||
patchIDs_(mesh.boundaryMesh().findPatchIDs<wallPolyPatch>().sortedToc()),
|
||||
patchTypeName_("wall"),
|
||||
@ -420,11 +420,7 @@ Foam::wallDistAddressing::wallDistAddressing
|
||||
const label updateInterval
|
||||
)
|
||||
:
|
||||
MeshObject<fvMesh, Foam::UpdateableMeshObject, wallDistAddressing>
|
||||
(
|
||||
patchTypeName,
|
||||
mesh
|
||||
),
|
||||
MeshObject_type(patchTypeName, mesh),
|
||||
cellDistFuncs(mesh),
|
||||
patchIDs_(patchIDs),
|
||||
patchTypeName_(patchTypeName),
|
||||
|
@ -114,8 +114,19 @@ class wallDistAddressing
|
||||
public MeshObject<fvMesh, UpdateableMeshObject, wallDistAddressing>,
|
||||
public cellDistFuncs
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
UpdateableMeshObject,
|
||||
wallDistAddressing
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
//- Use fvMesh& instead of cellDistFuncs polyMesh&
|
||||
using MeshObject<fvMesh, UpdateableMeshObject, wallDistAddressing>::mesh_;
|
||||
using MeshObject_type::mesh_;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -40,7 +40,7 @@ namespace Foam
|
||||
|
||||
Foam::zoneDistribute::zoneDistribute(const fvMesh& mesh)
|
||||
:
|
||||
MeshObject<fvMesh, Foam::TopologicalMeshObject, zoneDistribute>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
stencil_(zoneCPCStencil::New(mesh)),
|
||||
globalNumbering_(stencil_.globalNumbering()),
|
||||
send_(UPstream::nProcs()),
|
||||
|
@ -82,6 +82,16 @@ class zoneDistribute
|
||||
:
|
||||
public MeshObject<fvMesh, TopologicalMeshObject, zoneDistribute>
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
TopologicalMeshObject,
|
||||
zoneDistribute
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
|
||||
//- Reference to the zone stencil
|
||||
|
@ -123,7 +123,7 @@ void Foam::zoneCPCStencil::calcPointBoundaryData
|
||||
|
||||
Foam::zoneCPCStencil::zoneCPCStencil(const fvMesh& mesh)
|
||||
:
|
||||
MeshObject<fvMesh, Foam::TopologicalMeshObject, zoneCPCStencil>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
zoneCellStencils(mesh),
|
||||
nonEmptyBoundaryPoints_(nonEmptyFacesPatch()().meshPoints()),
|
||||
uptodate_(mesh.nCells(), false)
|
||||
|
@ -66,6 +66,16 @@ class zoneCPCStencil
|
||||
>,
|
||||
public zoneCellStencils
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
TopologicalMeshObject,
|
||||
zoneCPCStencil
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
|
||||
labelList nonEmptyBoundaryPoints_;
|
||||
@ -120,6 +130,7 @@ public:
|
||||
//- Construct from all cells and boundary faces
|
||||
explicit zoneCPCStencil(const fvMesh&);
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
static zoneCPCStencil& New(const fvMesh&);
|
||||
|
@ -42,7 +42,7 @@ Foam::FitData<Form, ExtendedStencil, Polynomial>::FitData
|
||||
const scalar centralWeight
|
||||
)
|
||||
:
|
||||
MeshObject<fvMesh, Foam::MoveableMeshObject, Form>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
stencil_(stencil),
|
||||
linearCorrection_(linearCorrection),
|
||||
linearLimitFactor_(linearLimitFactor),
|
||||
|
@ -59,7 +59,17 @@ class FitData
|
||||
:
|
||||
public MeshObject<fvMesh, MoveableMeshObject, FitDataType>
|
||||
{
|
||||
// Private data
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
MoveableMeshObject,
|
||||
FitDataType
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
|
||||
//- The stencil the fit is based on
|
||||
const ExtendedStencil& stencil_;
|
||||
|
@ -41,7 +41,7 @@ namespace Foam
|
||||
|
||||
Foam::skewCorrectionVectors::skewCorrectionVectors(const fvMesh& mesh)
|
||||
:
|
||||
MeshObject<fvMesh, Foam::MoveableMeshObject, skewCorrectionVectors>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
skew_(false),
|
||||
skewCorrectionVectors_
|
||||
(
|
||||
|
@ -46,6 +46,7 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward Declarations
|
||||
class fvMesh;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
@ -56,7 +57,17 @@ class skewCorrectionVectors
|
||||
:
|
||||
public MeshObject<fvMesh, MoveableMeshObject, skewCorrectionVectors>
|
||||
{
|
||||
// Private data
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
MoveableMeshObject,
|
||||
skewCorrectionVectors
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
|
||||
//- Is mesh skew
|
||||
bool skew_;
|
||||
@ -75,6 +86,7 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct given fvMesh
|
||||
explicit skewCorrectionVectors(const fvMesh& mesh);
|
||||
|
||||
|
||||
@ -82,7 +94,7 @@ public:
|
||||
virtual ~skewCorrectionVectors();
|
||||
|
||||
|
||||
// Member functions
|
||||
// Member Functions
|
||||
|
||||
//- Return whether mesh is skew or not
|
||||
bool skew() const
|
||||
|
@ -354,7 +354,7 @@ void Foam::pointConstraints::makePatchPatchAddressing()
|
||||
|
||||
Foam::pointConstraints::pointConstraints(const pointMesh& pm)
|
||||
:
|
||||
MeshObject<pointMesh, Foam::UpdateableMeshObject, pointConstraints>(pm)
|
||||
MeshObject_type(pm)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
|
@ -55,6 +55,7 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward Declarations
|
||||
class pointMesh;
|
||||
class polyMesh;
|
||||
|
||||
@ -66,7 +67,17 @@ class pointConstraints
|
||||
:
|
||||
public MeshObject<pointMesh, UpdateableMeshObject, pointConstraints>
|
||||
{
|
||||
// Private data
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
pointMesh,
|
||||
UpdateableMeshObject,
|
||||
pointConstraints
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
|
||||
// Patch-patch constraints
|
||||
|
||||
|
@ -473,7 +473,7 @@ void Foam::volPointInterpolation::makeWeights()
|
||||
|
||||
Foam::volPointInterpolation::volPointInterpolation(const fvMesh& vm)
|
||||
:
|
||||
MeshObject<fvMesh, Foam::UpdateableMeshObject, volPointInterpolation>(vm),
|
||||
MeshObject_type(vm),
|
||||
hasSeparated_(hasSeparated(pointMesh::New(vm)))
|
||||
{
|
||||
makeWeights();
|
||||
|
@ -50,6 +50,7 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward Declarations
|
||||
class fvMesh;
|
||||
class pointMesh;
|
||||
|
||||
@ -61,7 +62,17 @@ class volPointInterpolation
|
||||
:
|
||||
public MeshObject<fvMesh, UpdateableMeshObject, volPointInterpolation>
|
||||
{
|
||||
// Private data
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
UpdateableMeshObject,
|
||||
volPointInterpolation
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
|
||||
//- Interpolation scheme weighting factor array.
|
||||
scalarListList pointWeights_;
|
||||
@ -150,7 +161,7 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Constructor given fvMesh and pointMesh.
|
||||
//- Construct given fvMesh
|
||||
explicit volPointInterpolation(const fvMesh&);
|
||||
|
||||
|
||||
|
@ -330,7 +330,7 @@ Foam::label Foam::processorColour::cellColour
|
||||
|
||||
Foam::processorColour::processorColour(const lduMesh& mesh)
|
||||
:
|
||||
MeshObject<lduMesh, Foam::MoveableMeshObject, processorColour>(mesh)
|
||||
MeshObject_type(mesh)
|
||||
{
|
||||
nColours_ = colour(mesh, *this);
|
||||
}
|
||||
|
@ -58,6 +58,25 @@ class processorColour
|
||||
public MeshObject<lduMesh, MoveableMeshObject, processorColour>,
|
||||
public labelList
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
lduMesh,
|
||||
MoveableMeshObject,
|
||||
processorColour
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
processorColour(const processorColour&) = delete;
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const processorColour&) = delete;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
@ -75,16 +94,6 @@ protected:
|
||||
labelList& cellColour
|
||||
);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
//- No copy construct
|
||||
processorColour(const processorColour&) = delete;
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const processorColour&) = delete;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
@ -94,7 +103,7 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct given mesh
|
||||
processorColour(const lduMesh& mesh);
|
||||
explicit processorColour(const lduMesh& mesh);
|
||||
|
||||
|
||||
// Selectors
|
||||
|
@ -35,21 +35,4 @@ namespace Foam
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::meshSearchFACE_CENTRE_TRISMeshObject::meshSearchFACE_CENTRE_TRISMeshObject
|
||||
(
|
||||
const polyMesh& mesh
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
polyMesh,
|
||||
Foam::GeometricMeshObject,
|
||||
meshSearchFACE_CENTRE_TRISMeshObject
|
||||
>(mesh),
|
||||
meshSearch(mesh, polyMesh::FACE_CENTRE_TRIS)
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -59,6 +59,14 @@ class meshSearchFACE_CENTRE_TRISMeshObject
|
||||
>,
|
||||
public meshSearch
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
polyMesh,
|
||||
GeometricMeshObject,
|
||||
meshSearchFACE_CENTRE_TRISMeshObject
|
||||
> MeshObject_type;
|
||||
|
||||
public:
|
||||
|
||||
@ -68,8 +76,13 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Constructor given polyMesh
|
||||
explicit meshSearchFACE_CENTRE_TRISMeshObject(const polyMesh& mesh);
|
||||
//- Construct given polyMesh
|
||||
explicit meshSearchFACE_CENTRE_TRISMeshObject(const polyMesh& mesh)
|
||||
:
|
||||
MeshObject_type(mesh),
|
||||
meshSearch(mesh, polyMesh::FACE_CENTRE_TRIS)
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~meshSearchFACE_CENTRE_TRISMeshObject() = default;
|
||||
|
@ -35,13 +35,4 @@ namespace Foam
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::meshSearchMeshObject::meshSearchMeshObject(const polyMesh& mesh)
|
||||
:
|
||||
MeshObject<polyMesh, Foam::GeometricMeshObject, meshSearchMeshObject>(mesh),
|
||||
meshSearch(mesh)
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -54,6 +54,14 @@ class meshSearchMeshObject
|
||||
public MeshObject<polyMesh, GeometricMeshObject, meshSearchMeshObject>,
|
||||
public meshSearch
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
polyMesh,
|
||||
GeometricMeshObject,
|
||||
meshSearchMeshObject
|
||||
> MeshObject_type;
|
||||
|
||||
public:
|
||||
|
||||
@ -63,8 +71,13 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Constructor given polyMesh
|
||||
explicit meshSearchMeshObject(const polyMesh& mesh);
|
||||
//- Construct given polyMesh
|
||||
explicit meshSearchMeshObject(const polyMesh& mesh)
|
||||
:
|
||||
MeshObject_type(mesh),
|
||||
meshSearch(mesh)
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~meshSearchMeshObject() = default;
|
||||
|
@ -181,7 +181,7 @@ Foam::label Foam::multiWorldConnections::createCommunicator(const edge& worlds)
|
||||
|
||||
Foam::multiWorldConnections::multiWorldConnections(const Time& runTime)
|
||||
:
|
||||
MeshObjectType(runTime)
|
||||
MeshObject_type(runTime)
|
||||
{}
|
||||
|
||||
|
||||
@ -190,16 +190,10 @@ Foam::multiWorldConnections::multiWorldConnections(const Time& runTime)
|
||||
const Foam::multiWorldConnections&
|
||||
Foam::multiWorldConnections::New(const Time& runTime)
|
||||
{
|
||||
return MeshObjectType::New(runTime);
|
||||
return MeshObject_type::New(runTime);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::multiWorldConnections::~multiWorldConnections()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::multiWorldConnections::empty() const noexcept
|
||||
|
@ -69,7 +69,7 @@ class multiWorldConnections
|
||||
Time,
|
||||
TopologicalMeshObject,
|
||||
multiWorldConnections
|
||||
> MeshObjectType;
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
@ -111,7 +111,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
~multiWorldConnections();
|
||||
~multiWorldConnections() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
@ -385,7 +385,7 @@ Foam::regionSplit::regionSplit
|
||||
const bool doGlobalRegions
|
||||
)
|
||||
:
|
||||
MeshObject<polyMesh, Foam::TopologicalMeshObject, regionSplit>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
labelList(mesh.nCells(), UNASSIGNED),
|
||||
globalNumbering_()
|
||||
{
|
||||
@ -432,7 +432,7 @@ Foam::regionSplit::regionSplit
|
||||
const bool doGlobalRegions
|
||||
)
|
||||
:
|
||||
MeshObject<polyMesh, Foam::TopologicalMeshObject, regionSplit>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
labelList(mesh.nCells(), UNASSIGNED),
|
||||
globalNumbering_()
|
||||
{
|
||||
|
@ -143,6 +143,16 @@ class regionSplit
|
||||
public MeshObject<polyMesh, TopologicalMeshObject, regionSplit>,
|
||||
public labelList
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
polyMesh,
|
||||
TopologicalMeshObject,
|
||||
regionSplit
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
|
||||
//- Indexing into the regions
|
||||
@ -157,7 +167,6 @@ class regionSplit
|
||||
|
||||
// Private Class
|
||||
|
||||
|
||||
//- Simple wrapper for handling test() on bitSet or boolList
|
||||
//- without a templating layer or lambda expresssion.
|
||||
class bitSetOrBoolList
|
||||
|
@ -199,7 +199,7 @@ void Foam::twoDPointCorrector::snapToWedge
|
||||
|
||||
Foam::twoDPointCorrector::twoDPointCorrector(const polyMesh& mesh)
|
||||
:
|
||||
MeshObject<polyMesh, Foam::UpdateableMeshObject, twoDPointCorrector>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
required_(mesh_.nGeometricD() == 2),
|
||||
planeNormalPtr_(nullptr),
|
||||
normalEdgeIndicesPtr_(nullptr),
|
||||
@ -209,7 +209,6 @@ Foam::twoDPointCorrector::twoDPointCorrector(const polyMesh& mesh)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::twoDPointCorrector::~twoDPointCorrector()
|
||||
|
@ -54,7 +54,7 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward class declarations
|
||||
// Forward Declarations
|
||||
class polyMesh;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
@ -65,7 +65,17 @@ class twoDPointCorrector
|
||||
:
|
||||
public MeshObject<polyMesh, UpdateableMeshObject, twoDPointCorrector>
|
||||
{
|
||||
// Private data
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
polyMesh,
|
||||
UpdateableMeshObject,
|
||||
twoDPointCorrector
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
|
||||
//- Is 2D correction required, i.e. is the mesh
|
||||
bool required_;
|
||||
|
@ -53,6 +53,7 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward Declarations
|
||||
class fvMesh;
|
||||
class pointMesh;
|
||||
|
||||
@ -62,7 +63,7 @@ class pointMesh;
|
||||
|
||||
class pointVolInterpolation
|
||||
{
|
||||
// Private data
|
||||
// Private Data
|
||||
|
||||
const pointMesh& pointMesh_;
|
||||
const fvMesh& fvMesh_;
|
||||
@ -110,13 +111,12 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Constructor given pointMesh and fvMesh.
|
||||
//- Construct given pointMesh and fvMesh.
|
||||
pointVolInterpolation(const pointMesh&, const fvMesh&);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
~pointVolInterpolation();
|
||||
//- Destructor
|
||||
~pointVolInterpolation();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
@ -297,10 +297,7 @@ void Foam::volPointInterpolationAdjoint::makeWeights()
|
||||
|
||||
Foam::volPointInterpolationAdjoint::volPointInterpolationAdjoint(const fvMesh& vm)
|
||||
:
|
||||
MeshObject<fvMesh, Foam::UpdateableMeshObject, volPointInterpolationAdjoint>
|
||||
(
|
||||
vm
|
||||
)
|
||||
MeshObject_type(vm)
|
||||
{
|
||||
makeWeights();
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward Declarations
|
||||
class fvMesh;
|
||||
class pointMesh;
|
||||
|
||||
@ -59,8 +60,23 @@ class pointMesh;
|
||||
|
||||
class volPointInterpolationAdjoint
|
||||
:
|
||||
public MeshObject<fvMesh, UpdateableMeshObject, volPointInterpolationAdjoint>
|
||||
public MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
UpdateableMeshObject,
|
||||
volPointInterpolationAdjoint
|
||||
>
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
UpdateableMeshObject,
|
||||
volPointInterpolationAdjoint
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
@ -128,7 +144,7 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Constructor given fvMesh and pointMesh.
|
||||
//- Construct given fvMesh
|
||||
explicit volPointInterpolationAdjoint(const fvMesh&);
|
||||
|
||||
|
||||
|
@ -417,11 +417,8 @@ void levelSetDesignVariables::update(scalarField& correction)
|
||||
|
||||
// Though the mesh is kept constant, the distance from wall may change
|
||||
// due to fvOptions depending on beta. Trick wallDist into updating it
|
||||
if (mesh_.foundObject<UpdateableMeshObject<fvMesh>>("wallDist"))
|
||||
{
|
||||
mesh_.lookupObjectRef<UpdateableMeshObject<fvMesh>>("wallDist").
|
||||
movePoints();
|
||||
}
|
||||
|
||||
wallDist::try_movePoints(mesh_);
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@ License
|
||||
|
||||
#include "localIOdictionary.H"
|
||||
#include "topODesignVariables.H"
|
||||
#include "MeshObject.H"
|
||||
#include "wallDist.H"
|
||||
#include "wallFvPatch.H"
|
||||
#include "cutFaceIso.H"
|
||||
#include "cutCellIso.H"
|
||||
@ -452,11 +452,9 @@ void Foam::topODesignVariables::update(scalarField& correction)
|
||||
// if the method computing it includes fvOptions that depend on the
|
||||
// indicator field.
|
||||
// Trick wallDist into updating it
|
||||
if (mesh_.foundObject<UpdateableMeshObject<fvMesh>>("wallDist"))
|
||||
{
|
||||
mesh_.lookupObjectRef<UpdateableMeshObject<fvMesh>>("wallDist").
|
||||
movePoints();
|
||||
}
|
||||
|
||||
wallDist::try_movePoints(mesh_);
|
||||
|
||||
|
||||
// Write the 0.5 beta iso-line to files, as an indication of the
|
||||
// fluid-solid interface
|
||||
|
@ -45,7 +45,7 @@ volBSplinesBase::volBSplinesBase
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
MeshObject<fvMesh, UpdateableMeshObject, volBSplinesBase>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
volume_(0),
|
||||
activeDesignVariables_(0)
|
||||
{
|
||||
@ -58,7 +58,7 @@ volBSplinesBase::volBSplinesBase
|
||||
"dynamicMeshDict",
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
)
|
||||
|
@ -61,19 +61,15 @@ class volBSplinesBase
|
||||
:
|
||||
public MeshObject<fvMesh, UpdateableMeshObject, volBSplinesBase>
|
||||
{
|
||||
protected:
|
||||
// Private Typedefs
|
||||
|
||||
// Protected data
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
UpdateableMeshObject,
|
||||
volBSplinesBase
|
||||
> MeshObject_type;
|
||||
|
||||
//- List with volumetric B-splines boxes.
|
||||
// No overlapping is supported
|
||||
PtrList<NURBS3DVolume> volume_;
|
||||
|
||||
//- Active design variables numbering for all boxes
|
||||
labelList activeDesignVariables_;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
@ -84,6 +80,18 @@ private:
|
||||
void operator=(const volBSplinesBase&) = delete;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Data
|
||||
|
||||
//- List with volumetric B-splines boxes.
|
||||
// No overlapping is supported
|
||||
PtrList<NURBS3DVolume> volume_;
|
||||
|
||||
//- Active design variables numbering for all boxes
|
||||
labelList activeDesignVariables_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
@ -93,7 +101,7 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
volBSplinesBase(const fvMesh& mesh);
|
||||
explicit volBSplinesBase(const fvMesh& mesh);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
@ -32,8 +32,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef cellCellStencilObject_H
|
||||
#define cellCellStencilObject_H
|
||||
#ifndef Foam_cellCellStencilObject_H
|
||||
#define Foam_cellCellStencilObject_H
|
||||
|
||||
#include "cellCellStencil.H"
|
||||
#include "MeshObject.H"
|
||||
@ -43,13 +43,10 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Typedefs
|
||||
class cellCellStencilObject;
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::MoveableMeshObject,
|
||||
cellCellStencilObject
|
||||
> Stencil;
|
||||
typedef MeshObject<fvMesh, MoveableMeshObject, cellCellStencilObject> Stencil;
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class cellCellStencilObject Declaration
|
||||
@ -57,10 +54,20 @@ typedef MeshObject
|
||||
|
||||
class cellCellStencilObject
|
||||
:
|
||||
public Stencil,
|
||||
public MeshObject<fvMesh, MoveableMeshObject, cellCellStencilObject>,
|
||||
public cellCellStencil
|
||||
{
|
||||
// Private data
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
MoveableMeshObject,
|
||||
cellCellStencilObject
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
|
||||
autoPtr<cellCellStencil> stencilPtr_;
|
||||
|
||||
@ -69,6 +76,7 @@ public:
|
||||
|
||||
TypeName("cellCellStencilObject");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct with mesh
|
||||
@ -78,12 +86,8 @@ public:
|
||||
const bool update = true
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::MoveableMeshObject,
|
||||
cellCellStencilObject
|
||||
>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
|
||||
cellCellStencil(mesh),
|
||||
stencilPtr_
|
||||
(
|
||||
|
@ -49,12 +49,8 @@ Foam::decompositionModel::decompositionModel
|
||||
const dictionary* fallback
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
polyMesh,
|
||||
Foam::UpdateableMeshObject,
|
||||
decompositionModel
|
||||
>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
|
||||
IOdictionary
|
||||
(
|
||||
IOobject::selectIO
|
||||
@ -86,13 +82,7 @@ const Foam::decompositionModel& Foam::decompositionModel::New
|
||||
const dictionary* content
|
||||
)
|
||||
{
|
||||
return
|
||||
MeshObject
|
||||
<
|
||||
polyMesh,
|
||||
Foam::UpdateableMeshObject,
|
||||
decompositionModel
|
||||
>::New(mesh, decompDictFile, content);
|
||||
return MeshObject_type::New(mesh, decompDictFile, content);
|
||||
}
|
||||
|
||||
|
||||
|
@ -65,6 +65,16 @@ class decompositionModel
|
||||
>,
|
||||
public IOdictionary
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
polyMesh,
|
||||
UpdateableMeshObject,
|
||||
decompositionModel
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
|
||||
mutable autoPtr<decompositionMethod> decomposerPtr_;
|
||||
|
@ -46,12 +46,8 @@ Foam::radiation::boundaryRadiationProperties::boundaryRadiationProperties
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::GeometricMeshObject,
|
||||
boundaryRadiationProperties
|
||||
>(mesh),
|
||||
MeshObject_type(mesh),
|
||||
|
||||
radBoundaryPropertiesPtrList_(mesh.boundary().size()),
|
||||
radZonePropertiesPtrList_(mesh.faceZones().size())
|
||||
{
|
||||
|
@ -34,8 +34,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef boundaryRadiationProperties_H
|
||||
#define boundaryRadiationProperties_H
|
||||
#ifndef Foam_boundaryRadiationProperties_H
|
||||
#define Foam_boundaryRadiationProperties_H
|
||||
|
||||
#include "MeshObject.H"
|
||||
#include "boundaryRadiationPropertiesPatch.H"
|
||||
@ -45,6 +45,7 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward Declarations
|
||||
class fvMesh;
|
||||
|
||||
namespace radiation
|
||||
@ -59,10 +60,20 @@ class boundaryRadiationProperties
|
||||
public MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
Foam::GeometricMeshObject,
|
||||
GeometricMeshObject,
|
||||
boundaryRadiationProperties
|
||||
>
|
||||
{
|
||||
// Private Typedefs
|
||||
|
||||
typedef MeshObject
|
||||
<
|
||||
fvMesh,
|
||||
GeometricMeshObject,
|
||||
boundaryRadiationProperties
|
||||
> MeshObject_type;
|
||||
|
||||
|
||||
// Private Data
|
||||
|
||||
//- Per patch the boundaryRadiationProperties
|
||||
@ -83,7 +94,7 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct given fvMesh
|
||||
explicit boundaryRadiationProperties(const fvMesh&);
|
||||
explicit boundaryRadiationProperties(const fvMesh& mesh);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
Loading…
Reference in New Issue
Block a user