Commit 042e5dfb authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Added simple tests for FETI-DP.

parent 11b3b152
......@@ -16,17 +16,10 @@ ellipt->solver->left precon: diag
ellipt->solver->right precon: no
ellipt->estimator[0]: 0
ellipt->estimator[0]->error norm: 1 % 1: H1_NORM, 2: L2_NORM
ellipt->estimator[0]->C0: 0.1 % constant of element residual
ellipt->estimator[0]->C1: 0.1 % constant of jump residual
ellipt->marker[0]->strategy: 0 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
ellipt->output->filename: output/ellipt.2d
ellipt->output->ParaView format: 1
ellipt->marker[0]->strategy: 0
parallel->log main rank: 0
parallel->pre refine: 0
parallel->partitioner: checker
parallel->multi level test: 1
parallel->multi level test: 0
parallel->solver: petsc-feti
dimension of world: 2
elliptMesh->macro file name: ./macro/macro.stand.p16.2d
elliptMesh->global refinements: 2
ellipt->mesh: elliptMesh
ellipt->dim: 2
ellipt->components: 1
ellipt->polynomial degree[0]: 1
ellipt->solver: cg
ellipt->solver->max iteration: 10
ellipt->solver->tolerance: 1.e-8
ellipt->solver->info: 10
ellipt->solver->left precon: diag
ellipt->solver->right precon: no
ellipt->estimator[0]: 0
ellipt->marker[0]->strategy: 0
parallel->log main rank: 0
parallel->pre refine: 0
parallel->partitioner: checker
parallel->multi level test: 1
parallel->solver: petsc-feti
......@@ -12,7 +12,7 @@ using namespace std;
-
*/
BOOST_AUTO_TEST_CASE(amdis_mpi_simple_partitioning)
BOOST_AUTO_TEST_CASE(amdis_mpi_feti)
{
BOOST_REQUIRE(MPI::COMM_WORLD.Get_size() == 16);
......@@ -24,7 +24,7 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_simple_partitioning)
Mesh* mesh = ellipt.getMesh();
BOOST_REQUIRE(mesh->getNumberOfLeaves() == 8);
BOOST_REQUIRE(meshDist->getMeshLevelData().getLevelNumber() == 2);
BOOST_REQUIRE(meshDist->getMeshLevelData().getLevelNumber() == 1);
vector<const FiniteElemSpace*> feSpaces;
feSpaces.push_back(ellipt.getFeSpace(0));
......
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE 0002
#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();
Mesh* mesh = ellipt.getMesh();
BOOST_REQUIRE(mesh->getNumberOfLeaves() == 8);
BOOST_REQUIRE(meshDist->getMeshLevelData().getLevelNumber() == 2);
vector<const FiniteElemSpace*> feSpaces;
feSpaces.push_back(ellipt.getFeSpace(0));
PetscSolverFeti &feti = *(dynamic_cast<PetscSolverFeti*>(ellipt.getPetscSolver()));
feti.setMeshDistributor(meshDist);
feti.initialize(feSpaces);
feti.createFetiData();
BOOST_REQUIRE(feti.getNumberOfPrimals() == 9);
BOOST_REQUIRE(feti.getNumberOfDuals() == 16);
}
int main(int argc, char **argv)
{
AMDiS::init(argc, argv, "./init/test0003.dat.2d");
boost::unit_test::unit_test_main(&init_unit_test, 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