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
dfa2c676
Commit
dfa2c676
authored
Apr 16, 2010
by
mattijs
Browse files
ENH: Allow specification of defaultFaces boundary type
parent
300ac484
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C
View file @
dfa2c676
...
...
@@ -577,21 +577,56 @@ Foam::polyMesh::polyMesh
<<
"Found "
<<
nFaces
-
defaultPatchStart
<<
" undefined faces in mesh; adding to default patch."
<<
endl
;
boundary_
.
set
(
nAllPatches
,
polyPatch
::
New
// Check if there already exists a defaultFaces patch as last patch
// and reuse it.
label
patchI
=
findIndex
(
boundaryPatchNames
,
defaultBoundaryPatchName
);
if
(
patchI
!=
-
1
)
{
if
(
patchI
!=
boundaryFaces
.
size
()
-
1
||
boundary_
[
patchI
].
size
())
{
FatalErrorIn
(
"polyMesh::polyMesh(... construct from shapes...)"
)
<<
"Default patch "
<<
boundary_
[
patchI
].
name
()
<<
" already has faces in it or is not"
<<
" last in list of patches."
<<
exit
(
FatalError
);
}
WarningIn
(
"polyMesh::polyMesh(... construct from shapes...)"
)
<<
"Reusing existing patch "
<<
patchI
<<
" for undefined faces."
<<
endl
;
boundary_
.
set
(
defaultBoundaryPatchType
,
defaultBoundaryPatchName
,
nFaces
-
defaultPatchStart
,
defaultPatchStart
,
boundary_
.
size
()
-
1
,
boundary_
)
);
patchI
,
polyPatch
::
New
(
boundaryPatchTypes
[
patchI
],
boundaryPatchNames
[
patchI
],
nFaces
-
defaultPatchStart
,
defaultPatchStart
,
patchI
,
boundary_
)
);
}
else
{
boundary_
.
set
(
nAllPatches
,
polyPatch
::
New
(
defaultBoundaryPatchType
,
defaultBoundaryPatchName
,
nFaces
-
defaultPatchStart
,
defaultPatchStart
,
boundary_
.
size
()
-
1
,
boundary_
)
);
nAllPatches
++
;
nAllPatches
++
;
}
}
// Reset the size of the boundary
...
...
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