Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
02f97872
Commit
02f97872
authored
Jun 19, 2018
by
Andrew Heather
Browse files
ENH: Dry-run - Include creation of sets and zones for dyanmic mesh cases
parent
cf7dbcd0
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMeshTemplates.C
View file @
02f97872
...
...
@@ -61,6 +61,9 @@ SimplifiedDynamicFvMesh
// Add the patches
addLocalPatches
(
*
this
);
// Add the zones if constructed from mesh
initialiseZones
(
*
this
);
}
...
...
src/finiteVolume/fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.C
View file @
02f97872
...
...
@@ -75,7 +75,8 @@ bool Foam::simplifiedMeshes::columnFvMeshInfo::setPatchEntries
{
polyBoundaryMeshEntries
allPatchEntries
(
boundaryIO
);
Info
<<
"Creating simplified mesh using "
<<
allPatchEntries
.
path
()
<<
endl
;
Info
<<
"Creating simplified mesh using "
<<
allPatchEntries
.
path
()
<<
endl
;
for
(
const
entry
&
e
:
allPatchEntries
)
{
...
...
@@ -134,7 +135,7 @@ bool Foam::simplifiedMeshes::columnFvMeshInfo::setPatchEntries
dictionary
simplifiedEntries
;
simplifiedEntries
.
add
(
"startFace"
,
0
);
simplifiedEntries
.
add
(
"nFaces"
,
1
);
simplifiedEntries
.
add
(
"type"
,
"wall"
);
// default to wall
type
simplifiedEntries
.
add
(
"type"
,
"wall"
);
// default to wall
patchEntries_
.
add
(
e
.
keyword
(),
simplifiedEntries
);
}
...
...
@@ -304,7 +305,12 @@ void Foam::simplifiedMeshes::columnFvMeshInfo::initialise(const Time& runTime)
}
void
Foam
::
simplifiedMeshes
::
columnFvMeshInfo
::
addLocalPatches
(
fvMesh
&
mesh
)
const
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void
Foam
::
simplifiedMeshes
::
columnFvMeshInfo
::
addLocalPatches
(
fvMesh
&
mesh
)
const
{
const
label
nPatch
=
patchEntries_
.
size
();
...
...
@@ -367,6 +373,24 @@ void Foam::simplifiedMeshes::columnFvMeshInfo::addLocalPatches(fvMesh& mesh) con
}
}
void
Foam
::
simplifiedMeshes
::
columnFvMeshInfo
::
initialiseZones
(
fvMesh
&
mesh
)
{
if
(
createFromMesh_
)
{
// Initialise the zones
initialiseZone
<
pointZoneMesh
>
(
"point"
,
localInstance_
,
mesh
.
pointZones
()
);
initialiseZone
<
faceZoneMesh
>
(
"face"
,
localInstance_
,
mesh
.
faceZones
());
initialiseZone
<
cellZoneMesh
>
(
"cell"
,
localInstance_
,
mesh
.
cellZones
());
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam
::
simplifiedMeshes
::
columnFvMeshInfo
::
columnFvMeshInfo
(
const
Time
&
runTime
)
...
...
@@ -389,6 +413,11 @@ Foam::simplifiedMeshes::columnFvMeshInfo::columnFvMeshInfo(const Time& runTime)
nPatchWithFace_
(
0
)
{
initialise
(
runTime
);
// Dummy zones and sets created on demand
// Note: zones can be updated post-construction
cellZoneMesh
::
disallowGenericZones
=
1
;
topoSet
::
disallowGenericSets
=
1
;
}
...
...
@@ -423,24 +452,8 @@ Foam::simplifiedMeshes::columnFvMesh::columnFvMesh(const Time& runTime)
// Add the patches
addLocalPatches
(
*
this
);
// Add the zones
if
(
createFromMesh_
)
{
// Initialise the zones
initialiseZone
<
pointZoneMesh
>
(
"point"
,
localInstance_
,
pointZones
());
initialiseZone
<
faceZoneMesh
>
(
"face"
,
localInstance_
,
faceZones
());
initialiseZone
<
cellZoneMesh
>
(
"cell"
,
localInstance_
,
cellZones
());
// Dummy sets created on demand
topoSet
::
disallowGenericSets
=
1
;
}
else
{
// Dummy zones and sets created on demand
cellZoneMesh
::
disallowGenericZones
=
1
;
topoSet
::
disallowGenericSets
=
1
;
}
// Add the zones if constructed from mesh
initialiseZones
(
*
this
);
if
(
debug
)
{
...
...
src/finiteVolume/fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.H
View file @
02f97872
...
...
@@ -59,6 +59,15 @@ class columnFvMeshInfo
//- Initialise
void
initialise
(
const
Time
&
runTime
);
//- Helper function to initialise empty zones
template
<
class
ZoneMeshType
>
void
initialiseZone
(
const
word
&
zoneTypeName
,
const
fileName
&
instance
,
ZoneMeshType
&
zoneType
);
protected:
...
...
@@ -99,6 +108,9 @@ protected:
//- Add the patches to the mesh
void
addLocalPatches
(
fvMesh
&
mesh
)
const
;
//- Initialise zones if constructed from mesh
void
initialiseZones
(
fvMesh
&
mesh
);
public:
...
...
@@ -133,6 +145,12 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include
"columnFvMeshTemplates.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
src/finiteVolume/fvMesh/simplifiedFvMesh/
simplifiedFvMesh/simplified
FvMeshTemplates.C
→
src/finiteVolume/fvMesh/simplifiedFvMesh/
columnFvMesh/column
FvMeshTemplates.C
View file @
02f97872
...
...
@@ -22,14 +22,13 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include
"polyMesh.H"
template
<
class
ZoneMeshType
>
void
Foam
::
simplifiedFvMesh
::
initialiseZone
void
Foam
::
simplified
Meshes
::
column
FvMesh
Info
::
initialiseZone
(
const
word
&
zoneTypeName
,
const
fileName
&
instance
,
const
fileName
&
instance
,
ZoneMeshType
&
zoneType
)
{
...
...
src/finiteVolume/fvMesh/simplifiedFvMesh/hexCellFvMesh/hexCellFvMesh.C
View file @
02f97872
...
...
@@ -94,6 +94,8 @@ Foam::simplifiedMeshes::hexCellFvMesh::hexCellFvMesh
);
addFvPatches
(
patches
);
// Note: no sets or zones created
}
...
...
src/finiteVolume/fvMesh/simplifiedFvMesh/simplifiedFvMesh/simplifiedFvMesh.C
View file @
02f97872
...
...
@@ -25,6 +25,7 @@ License
#include
"simplifiedFvMesh.H"
#include
"fvPatchField.H"
#include
"topoSet.H"
// * * * * * * * * * * * * * * * Static Members * * * * * * * * * * * * * * //
...
...
@@ -57,6 +58,8 @@ bool Foam::simplifiedFvMesh::fvPatchFieldExists(const word& patchType)
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam
::
simplifiedFvMesh
::
simplifiedFvMesh
(
const
IOobject
&
io
,
...
...
src/finiteVolume/fvMesh/simplifiedFvMesh/simplifiedFvMesh/simplifiedFvMesh.H
View file @
02f97872
...
...
@@ -52,18 +52,6 @@ class simplifiedFvMesh
:
public
fvMesh
{
protected:
//- Helper function to initialise empty zones
template
<
class
ZoneMeshType
>
void
initialiseZone
(
const
word
&
zoneTypeName
,
const
fileName
&
instance
,
ZoneMeshType
&
zoneType
);
public:
//- Runtime type information
...
...
@@ -118,12 +106,6 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include
"simplifiedFvMeshTemplates.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment