Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Backofen, Rainer
amdis
Commits
bf567029
"dune/gfe/rodassembler.cc" did not exist on "3f4037c885f3f1d2c130ffe95206fa096218c529"
Commit
bf567029
authored
13 years ago
by
Thomas Witkowski
Browse files
Options
Downloads
Patches
Plain Diff
One more MPI test.
parent
37e0d38c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/mpi/src/test0004.cc
+79
-0
79 additions, 0 deletions
test/mpi/src/test0004.cc
with
79 additions
and
0 deletions
test/mpi/src/test0004.cc
0 → 100644
+
79
−
0
View file @
bf567029
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE 0004
#define BOOST_TEST_NO_MAIN
#include
<boost/test/unit_test.hpp>
#include
<AMDiS.h>
using
namespace
AMDiS
;
using
namespace
std
;
/*
-
*/
BOOST_AUTO_TEST_CASE
(
amdis_mpi_feti_multilevel
)
{
BOOST_REQUIRE
(
MPI
::
COMM_WORLD
.
Get_size
()
==
16
);
ProblemStat
ellipt
(
"ellipt"
);
ellipt
.
initialize
(
INIT_ALL
);
MeshDistributor
*
meshDist
=
MeshDistributor
::
globalMeshDistributor
;
meshDist
->
initParallelization
();
const
FiniteElemSpace
*
feSpace
=
ellipt
.
getFeSpace
();
vector
<
const
FiniteElemSpace
*>
feSpaces
;
feSpaces
.
push_back
(
feSpace
);
Mesh
*
mesh
=
ellipt
.
getMesh
();
mesh
->
dofCompress
();
BOOST_REQUIRE
(
mesh
->
getNumberOfLeaves
()
==
4
);
BOOST_REQUIRE
(
meshDist
->
getMeshLevelData
().
getLevelNumber
()
==
2
);
BOOST_REQUIRE
(
feSpace
->
getAdmin
()
->
getUsedSize
()
==
5
);
MeshLevelData
&
levelData
=
meshDist
->
getMeshLevelData
();
DofComm
::
LevelDataType
&
sendDofs
=
meshDist
->
getDofComm
().
getSendDofs
();
DofComm
::
LevelDataType
&
recvDofs
=
meshDist
->
getDofComm
().
getRecvDofs
();
ParallelDofMapping
dofMap
;
dofMap
.
init
(
levelData
,
feSpaces
,
feSpaces
,
true
,
true
);
dofMap
.
setDofComm
(
meshDist
->
getDofComm
());
dofMap
.
clear
();
Spreadsheet
sheet
;
sheet
.
read
(
"data/data0004a"
);
vector
<
vector
<
double
>
>
&
data
=
sheet
.
getData
();
for
(
unsigned
int
i
=
0
;
i
<
data
.
size
();
i
++
)
{
if
(
data
[
i
][
0
]
!=
MPI
::
COMM_WORLD
.
Get_rank
())
continue
;
int
level
=
data
[
i
][
1
];
int
nSendDofs
=
data
[
i
][
2
];
int
nRecvDofs
=
data
[
i
][
3
];
int
compareSendDofs
=
meshDist
->
getDofComm
().
getNumberDofs
(
sendDofs
,
level
,
feSpace
);
int
compareRecvDofs
=
meshDist
->
getDofComm
().
getNumberDofs
(
recvDofs
,
level
,
feSpace
);
TEST_EXIT
(
nSendDofs
==
compareSendDofs
)
(
"Wrong number of SEND DOFs in level %d: %d %d
\n
"
,
level
,
nSendDofs
,
compareSendDofs
);
TEST_EXIT
(
nRecvDofs
==
compareRecvDofs
)
(
"Wrong number of RECV DOFs in level %d: %d %d
\n
"
,
level
,
nRecvDofs
,
compareRecvDofs
);
}
}
int
main
(
int
argc
,
char
**
argv
)
{
AMDiS
::
init
(
argc
,
argv
,
"./init/test0004.dat.2d"
);
boost
::
unit_test
::
unit_test_main
(
&
init_unit_test
,
argc
,
argv
);
AMDiS
::
finalize
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment