Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Community
integration-cfmesh
Commits
9a47b26f
Commit
9a47b26f
authored
Nov 06, 2015
by
Alen Cukrov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disallow empty patches on 3D meshes.
parent
366d854f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
+28
-3
meshLibrary/cartesian2DMesh/cartesian2DMeshGenerator/cartesian2DMeshGenerator.C
...DMesh/cartesian2DMeshGenerator/cartesian2DMeshGenerator.C
+1
-1
meshLibrary/utilities/surfaceTools/renameBoundaryPatches/renameBoundaryPatches.C
...urfaceTools/renameBoundaryPatches/renameBoundaryPatches.C
+22
-1
meshLibrary/utilities/surfaceTools/renameBoundaryPatches/renameBoundaryPatches.H
...urfaceTools/renameBoundaryPatches/renameBoundaryPatches.H
+5
-1
No files found.
meshLibrary/cartesian2DMesh/cartesian2DMeshGenerator/cartesian2DMeshGenerator.C
View file @
9a47b26f
...
...
@@ -188,7 +188,7 @@ void cartesian2DMeshGenerator::refBoundaryLayers()
void
cartesian2DMeshGenerator
::
replaceBoundaries
()
{
renameBoundaryPatches
rbp
(
mesh_
,
meshDict_
);
renameBoundaryPatches
rbp
(
mesh_
,
meshDict_
,
true
);
}
void
cartesian2DMeshGenerator
::
renumberMesh
()
...
...
meshLibrary/utilities/surfaceTools/renameBoundaryPatches/renameBoundaryPatches.C
View file @
9a47b26f
...
...
@@ -248,19 +248,40 @@ void renameBoundaryPatches::calculateNewBoundary()
Info
<<
"Finished renaming boundary patches"
<<
endl
;
}
void
renameBoundaryPatches
::
checkEmptyPatches
()
{
polyMeshGenModifier
meshModifier
(
mesh_
);
forAll
(
mesh_
.
boundaries
(),
patchI
)
{
boundaryPatch
&
patch
=
meshModifier
.
boundariesAccess
()[
patchI
];
if
(
patch
.
patchType
()
==
"empty"
)
{
patch
.
patchType
()
=
"wall"
;
}
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
renameBoundaryPatches
::
renameBoundaryPatches
(
polyMeshGen
&
mesh
,
const
IOdictionary
&
meshDict
const
IOdictionary
&
meshDict
,
const
bool
allowEmptyPatches
)
:
mesh_
(
mesh
),
meshDict_
(
meshDict
)
{
if
(
!
allowEmptyPatches
)
{
checkEmptyPatches
();
}
if
(
meshDict
.
found
(
"renameBoundary"
)
)
calculateNewBoundary
();
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
...
...
meshLibrary/utilities/surfaceTools/renameBoundaryPatches/renameBoundaryPatches.H
View file @
9a47b26f
...
...
@@ -61,6 +61,9 @@ class renameBoundaryPatches
// Private member functions
//- calculate new boundary and replace the existing one
void
calculateNewBoundary
();
//- find empty patches in 3D meshes and change them to wall
void
checkEmptyPatches
();
//- Disallow default bitwise copy construct
renameBoundaryPatches
(
const
renameBoundaryPatches
&
);
...
...
@@ -76,7 +79,8 @@ public:
renameBoundaryPatches
(
polyMeshGen
&
mesh
,
const
IOdictionary
&
meshDict
const
IOdictionary
&
meshDict
,
const
bool
allowEmptyPatches
=
false
);
// Destructor
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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