Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
INMOST
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Terekhov
INMOST
Commits
c66c5968
Commit
c66c5968
authored
Jan 07, 2015
by
Kirill Terekhov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/INM-RAS/INMOST
parents
82e85bc2
bf1916a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
20 deletions
+22
-20
examples/FVDiscr/main.cpp
examples/FVDiscr/main.cpp
+20
-18
solver.cpp
solver.cpp
+2
-2
No files found.
examples/FVDiscr/main.cpp
View file @
c66c5968
...
...
@@ -88,21 +88,23 @@ int main(int argc,char ** argv)
//~ if( m->GetProcessorRank() == 0 ) std::cout << "Load(MPI_Scatter): " << Timer()-ttt2 << std::endl;
#if defined(USE_PARTITIONER)
ttt
=
Timer
();
Partitioner
*
p
=
new
Partitioner
(
m
);
p
->
SetMethod
(
Partitioner
::
Inner_RCM
,
Partitioner
::
Partition
);
// Specify the partitioner
p
->
Evaluate
();
// Compute the partitioner and store new processor ID in the mesh
delete
p
;
BARRIER
if
(
m
->
GetProcessorRank
()
==
0
)
std
::
cout
<<
"Evaluate: "
<<
Timer
()
-
ttt
<<
std
::
endl
;
ttt
=
Timer
();
m
->
Redistribute
();
// Redistribute the mesh data
m
->
ReorderEmpty
(
CELL
|
FACE
|
EDGE
|
NODE
);
// Clean the data after reordring
BARRIER
if
(
m
->
GetProcessorRank
()
==
0
)
std
::
cout
<<
"Redistribute: "
<<
Timer
()
-
ttt
<<
std
::
endl
;
if
(
!
repartition
)
{
// currently only non-distributed meshes are supported by Inner_RCM partitioner
ttt
=
Timer
();
Partitioner
*
p
=
new
Partitioner
(
m
);
p
->
SetMethod
(
Partitioner
::
Inner_RCM
,
Partitioner
::
Partition
);
// Specify the partitioner
p
->
Evaluate
();
// Compute the partitioner and store new processor ID in the mesh
delete
p
;
BARRIER
if
(
m
->
GetProcessorRank
()
==
0
)
std
::
cout
<<
"Evaluate: "
<<
Timer
()
-
ttt
<<
std
::
endl
;
ttt
=
Timer
();
m
->
Redistribute
();
// Redistribute the mesh data
m
->
ReorderEmpty
(
CELL
|
FACE
|
EDGE
|
NODE
);
// Clean the data after reordring
BARRIER
if
(
m
->
GetProcessorRank
()
==
0
)
std
::
cout
<<
"Redistribute: "
<<
Timer
()
-
ttt
<<
std
::
endl
;
}
#endif
ttt
=
Timer
();
...
...
@@ -128,13 +130,13 @@ int main(int argc,char ** argv)
Solver
::
Matrix
A
;
// Declare the matrix of the linear system to be solved
Solver
::
Vector
x
,
b
;
// Declare the solution and the right-hand side vectors
tiny_map
<
GeometricData
,
ElementType
,
5
>
table
;
Mesh
::
GeomParam
table
;
table
[
MEASURE
]
=
CELL
|
FACE
;
table
[
CENTROID
]
=
CELL
|
FACE
;
table
[
BARYCENTER
]
=
CELL
|
FACE
;
table
[
NORMAL
]
=
FACE
;
table
[
ORIENTATION
]
=
FACE
;
table
[
MEASURE
]
=
CELL
|
FACE
;
table
[
BARYCENTER
]
=
CELL
|
FACE
;
m
->
PrepareGeometricData
(
table
);
//~ BARRIER
//~ if( m->GetProcessorRank() == 0 ) std::cout << "Prepare geometric data: " << Timer()-ttt << std::endl;
...
...
solver.cpp
View file @
c66c5968
...
...
@@ -998,7 +998,7 @@ namespace INMOST
recvdata
.
resize
(
totsize
);
}
else
recvdata
.
resize
(
1
);
//protect from dereferencing null
MPI_Gatherv
(
&
senddata
[
0
],
sendsize
,
MPI_CHAR
,
&
recvdata
[
0
],
&
recvsize
[
0
],
&
displ
[
0
],
MPI_
INT
,
0
,
GetCommunicator
());
MPI_Gatherv
(
&
senddata
[
0
],
sendsize
,
MPI_CHAR
,
&
recvdata
[
0
],
&
recvsize
[
0
],
&
displ
[
0
],
MPI_
CHAR
,
0
,
GetCommunicator
());
if
(
rank
==
0
)
{
std
::
fstream
output
(
file
.
c_str
(),
std
::
ios
::
out
);
...
...
@@ -1083,7 +1083,7 @@ namespace INMOST
recvdata
.
resize
(
totsize
);
}
else
recvdata
.
resize
(
1
);
//protect from dereferencing null
MPI_Gatherv
(
&
senddata
[
0
],
sendsize
,
MPI_CHAR
,
&
recvdata
[
0
],
&
recvsize
[
0
],
&
displ
[
0
],
MPI_
INT
,
0
,
GetCommunicator
());
MPI_Gatherv
(
&
senddata
[
0
],
sendsize
,
MPI_CHAR
,
&
recvdata
[
0
],
&
recvsize
[
0
],
&
displ
[
0
],
MPI_
CHAR
,
0
,
GetCommunicator
());
if
(
rank
==
0
)
{
std
::
fstream
output
(
file
.
c_str
(),
std
::
ios
::
out
);
...
...
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