Commit 4c8ae77a authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Added first test for parallel code, does not work yet.

parent b3a0773a
#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();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment