mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: enumerations for known cell models in cellModel, ptr/ref lookups
- this provides a better typesafe means of locating predefined cell models than relying on strings. The lookup is now ptr() or ref() directly. The lookup functions behave like on-demand singletons when loading "etc/cellModels". Functionality is now located entirely in cellModel but a forwarding version of cellModeller is provided for API (but not ABI) compatibility with older existing user code. STYLE: use constexpr for cellMatcher constants
This commit is contained in:
@ -42,7 +42,7 @@ Description
|
||||
#include "OFstream.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "basicMultiComponentMixture.H"
|
||||
#include "cellModeller.H"
|
||||
#include "cellModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -13,8 +13,7 @@ points[5] = vector(1, 0, 1);
|
||||
points[6] = vector(1, 1, 1);
|
||||
points[7] = vector(0, 1, 1);
|
||||
|
||||
const cellModel& hexa = *(cellModeller::lookup("hex"));
|
||||
faceList faces = hexa.modelFaces();
|
||||
faceList faces = cellModel::ref(cellModel::HEX).modelFaces();
|
||||
|
||||
fvMesh mesh
|
||||
(
|
||||
@ -25,7 +24,7 @@ fvMesh mesh
|
||||
runTime,
|
||||
IOobject::READ_IF_PRESENT
|
||||
),
|
||||
xferMove<Field<vector>>(points),
|
||||
xferMove<pointField>(points),
|
||||
faces.xfer(),
|
||||
owner.xfer(),
|
||||
neighbour.xfer()
|
||||
|
||||
@ -31,7 +31,7 @@ Description
|
||||
#include "polyMesh.H"
|
||||
#include "boundBox.H"
|
||||
#include "treeBoundBox.H"
|
||||
#include "cellModeller.H"
|
||||
#include "cellModel.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
@ -52,15 +52,11 @@ boundBox cube(scalar start, scalar width)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
// #include "createTime.H"
|
||||
// #include "createMesh.H"
|
||||
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
|
||||
Info<<"boundBox faces: " << boundBox::faces << endl;
|
||||
Info<<"hex faces: " << hex.modelFaces() << endl;
|
||||
Info<<"tree-bb faces: " << treeBoundBox::faces << endl;
|
||||
Info<<"tree-bb edges: " << treeBoundBox::edges << endl;
|
||||
Info<<"boundBox faces: " << boundBox::faces << nl
|
||||
<<"hex faces: " << cellModel::ref(cellModel::HEX).modelFaces() << nl
|
||||
<<"tree-bb faces: " << treeBoundBox::faces << nl
|
||||
<<"tree-bb edges: " << treeBoundBox::edges << endl;
|
||||
|
||||
boundBox bb = boundBox::greatBox;
|
||||
Info<<"great box: " << bb << endl;
|
||||
|
||||
3
applications/test/cellModels/Make/files
Normal file
3
applications/test/cellModels/Make/files
Normal file
@ -0,0 +1,3 @@
|
||||
Test-cellModels.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/Test-cellModels
|
||||
0
applications/test/cellModels/Make/options
Normal file
0
applications/test/cellModels/Make/options
Normal file
97
applications/test/cellModels/Test-cellModels.C
Normal file
97
applications/test/cellModels/Test-cellModels.C
Normal file
@ -0,0 +1,97 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
Test-cellModels
|
||||
|
||||
Description
|
||||
Print information about known cellModels
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "cellModel.H"
|
||||
#include "cellModeller.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
void printInfo(const cellModel* mdl)
|
||||
{
|
||||
if (mdl)
|
||||
{
|
||||
Info<< *mdl << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "nullptr" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void printInfo(const cellModel::modelType type)
|
||||
{
|
||||
Info<< cellModel::modelNames[type] << " = ";
|
||||
printInfo(cellModel::ptr(type));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Main program:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Info<<"lookup by enum" << nl
|
||||
<<"=========================" << endl;
|
||||
|
||||
printInfo(cellModel::UNKNOWN);
|
||||
printInfo(cellModel::HEX);
|
||||
printInfo(cellModel::WEDGE);
|
||||
printInfo(cellModel::PRISM);
|
||||
printInfo(cellModel::PYR);
|
||||
printInfo(cellModel::TET);
|
||||
printInfo(cellModel::SPLITHEX);
|
||||
printInfo(cellModel::TETWEDGE);
|
||||
|
||||
|
||||
Info<<"lookup by name" << nl
|
||||
<<"=========================" << endl;
|
||||
|
||||
printInfo(cellModel::ptr("tet"));
|
||||
|
||||
Info<<"lookup by index" << nl
|
||||
<<"=========================" << endl;
|
||||
|
||||
printInfo(cellModel::ptr(7));
|
||||
|
||||
// Compatibility mode
|
||||
Info<<"cellModeller::lookup (compatibility)" << nl
|
||||
<<"=========================" << endl;
|
||||
|
||||
printInfo(cellModeller::lookup("tet"));
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -52,7 +52,7 @@ Description
|
||||
#include "polyMesh.H"
|
||||
#include "cellCuts.H"
|
||||
#include "cellSet.H"
|
||||
#include "cellModeller.H"
|
||||
#include "cellModel.H"
|
||||
#include "meshCutter.H"
|
||||
#include "unitConversion.H"
|
||||
#include "geomCellLooper.H"
|
||||
@ -387,7 +387,7 @@ void collectCuts
|
||||
const vectorField& faceAreas = mesh.faceAreas();
|
||||
|
||||
// Hex shape
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
const cellModel& hex = cellModel::ref(cellModel::HEX);
|
||||
|
||||
// cut handling functions
|
||||
edgeVertex ev(mesh);
|
||||
|
||||
@ -56,7 +56,6 @@ using namespace Foam;
|
||||
#include "emptyPolyPatch.H"
|
||||
#include "preservePatchTypes.H"
|
||||
#include "cellShape.H"
|
||||
#include "cellModeller.H"
|
||||
#include "SLList.H"
|
||||
#include "SLPtrList.H"
|
||||
|
||||
@ -363,10 +362,10 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
const cellModel& prism = *(cellModeller::lookup("prism"));
|
||||
const cellModel& pyr = *(cellModeller::lookup("pyr"));
|
||||
const cellModel& tet = *(cellModeller::lookup("tet"));
|
||||
const cellModel& hex = cellModel::ref(cellModel::HEX);
|
||||
const cellModel& prism = cellModel::ref(cellModel::PRISM);
|
||||
const cellModel& pyr = cellModel::ref(cellModel::PYR);
|
||||
const cellModel& tet = cellModel::ref(cellModel::TET);
|
||||
|
||||
labelList labelsHex(8);
|
||||
labelList labelsPrism(6);
|
||||
|
||||
@ -41,7 +41,6 @@ Description
|
||||
#include "symmetryPolyPatch.H"
|
||||
#include "preservePatchTypes.H"
|
||||
#include "cellShape.H"
|
||||
#include "cellModeller.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
@ -545,7 +544,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
cellShapeList cellShapes(nMeshCells);
|
||||
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
const cellModel& hex = cellModel::ref(cellModel::HEX);
|
||||
|
||||
label nCreatedCells = 0;
|
||||
|
||||
|
||||
@ -32,7 +32,6 @@ Description
|
||||
#define cellShapeRecognition_H
|
||||
|
||||
#include "cellShape.H"
|
||||
#include "cellModeller.H"
|
||||
#include "faceList.H"
|
||||
#include "PtrList.H"
|
||||
|
||||
|
||||
@ -50,13 +50,13 @@ cellShape create3DCellShape
|
||||
static List<const cellModel*> fluentCellModelLookup
|
||||
(
|
||||
7,
|
||||
reinterpret_cast<const cellModel*>(0)
|
||||
nullptr
|
||||
);
|
||||
|
||||
fluentCellModelLookup[2] = cellModeller::lookup("tet");
|
||||
fluentCellModelLookup[4] = cellModeller::lookup("hex");
|
||||
fluentCellModelLookup[5] = cellModeller::lookup("pyr");
|
||||
fluentCellModelLookup[6] = cellModeller::lookup("prism");
|
||||
fluentCellModelLookup[2] = cellModel::ptr(cellModel::TET);
|
||||
fluentCellModelLookup[4] = cellModel::ptr(cellModel::HEX);
|
||||
fluentCellModelLookup[5] = cellModel::ptr(cellModel::PYR);
|
||||
fluentCellModelLookup[6] = cellModel::ptr(cellModel::PRISM);
|
||||
|
||||
static label faceMatchingOrder[7][6] =
|
||||
{
|
||||
|
||||
@ -51,7 +51,7 @@ cellShape extrudedQuadCellShape
|
||||
|
||||
if (!hexModelPtr_)
|
||||
{
|
||||
hexModelPtr_ = cellModeller::lookup("hex");
|
||||
hexModelPtr_ = cellModel::ptr(cellModel::HEX);
|
||||
}
|
||||
|
||||
const cellModel& hex = *hexModelPtr_;
|
||||
|
||||
@ -28,7 +28,7 @@ Description
|
||||
|
||||
#include "cellShapeRecognition.H"
|
||||
#include "labelList.H"
|
||||
#include "cellModeller.H"
|
||||
#include "cellModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -52,7 +52,7 @@ cellShape extrudedTriangleCellShape
|
||||
|
||||
if (!prismModelPtr_)
|
||||
{
|
||||
prismModelPtr_ = cellModeller::lookup("prism");
|
||||
prismModelPtr_ = cellModel::ptr(cellModel::PRISM);
|
||||
}
|
||||
|
||||
const cellModel& prism = *prismModelPtr_;
|
||||
|
||||
@ -34,7 +34,7 @@ using std::ios;
|
||||
#include "wallFvPatch.H"
|
||||
#include "symmetryPlaneFvPatch.H"
|
||||
#include "symmetryFvPatch.H"
|
||||
#include "cellModeller.H"
|
||||
#include "cellModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -218,10 +218,10 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
||||
<< "(12 (1 1 "
|
||||
<< nCells() << " 1 0)(" << std::endl;
|
||||
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
const cellModel& prism = *(cellModeller::lookup("prism"));
|
||||
const cellModel& pyr = *(cellModeller::lookup("pyr"));
|
||||
const cellModel& tet = *(cellModeller::lookup("tet"));
|
||||
const cellModel& hex = cellModel::ref(cellModel::HEX);
|
||||
const cellModel& prism = cellModel::ref(cellModel::PRISM);
|
||||
const cellModel& pyr = cellModel::ref(cellModel::PYR);
|
||||
const cellModel& tet = cellModel::ref(cellModel::TET);
|
||||
|
||||
const cellShapeList& cells = cellShapes();
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ Group
|
||||
grpMeshConversionUtilities
|
||||
|
||||
Description
|
||||
Reads an OpenFOAM mesh and writes a pro-STAR (v4) bnd/cel/vrt format.
|
||||
Reads an OpenFOAM mesh and writes a STARCD/PROSTAR (v4) bnd/cel/vrt format.
|
||||
|
||||
Usage
|
||||
\b foamToStarMesh [OPTION]
|
||||
@ -67,7 +67,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"read OpenFOAM mesh and write a pro-STAR (v4) bnd/cel/vrt format"
|
||||
"read OpenFOAM mesh and write a STARCD/PROSTAR (v4) bnd/cel/vrt format"
|
||||
);
|
||||
argList::noParallel();
|
||||
timeSelector::addOptions();
|
||||
|
||||
@ -53,7 +53,6 @@ using namespace Foam;
|
||||
#include "polyMesh.H"
|
||||
#include "emptyPolyPatch.H"
|
||||
#include "preservePatchTypes.H"
|
||||
#include "cellModeller.H"
|
||||
#include "cellShape.H"
|
||||
#include "SLList.H"
|
||||
#include "SLPtrList.H"
|
||||
@ -699,10 +698,10 @@ int main(int argc, char *argv[])
|
||||
cellLookup[cellMap[celli] ] = celli;
|
||||
}
|
||||
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
const cellModel& prism = *(cellModeller::lookup("prism"));
|
||||
const cellModel& pyr = *(cellModeller::lookup("pyr"));
|
||||
const cellModel& tet = *(cellModeller::lookup("tet"));
|
||||
const cellModel& hex = cellModel::ref(cellModel::HEX);
|
||||
const cellModel& prism = cellModel::ref(cellModel::PRISM);
|
||||
const cellModel& pyr = cellModel::ref(cellModel::PYR);
|
||||
const cellModel& tet = cellModel::ref(cellModel::TET);
|
||||
|
||||
labelList labelsHex(8);
|
||||
labelList labelsPrism(6);
|
||||
|
||||
@ -52,7 +52,7 @@ Description
|
||||
#include "Time.H"
|
||||
#include "polyMesh.H"
|
||||
#include "IFstream.H"
|
||||
#include "cellModeller.H"
|
||||
#include "cellModel.H"
|
||||
#include "repatchPolyTopoChanger.H"
|
||||
#include "cellSet.H"
|
||||
#include "faceSet.H"
|
||||
@ -435,10 +435,10 @@ void readCells
|
||||
|
||||
Info<< "Starting to read cells at line " << inFile.lineNumber() << endl;
|
||||
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
const cellModel& prism = *(cellModeller::lookup("prism"));
|
||||
const cellModel& pyr = *(cellModeller::lookup("pyr"));
|
||||
const cellModel& tet = *(cellModeller::lookup("tet"));
|
||||
const cellModel& hex = cellModel::ref(cellModel::HEX);
|
||||
const cellModel& prism = cellModel::ref(cellModel::PRISM);
|
||||
const cellModel& pyr = cellModel::ref(cellModel::PYR);
|
||||
const cellModel& tet = cellModel::ref(cellModel::TET);
|
||||
|
||||
face triPoints(3);
|
||||
face quadPoints(4);
|
||||
|
||||
@ -42,7 +42,7 @@ Description
|
||||
#include "polyMesh.H"
|
||||
#include "Time.H"
|
||||
#include "IFstream.H"
|
||||
#include "cellModeller.H"
|
||||
#include "cellModel.H"
|
||||
#include "cellSet.H"
|
||||
#include "faceSet.H"
|
||||
#include "DynamicList.H"
|
||||
@ -291,9 +291,9 @@ void readCells
|
||||
labelList unvToFoam(invert(maxUnvPoint+1, unvPointID));
|
||||
|
||||
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
const cellModel& prism = *(cellModeller::lookup("prism"));
|
||||
const cellModel& tet = *(cellModeller::lookup("tet"));
|
||||
const cellModel& hex = cellModel::ref(cellModel::HEX);
|
||||
const cellModel& prism = cellModel::ref(cellModel::PRISM);
|
||||
const cellModel& tet = cellModel::ref(cellModel::TET);
|
||||
|
||||
labelHashSet skippedElements;
|
||||
|
||||
|
||||
@ -37,7 +37,6 @@ Description
|
||||
#include "polyMesh.H"
|
||||
#include "Fstream.H"
|
||||
#include "cellShape.H"
|
||||
#include "cellModeller.H"
|
||||
#include "preservePatchTypes.H"
|
||||
#include "emptyPolyPatch.H"
|
||||
#include "wallPolyPatch.H"
|
||||
|
||||
@ -102,7 +102,7 @@ cellShapeList cellShapes(nPoints);
|
||||
|
||||
labelList cellZoning(nPoints, -1);
|
||||
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
const cellModel& hex = cellModel::ref(cellModel::HEX);
|
||||
labelList hexLabels(8);
|
||||
label activeCells = 0;
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ Description
|
||||
#include "IFstream.H"
|
||||
#include "polyPatch.H"
|
||||
#include "ListOps.H"
|
||||
#include "cellModeller.H"
|
||||
#include "cellModel.H"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
@ -87,8 +87,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
cellShapeList cells(nCells);
|
||||
|
||||
const cellModel& tet = *(cellModeller::lookup("tet"));
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
const cellModel& tet = cellModel::ref(cellModel::TET);
|
||||
const cellModel& hex = cellModel::ref(cellModel::HEX);
|
||||
|
||||
labelList tetPoints(4);
|
||||
labelList hexPoints(8);
|
||||
|
||||
@ -82,7 +82,7 @@ NOTE:
|
||||
#include "polyMesh.H"
|
||||
#include "IFstream.H"
|
||||
#include "polyPatch.H"
|
||||
#include "cellModeller.H"
|
||||
#include "cellModel.H"
|
||||
#include "triFace.H"
|
||||
|
||||
using namespace Foam;
|
||||
@ -124,7 +124,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "nTets:" << nTets << endl;
|
||||
|
||||
const cellModel& tet = *(cellModeller::lookup("tet"));
|
||||
const cellModel& tet = cellModel::ref(cellModel::TET);
|
||||
|
||||
cellShapeList cells(nTets);
|
||||
|
||||
|
||||
@ -50,7 +50,6 @@ Description
|
||||
#include "wallPolyPatch.H"
|
||||
#include "symmetryPolyPatch.H"
|
||||
#include "cellShape.H"
|
||||
#include "cellModeller.H"
|
||||
#include "mergePoints.H"
|
||||
|
||||
using namespace Foam;
|
||||
@ -202,7 +201,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
cellShapeList cellShapes(nMeshCells);
|
||||
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
const cellModel& hex = cellModel::ref(cellModel::HEX);
|
||||
|
||||
label nCreatedCells = 0;
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ Group
|
||||
grpMeshConversionUtilities
|
||||
|
||||
Description
|
||||
Converts a Star-CD (v4) pro-STAR mesh into OpenFOAM format.
|
||||
Converts a STARCD/PROSTAR (v4) mesh into OpenFOAM format.
|
||||
|
||||
Usage
|
||||
\b star4ToFoam [OPTION] prostarMesh
|
||||
@ -66,11 +66,11 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"convert pro-STAR (v4) mesh to OpenFOAM"
|
||||
"convert STARCD/PROSTAR (v4) mesh to OpenFOAM"
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("pro-STAR prefix");
|
||||
argList::validArgs.append("PROSTAR prefix");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"ascii",
|
||||
|
||||
@ -70,7 +70,7 @@ Note
|
||||
#include "Time.H"
|
||||
#include "polyMesh.H"
|
||||
#include "IFstream.H"
|
||||
#include "cellModeller.H"
|
||||
#include "cellModel.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
@ -276,8 +276,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
|
||||
const cellModel& tet = *(cellModeller::lookup("tet"));
|
||||
const cellModel& tet = cellModel::ref(cellModel::TET);
|
||||
|
||||
labelList tetPoints(4);
|
||||
|
||||
|
||||
@ -39,7 +39,6 @@ Description
|
||||
#include "cellShapeControl.H"
|
||||
#include "backgroundMeshDecomposition.H"
|
||||
#include "cellShape.H"
|
||||
#include "cellModeller.H"
|
||||
#include "DynamicField.H"
|
||||
#include "isoSurfaceCell.H"
|
||||
#include "vtkSurfaceWriter.H"
|
||||
@ -252,7 +251,7 @@ autoPtr<polyMesh> generateHexMesh
|
||||
}
|
||||
|
||||
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
const cellModel& hex = cellModel::ref(cellModel::HEX);
|
||||
cellShapeList cellShapes(nCells[0]*nCells[1]*nCells[2]);
|
||||
|
||||
labelList hexPoints(8);
|
||||
|
||||
@ -53,7 +53,6 @@ Description
|
||||
#include "faceSet.H"
|
||||
#include "motionSmoother.H"
|
||||
#include "polyTopoChange.H"
|
||||
#include "cellModeller.H"
|
||||
#include "uindirectPrimitivePatch.H"
|
||||
#include "surfZoneIdentifierList.H"
|
||||
#include "UnsortedMeshedSurface.H"
|
||||
|
||||
@ -57,7 +57,7 @@ int USERD_get_part_elements_by_type
|
||||
//================================
|
||||
if (element_type == Z_HEX08)
|
||||
{
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
const cellModel& hex = cellModel::ref(cellModel::HEX);
|
||||
|
||||
label nHex08 = 0;
|
||||
forAll(cellShapes, celli)
|
||||
@ -80,7 +80,7 @@ int USERD_get_part_elements_by_type
|
||||
//================================
|
||||
else if (element_type == Z_PEN06)
|
||||
{
|
||||
const cellModel& prism = *(cellModeller::lookup("prism"));
|
||||
const cellModel& prism = cellModel::ref(cellModel::PRISM);
|
||||
|
||||
label nPen06 = 0;
|
||||
forAll(cellShapes, celli)
|
||||
@ -103,7 +103,7 @@ int USERD_get_part_elements_by_type
|
||||
//================================
|
||||
else if (element_type == Z_PYR05)
|
||||
{
|
||||
const cellModel& pyr = *(cellModeller::lookup("pyr"));
|
||||
const cellModel& pyr = cellModel::ref(cellModel::PYR);
|
||||
|
||||
label nPyr05 = 0;
|
||||
forAll(cellShapes, celli)
|
||||
@ -126,7 +126,7 @@ int USERD_get_part_elements_by_type
|
||||
//================================
|
||||
else if (element_type == Z_TET04)
|
||||
{
|
||||
const cellModel& tet = *(cellModeller::lookup("tet"));
|
||||
const cellModel& tet = cellModel::ref(cellModel::TET);
|
||||
|
||||
label nTet04 = 0;
|
||||
forAll(cellShapes, celli)
|
||||
|
||||
@ -37,8 +37,8 @@ const cellShapeList& cellShapes = meshPtr->cellShapes();
|
||||
// hexa's
|
||||
if (which_type == Z_HEX08)
|
||||
{
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
//const cellModel& wedge = *(cellModeller::lookup("wedge"));
|
||||
const cellModel& hex = cellModel::ref(cellModel::HEX);
|
||||
//const cellModel& wedge = cellModel::ref(cellModel::WEDGE);
|
||||
|
||||
label counter = 1;
|
||||
for (label celli=0; celli<nCells; celli++)
|
||||
@ -56,7 +56,7 @@ if (which_type == Z_HEX08)
|
||||
// penta's
|
||||
if (which_type == Z_PEN06)
|
||||
{
|
||||
const cellModel& prism = *(cellModeller::lookup("prism"));
|
||||
const cellModel& prism = cellModel::ref(cellModel::PRISM);
|
||||
|
||||
label counter = 1;
|
||||
for (label n=0; n<nCells; n++)
|
||||
@ -74,7 +74,7 @@ if (which_type == Z_PEN06)
|
||||
// pyramids's
|
||||
if (which_type == Z_PYR05)
|
||||
{
|
||||
const cellModel& pyr = *(cellModeller::lookup("pyr"));
|
||||
const cellModel& pyr = cellModel::ref(cellModel::PYR);
|
||||
|
||||
label counter = 1;
|
||||
for (label n=0; n<nCells; n++)
|
||||
@ -92,7 +92,7 @@ if (which_type == Z_PYR05)
|
||||
// tet's
|
||||
if (which_type == Z_TET04)
|
||||
{
|
||||
const cellModel& tet = *(cellModeller::lookup("tet"));
|
||||
const cellModel& tet = cellModel::ref(cellModel::TET);
|
||||
|
||||
label counter = 1;
|
||||
for (label n=0; n<nCells; n++)
|
||||
|
||||
@ -37,8 +37,8 @@ const cellShapeList& cellShapes = meshPtr->cellShapes();
|
||||
// hexa's
|
||||
if (which_type == Z_HEX08)
|
||||
{
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
//const cellModel& wedge = *(cellModeller::lookup("wedge"));
|
||||
const cellModel& hex = cellModel::ref(cellModel::HEX);
|
||||
//const cellModel& wedge = cellModel::ref(cellModel::WEDGE);
|
||||
|
||||
label counter = 1;
|
||||
for (label n=0; n<nCells; n++)
|
||||
@ -56,7 +56,7 @@ if (which_type == Z_HEX08)
|
||||
// penta's
|
||||
if (which_type == Z_PEN06)
|
||||
{
|
||||
const cellModel& prism = *(cellModeller::lookup("prism"));
|
||||
const cellModel& prism = cellModel::ref(cellModel::PRISM);
|
||||
|
||||
label counter = 1;
|
||||
for (label n=0; n<nCells; n++)
|
||||
@ -74,7 +74,7 @@ if (which_type == Z_PEN06)
|
||||
// pyramids's
|
||||
if (which_type == Z_PYR05)
|
||||
{
|
||||
const cellModel& pyr = *(cellModeller::lookup("pyr"));
|
||||
const cellModel& pyr = cellModel::ref(cellModel::PYR);
|
||||
|
||||
label counter = 1;
|
||||
for (label n=0; n<nCells; n++)
|
||||
@ -93,7 +93,7 @@ if (which_type == Z_PYR05)
|
||||
// penta's
|
||||
if (which_type == Z_TET04)
|
||||
{
|
||||
const cellModel& tet = *(cellModeller::lookup("tet"));
|
||||
const cellModel& tet = cellModel::ref(cellModel::TET);
|
||||
|
||||
label counter = 1;
|
||||
|
||||
|
||||
@ -37,8 +37,8 @@ const cellShapeList& cellShapes = meshPtr->cellShapes();
|
||||
// hexa's
|
||||
if (which_type == Z_HEX08)
|
||||
{
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
//const cellModel& wedge = *(cellModeller::lookup("wedge"));
|
||||
const cellModel& hex = cellModel::ref(cellModel::HEX);
|
||||
//const cellModel& wedge = cellModel::ref(cellModel::WEDGE);
|
||||
|
||||
label counter = 1;
|
||||
for (label n=0; n<nCells; n++)
|
||||
@ -56,7 +56,7 @@ if (which_type == Z_HEX08)
|
||||
// penta's
|
||||
if (which_type == Z_PEN06)
|
||||
{
|
||||
const cellModel& prism = *(cellModeller::lookup("prism"));
|
||||
const cellModel& prism = cellModel::ref(cellModel::PRISM);
|
||||
|
||||
label counter = 1;
|
||||
for (label n=0; n<nCells; n++)
|
||||
@ -74,7 +74,7 @@ if (which_type == Z_PEN06)
|
||||
// pyramids's
|
||||
if (which_type == Z_PYR05)
|
||||
{
|
||||
const cellModel& pyr = *(cellModeller::lookup("pyr"));
|
||||
const cellModel& pyr = cellModel::ref(cellModel::PYR);
|
||||
|
||||
label counter = 1;
|
||||
for (label n=0; n<nCells; n++)
|
||||
@ -93,7 +93,7 @@ if (which_type == Z_PYR05)
|
||||
// tet's
|
||||
if (which_type == Z_TET04)
|
||||
{
|
||||
const cellModel& tet = *(cellModeller::lookup("tet"));
|
||||
const cellModel& tet = cellModel::ref(cellModel::TET);
|
||||
|
||||
label counter = 1;
|
||||
for (label n=0; n<nCells; n++)
|
||||
|
||||
@ -43,7 +43,7 @@ Description
|
||||
#include "Cloud.H"
|
||||
#include "passiveParticle.H"
|
||||
#include "fvMesh.H"
|
||||
#include "cellModeller.H"
|
||||
#include "cellModel.H"
|
||||
#include "globalFoam.H"
|
||||
#include "foamVersion.H"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user