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
695246ad
Commit
695246ad
authored
Dec 28, 2017
by
mattijs
Browse files
ENH: snappyHexMesh: directional refinement parallel
parent
01b785f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C
View file @
695246ad
...
...
@@ -1586,6 +1586,8 @@ Foam::label Foam::snappyRefineDriver::directionalShellRefine
labelList
&
cellLevel
=
const_cast
<
labelIOList
&>
(
meshRefiner_
.
meshCutter
().
cellLevel
());
labelList
&
pointLevel
=
const_cast
<
labelIOList
&>
(
meshRefiner_
.
meshCutter
().
pointLevel
());
// Determine the minimum and maximum cell levels that are candidates for
...
...
@@ -1705,6 +1707,17 @@ Foam::label Foam::snappyRefineDriver::directionalShellRefine
dirCellLevel
);
// Note: edges will have been split. The points might have
// inherited pointLevel from either side of the edge which
// might not be the same for coupled edges so sync
syncTools
::
syncPointList
(
mesh
,
pointLevel
,
maxEqOp
<
label
>
(),
labelMin
);
forAll
(
map
().
cellMap
(),
celli
)
{
if
(
isRefineCell
[
map
().
cellMap
()[
celli
]])
...
...
@@ -1712,6 +1725,18 @@ Foam::label Foam::snappyRefineDriver::directionalShellRefine
dirCellLevel
[
celli
][
dir
]
++
;
}
}
// Do something with the pointLevel. See discussion about the
// cellLevel. Do we keep min/max ?
forAll
(
map
().
pointMap
(),
pointi
)
{
label
oldPointi
=
map
().
pointMap
()[
pointi
];
if
(
map
().
reversePointMap
()[
oldPointi
]
!=
pointi
)
{
// Is added point (splitting an edge)
pointLevel
[
pointi
]
++
;
}
}
}
}
...
...
src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.H
View file @
695246ad
...
...
@@ -146,26 +146,6 @@ class snappyRefineDriver
// Directional refinement
//- Calculate direction of face (using geometry)
List
<
direction
>
faceDirection
()
const
;
//- Check if level across (directed) face obeys 2:1
label
faceConsistentRefinement
(
const
PackedBoolList
&
isDirFace
,
const
List
<
labelVector
>&
dirCellLevel
,
const
direction
dir
,
const
bool
maxSet
,
PackedBoolList
&
refineCell
)
const
;
//- Make sure 2:1 refinement in given direction
labelList
consistentDirectionalRefinement
(
const
direction
dir
,
const
List
<
labelVector
>&
dirCellLevel
,
const
labelUList
&
candidateCells
,
const
bool
maxSet
)
const
;
//- Refine (directional) all cells inside/outside shell
label
directionalShellRefine
(
...
...
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