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
Community
integration-cfmesh
Commits
d4448723
Commit
d4448723
authored
May 26, 2015
by
Franjo
Browse files
Merge branch 'defect-refinementThickness' into developmentPublicRepo
parents
ed4af781
7c8edcc2
Changes
2
Hide whitespace changes
Inline
Side-by-side
meshLibrary/utilities/octrees/meshOctree/meshOctreeModifier/meshOctreeModifierLoadDistribution.C
View file @
d4448723
...
...
@@ -205,12 +205,37 @@ void meshOctreeModifier::loadDistribution(const direction usedType)
if
(
sendToProcesssors
[
procI
][
neiI
]
==
Pstream
::
myProcNo
()
)
receiveFrom
.
insert
(
procI
);
//- send the coordinates of the boxes to other processors
//- receive coordinates from processors with lower labels
LongList
<
meshOctreeCubeBasic
>
migratedCubes
;
forAllConstIter
(
labelHashSet
,
receiveFrom
,
iter
)
{
if
(
iter
.
key
()
>=
Pstream
::
myProcNo
()
)
continue
;
List
<
meshOctreeCubeBasic
>
mc
;
IPstream
fromOtherProc
(
Pstream
::
blocking
,
iter
.
key
());
fromOtherProc
>>
mc
;
label
currSize
=
migratedCubes
.
size
();
migratedCubes
.
setSize
(
currSize
+
mc
.
size
());
forAll
(
mc
,
mcI
)
{
migratedCubes
[
currSize
]
=
mc
[
mcI
];
++
currSize
;
}
}
//- send the coordinates of the boxes to processors with greater label
const
labelList
&
sendToProcs
=
sendToProcesssors
[
Pstream
::
myProcNo
()];
forAll
(
sendToProcs
,
i
)
{
const
label
procI
=
sendToProcs
[
i
];
if
(
procI
<=
Pstream
::
myProcNo
()
)
continue
;
List
<
meshOctreeCubeBasic
>
sendCoordinates
(
leavesToSend
[
procI
].
size
()
...
...
@@ -237,10 +262,12 @@ void meshOctreeModifier::loadDistribution(const direction usedType)
toOtherProc
<<
sendCoordinates
;
}
//- receive data sent from other processors
LongList
<
meshOctreeCubeBasic
>
migratedCubes
;
//- receive data sent from processors with greater label
forAllConstIter
(
labelHashSet
,
receiveFrom
,
iter
)
{
if
(
iter
.
key
()
<=
Pstream
::
myProcNo
()
)
continue
;
List
<
meshOctreeCubeBasic
>
mc
;
IPstream
fromOtherProc
(
Pstream
::
blocking
,
iter
.
key
());
...
...
@@ -256,6 +283,40 @@ void meshOctreeModifier::loadDistribution(const direction usedType)
}
}
//- send the coordinates of the boxes to processors with lower label
forAll
(
sendToProcs
,
i
)
{
const
label
procI
=
sendToProcs
[
i
];
if
(
procI
>=
Pstream
::
myProcNo
()
)
continue
;
List
<
meshOctreeCubeBasic
>
sendCoordinates
(
leavesToSend
[
procI
].
size
()
);
forAll
(
leavesToSend
[
procI
],
lI
)
{
const
meshOctreeCube
&
oc
=
*
leaves
[
leavesToSend
[
procI
][
lI
]];
sendCoordinates
[
lI
]
=
meshOctreeCubeBasic
(
oc
.
coordinates
(),
oc
.
cubeType
()
);
}
OPstream
toOtherProc
(
Pstream
::
blocking
,
procI
,
sendCoordinates
.
byteSize
()
);
toOtherProc
<<
sendCoordinates
;
}
# ifdef OCTREETiming
returnReduce
(
1
,
sumOp
<
label
>
());
const
scalar
t4
=
omp_get_wtime
();
...
...
meshLibrary/utilities/octrees/meshOctree/meshOctreeModifier/meshOctreeModifierRefineSelectedBoxes.C
View file @
d4448723
...
...
@@ -594,6 +594,9 @@ void meshOctreeModifier::refineSelectedBoxesAndAdditionalLayers
}
# endif
//- find the maximum number of layers
reduce
(
maxNLayers
,
maxOp
<
label
>
());
for
(
label
layerI
=
0
;
layerI
<=
maxNLayers
;
++
layerI
)
{
mapKey
key
(
levelI
,
layerI
);
...
...
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