Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mpp
Mpp
Commits
216ea917
Commit
216ea917
authored
Jan 20, 2022
by
daniele.corallo
Browse files
[403-add-stdist-warnings] rmv if for stDist, fixed communication of Timesteps
parent
6a356742
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib2_mesh/distribution/Distribution.cpp
View file @
216ea917
...
...
@@ -1046,17 +1046,17 @@ void Distribution::DistributeSTMesh(Mesh &mesh) {
int
L0
=
rekDepth
;
for
(
int
i
=
0
;
i
<
rekDepth
;
++
i
)
{
if
(
L0
==
0
)
break
;
if
(
tL
<
Slice_Maximum
&&
Slice_Maximum
>
0
)
{
if
(
tL
<
Slice_Maximum
)
{
++
tL
;
--
L0
;
}
if
(
L0
==
0
)
break
;
if
(
xL
<
X_Maximum
&&
X_Maximum
>
0
)
{
if
(
xL
<
X_Maximum
)
{
++
xL
;
--
L0
;
}
if
(
L0
==
0
)
break
;
if
(
yL
<
Y_Maximum
&&
Y_Maximum
>
0
)
{
if
(
yL
<
Y_Maximum
)
{
++
yL
;
--
L0
;
}
...
...
src/lib2_mesh/mesh/CoarseGeometry.cpp
View file @
216ea917
...
...
@@ -77,7 +77,7 @@ std::vector<double> CoarseGeometry::refineTimeSteps(const std::vector<double> &t
double
dt
=
init_timesteps
[
S
-
1
][
k
+
2
]
-
init_timesteps
[
S
-
1
][
k
+
1
];
for
(
unsigned
int
l
=
1
;
l
<
SF_inv
;
++
l
)
init_timesteps
[
S
][
k
*
SF_inv
+
l
+
1
]
=
init_timesteps
[
S
-
1
][
k
+
1
]
+
dt
*
1
/
double
(
SF_inv
)
*
l
;
init_timesteps
[
S
-
1
][
k
+
1
]
+
dt
*
1
/
double
(
SF_inv
)
*
l
;
}
}
return
init_timesteps
[
refineTimeStepCount
];
...
...
@@ -136,7 +136,7 @@ void CoarseGeometry::CommunicateGeometry() {
ExchangeBuffer
exBuffer
;
if
(
PPM
->
Master
())
{
for
(
int
q
=
1
;
q
<
PPM
->
Size
();
++
q
)
{
exBuffer
.
Send
(
q
)
<<
timeSteps
.
size
();
exBuffer
.
Send
(
q
)
<<
int
(
timeSteps
.
size
()
)
;
for
(
double
timeStep
:
timeSteps
)
{
exBuffer
.
Send
(
q
)
<<
double
(
timeStep
);
}
...
...
@@ -147,8 +147,9 @@ void CoarseGeometry::CommunicateGeometry() {
int
m
;
exBuffer
.
Receive
(
0
)
>>
m
;
timeSteps
.
resize
(
m
);
for
(
double
&
timeStep
:
timeSteps
)
{
exBuffer
.
Receive
(
0
)
>>
timeStep
;
for
(
int
i
=
0
;
i
<
m
;
i
++
)
{
exBuffer
.
Receive
(
0
)
>>
timeSteps
[
i
];
}
}
exBuffer
.
ClearBuffers
();
...
...
@@ -157,7 +158,7 @@ void CoarseGeometry::CommunicateGeometry() {
CoarseGeometry
::
CoarseGeometry
(
const
MeshPoints
&
points
,
const
MeshCells
&
cells
,
const
MeshFaces
&
faces
,
const
TimeSteps
&
timeSteps
)
:
timeSteps
(
timeSteps
)
{
timeSteps
(
timeSteps
)
{
for
(
const
auto
&
point
:
points
)
{
double
z
[]{
0.0
,
0.0
,
0.0
,
0.0
};
for
(
int
j
=
0
;
j
<
min
(
3
,
int
(
point
.
size
()));
++
j
)
...
...
@@ -175,8 +176,8 @@ void CoarseGeometry::Scale(double scalingFactor) {
Logging
&
operator
<<
(
Logging
&
s
,
const
CoarseGeometry
&
M
)
{
return
s
<<
"POINTS: "
<<
M
.
coordinates
.
size
()
<<
endl
<<
M
.
coordinates
<<
"CELLS: "
<<
M
.
cellIds
.
size
()
<<
endl
<<
M
.
cellIds
<<
"FACES: "
<<
M
.
faceIds
.
size
()
<<
endl
<<
M
.
faceIds
<<
"CELLS: "
<<
M
.
cellIds
.
size
()
<<
endl
<<
M
.
cellIds
<<
"FACES: "
<<
M
.
faceIds
.
size
()
<<
endl
<<
M
.
faceIds
#ifdef USE_DATAMESH
<<
"VDATA: "
<<
M
.
vdataList
.
size
()
<<
endl
<<
M
.
vdataList
<<
"CDATA: "
<<
M
.
cdataList
.
size
()
<<
endl
<<
M
.
cdataList
...
...
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