Commit 9d6def68 authored by sergio's avatar sergio
Browse files

ENH: Adding extrudePatchMesh, re-location of extrudeModel and

createShellMesh and introducing io::READ_IF_PRESENT option
in polyMesh constructor from components
parent 2738c6b9
......@@ -10,7 +10,6 @@ EXE_INC = \
${EXE_NDEBUG} \
${CGAL_INC} \
-I$(FOAM_APP)/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/lnInclude \
-I$(FOAM_APP)/utilities/mesh/generation/extrude/extrudeModel/lnInclude \
-IconformalVoronoi2DMesh/lnInclude \
-I$(FOAM_APP)/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
......@@ -18,6 +17,7 @@ EXE_INC = \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude
EXE_LIBS = \
......
......@@ -2,7 +2,6 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wclean libso extrudeModel
wclean extrudeMesh
wclean extrudeToRegionMesh
......
......@@ -2,10 +2,7 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso extrudeModel
wmake extrudeMesh
wmake libso extrudeToRegionMesh/createShellMesh
wmake extrudeToRegionMesh
......
EXE_INC = \
-IextrudedMesh \
-I../extrudeModel/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
EXE_LIBS = \
-lfiniteVolume \
......
EXE_INC = \
-I../extrudeModel/lnInclude \
-IcreateShellMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
EXE_LIBS = \
-lextrudeModel \
-lcreateShellMesh \
-lfiniteVolume \
-lmeshTools \
-ldynamicMesh
-ldynamicMesh \
-lextrudeModel
......@@ -3,7 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-Iextrude2DMesh/lnInclude \
-I../extrude/extrudeModel/lnInclude
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
EXE_LIBS = \
-lsurfMesh \
......
......@@ -4,7 +4,7 @@ EXE_INC = \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(FOAM_APP)/utilities/mesh/generation/extrude/extrudeModel/lnInclude
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
LIB_LIBS = \
-lmeshTools \
......
......@@ -52,6 +52,8 @@ wmake $makeType conversion
wmake $makeType sampling
wmake $makeType mesh/extrudeModel
wmake $makeType dynamicMesh
wmake $makeType dynamicFvMesh
wmake $makeType topoChangerFvMesh
......
......@@ -130,6 +130,7 @@ Foam::solution::solution
obr,
(
obr.readOpt() == IOobject::MUST_READ
|| obr.readOpt() == IOobject::READ_IF_PRESENT
? IOobject::MUST_READ_IF_MODIFIED
: obr.readOpt()
),
......@@ -148,6 +149,7 @@ Foam::solution::solution
(
readOpt() == IOobject::MUST_READ
|| readOpt() == IOobject::MUST_READ_IF_MODIFIED
|| (readOpt() == IOobject::READ_IF_PRESENT && headerOk())
)
{
read(solutionDict());
......
......@@ -132,6 +132,84 @@ Foam::polyBoundaryMesh::polyBoundaryMesh
{}
Foam::polyBoundaryMesh::polyBoundaryMesh
(
const IOobject& io,
const polyMesh& pm,
const polyPatchList& ppl
)
:
polyPatchList(),
regIOobject(io),
mesh_(pm)
{
if
(
(this->readOpt() == IOobject::READ_IF_PRESENT && this->headerOk())
|| this->readOpt() == IOobject::MUST_READ
|| this->readOpt() == IOobject::MUST_READ_IF_MODIFIED
)
{
if (readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{
WarningIn
(
"polyBoundaryMesh::polyBoundaryMesh\n"
"(\n"
" const IOobject&,\n"
" const polyMesh&\n"
" const polyPatchList&\n"
")"
) << "Specified IOobject::MUST_READ_IF_MODIFIED but class"
<< " does not support automatic rereading."
<< endl;
}
polyPatchList& patches = *this;
// Read polyPatchList
Istream& is = readStream(typeName);
PtrList<entry> patchEntries(is);
patches.setSize(patchEntries.size());
forAll(patches, patchI)
{
patches.set
(
patchI,
polyPatch::New
(
patchEntries[patchI].keyword(),
patchEntries[patchI].dict(),
patchI,
*this
)
);
}
// Check state of IOstream
is.check
(
"polyBoundaryMesh::polyBoundaryMesh"
"(const IOobject&, const polyMesh&, const polyPatchList&)"
);
close();
}
else
{
polyPatchList& patches = *this;
patches.setSize(ppl.size());
forAll (patches, patchI)
{
patches.set(patchI, ppl[patchI].clone(*this).ptr());
}
}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::polyBoundaryMesh::~polyBoundaryMesh()
......
......@@ -119,6 +119,14 @@ public:
const label size
);
//- Construct given polyPatchList
polyBoundaryMesh
(
const IOobject&,
const polyMesh&,
const polyPatchList&
);
//- Destructor
~polyBoundaryMesh();
......
......@@ -338,7 +338,7 @@ Foam::polyMesh::polyMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
io.readOpt(),
IOobject::AUTO_WRITE
),
points
......@@ -351,7 +351,7 @@ Foam::polyMesh::polyMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
io.readOpt(),
IOobject::AUTO_WRITE
),
faces
......@@ -364,7 +364,7 @@ Foam::polyMesh::polyMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
io.readOpt(),
IOobject::AUTO_WRITE
),
owner
......@@ -377,7 +377,7 @@ Foam::polyMesh::polyMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
io.readOpt(),
IOobject::AUTO_WRITE
),
neighbour
......@@ -391,11 +391,11 @@ Foam::polyMesh::polyMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
io.readOpt(),
IOobject::AUTO_WRITE
),
*this,
0
polyPatchList()
),
bounds_(points_, syncPar),
geometricD_(Vector<label>::zero),
......@@ -410,11 +410,11 @@ Foam::polyMesh::polyMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
io.readOpt(),
IOobject::NO_WRITE
),
*this,
0
PtrList<pointZone>()
),
faceZones_
(
......@@ -424,11 +424,11 @@ Foam::polyMesh::polyMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
io.readOpt(),
IOobject::NO_WRITE
),
*this,
0
PtrList<faceZone>()
),
cellZones_
(
......@@ -438,11 +438,11 @@ Foam::polyMesh::polyMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
io.readOpt(),
IOobject::NO_WRITE
),
*this,
0
PtrList<cellZone>()
),
globalMeshDataPtr_(NULL),
moving_(false),
......
......@@ -162,6 +162,32 @@ Foam::ZoneMesh<ZoneType, MeshType>::ZoneMesh
{}
template<class ZoneType, class MeshType>
Foam::ZoneMesh<ZoneType, MeshType>::ZoneMesh
(
const IOobject& io ,
const MeshType& mesh,
const PtrList<ZoneType>& pzm
)
:
PtrList<ZoneType>(),
regIOobject(io),
mesh_(mesh),
zoneMapPtr_(NULL)
{
ZoneMesh<ZoneType, MeshType>(io, mesh);
if (this->size() == 0)
{
PtrList<ZoneType>& zones = *this;
zones.setSize(pzm.size());
forAll (zones, zoneI)
{
zones.set(zoneI, pzm[zoneI].clone(*this).ptr());
}
}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ZoneType, class MeshType>
......
......@@ -106,6 +106,15 @@ public:
const label size
);
//- Construct given a PtrList
ZoneMesh
(
const IOobject&,
const MeshType&,
const PtrList<ZoneType>&
);
//- Destructor
~ZoneMesh();
......
......@@ -86,4 +86,9 @@ motionSmoother/polyMeshGeometry/polyMeshGeometry.C
motionSolver/motionSolver.C
createShellMesh/createShellMesh.C
extrudePatchMesh/extrudePatchMesh.C
LIB = $(FOAM_LIBBIN)/libdynamicMesh
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
LIB_LIBS = \
-lfiniteVolume \
-ltriSurface
-ltriSurface \
-lextrudeModel
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment