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
a8590fb7
Commit
a8590fb7
authored
Jan 27, 2022
by
daniele.corallo
Browse files
Merge branch 'fixcgcom' into 'feature'
Fixcgcom See merge request mpp/mpp!402
parents
75d612c8
6535fae6
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/lib2_mesh/distribution/Distribution.cpp
View file @
a8590fb7
#include "Distribution.hpp"
#include "Parallel.hpp"
#include <algorithm>
#include <list>
#include <map>
#include <functional>
void
Distribution
::
DistributeMesh
(
Mesh
&
mesh
)
{
mout
.
StartBlock
(
"Distribute"
);
int
startDist
=
(
int
)
distributedCells
.
size
();
...
...
src/lib2_mesh/mesh/CoarseGeometry.cpp
View file @
a8590fb7
...
...
@@ -136,7 +136,7 @@ void CoarseGeometry::CommunicateGeometry() {
ExchangeBuffer
exBuffer
;
if
(
PPM
->
Master
())
{
for
(
int
q
=
1
;
q
<
PPM
->
Size
();
++
q
)
{
exBuffer
.
Send
(
q
)
<<
int
(
timeSteps
.
size
()
)
;
exBuffer
.
Send
(
q
)
<<
timeSteps
.
size
();
for
(
double
timeStep
:
timeSteps
)
{
exBuffer
.
Send
(
q
)
<<
double
(
timeStep
);
}
...
...
@@ -144,12 +144,11 @@ void CoarseGeometry::CommunicateGeometry() {
}
exBuffer
.
Communicate
();
if
(
!
PPM
->
Master
())
{
in
t
m
;
size_
t
m
;
exBuffer
.
Receive
(
0
)
>>
m
;
timeSteps
.
resize
(
m
);
for
(
int
i
=
0
;
i
<
m
;
i
++
)
{
exBuffer
.
Receive
(
0
)
>>
timeSteps
[
i
];
}
}
exBuffer
.
ClearBuffers
();
...
...
src/lib2_mesh/mesh/Meshes.cpp
View file @
a8590fb7
...
...
@@ -132,22 +132,28 @@ void Meshes::Init() {
meshes
.
at
({
i
+
1
,
j
+
1
})
->
Finish
();
}
}
mout
.
StartBlock
(
"DistMesh"
);
dist
->
DistributeMesh
(
*
meshes
.
at
({
plevel
,
plevel
}));
mout
.
EndBlock
(
verbose
<
100
);
mout
.
StartBlock
(
"Overlap"
);
olap
->
CellsOverlap_dG2
(
*
meshes
.
at
({
plevel
,
plevel
}));
mout
.
EndBlock
(
verbose
<
100
);
mout
.
StartBlock
(
"RefineTime"
);
for
(
int
tLevel
=
plevel
;
tLevel
<
fineLevel
;
++
tLevel
)
{
meshes
[{
plevel
,
tLevel
+
1
}]
=
meshes
.
at
({
plevel
,
tLevel
})
->
RefineSTMeshInTime
();
olap
->
CellsOverlap_dG2
(
*
meshes
.
at
({
plevel
,
tLevel
+
1
}));
}
mout
.
EndBlock
(
verbose
<
100
);
mout
.
StartBlock
(
"RefineSpace"
);
for
(
int
sLevel
=
plevel
;
sLevel
<
fineLevel
;
++
sLevel
)
{
for
(
int
tLevel
=
plevel
;
tLevel
<
fineLevel
+
1
;
++
tLevel
)
{
mout
.
StartBlock
(
"RefineSpace"
+
LevelPair
{
sLevel
,
tLevel
}.
str
());
meshes
[{
sLevel
+
1
,
tLevel
}]
=
meshes
.
at
({
sLevel
,
tLevel
})
->
RefineSTMeshInSpace
();
olap
->
CellsOverlap_dG2
(
*
meshes
.
at
({
sLevel
+
1
,
tLevel
}));
mout
.
EndBlock
(
verbose
<
100
);
}
}
mout
.
EndBlock
(
verbose
<
100
);
// for (int i = plevel; i <= fineLevel; ++i)
// olap->OverlapMesh(*meshes[i]);
...
...
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