Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Aland, Sebastian
amdis
Commits
4c8ae77a
Commit
4c8ae77a
authored
Apr 11, 2012
by
Thomas Witkowski
Browse files
Added first test for parallel code, does not work yet.
parent
b3a0773a
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/mpi/src/test0001.cc
0 → 100644
View file @
4c8ae77a
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE 0001
#include <boost/test/unit_test.hpp>
#include <AMDiS.h>
using
namespace
AMDiS
;
using
namespace
boost
::
unit_test
;
void
test_a
()
{
FUNCNAME
(
"main"
);
AMDiS
::
init
(
"./init/test0001.dat.2d"
);
// ===== create and init the scalar problem =====
ProblemStat
ellipt
(
"ellipt"
);
ellipt
.
initialize
(
INIT_ALL
);
// === create adapt info ===
AdaptInfo
adaptInfo
(
"ellipt->adapt"
,
ellipt
.
getNumComponents
());
BOOST_REQUIRE
(
ellipt
.
getNumComponents
()
==
1
);
// === create adapt ===
AdaptStationary
adapt
(
"ellipt->adapt"
,
ellipt
,
adaptInfo
);
// ===== create matrix operator =====
Operator
matrixOperator
(
ellipt
.
getFeSpace
());
matrixOperator
.
addTerm
(
new
Simple_SOT
);
ellipt
.
addMatrixOperator
(
matrixOperator
,
0
,
0
);
// ===== create rhs operator =====
Operator
rhsOperator
(
ellipt
.
getFeSpace
());
rhsOperator
.
addTerm
(
new
Simple_ZOT
);
ellipt
.
addVectorOperator
(
rhsOperator
,
0
);
// ===== start adaption loop =====
adapt
.
adapt
();
BOOST_REQUIRE
(
ellipt
.
getFeSpace
()
->
getAdmin
()
->
getUsedSize
()
==
81
);
AMDiS
::
finalize
();
}
test_suite
*
init_unit_test_suite
(
int
argc
,
char
**
argv
)
{
AMDiS
::
init
(
argc
,
argv
);
AMDiS
::
finalize
();
}
Write
Preview
Supports
Markdown
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