Commit 515af748 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Fixed mpi tests.

parent 1908148a
...@@ -8,7 +8,7 @@ ellipt->dim: 2 ...@@ -8,7 +8,7 @@ ellipt->dim: 2
ellipt->components: 1 ellipt->components: 1
ellipt->polynomial degree[0]: 1 ellipt->polynomial degree[0]: 1
ellipt->solver: cg ellipt->solver: petsc
ellipt->solver->max iteration: 10 ellipt->solver->max iteration: 10
ellipt->solver->tolerance: 1.e-8 ellipt->solver->tolerance: 1.e-8
ellipt->solver->info: 10 ellipt->solver->info: 10
......
...@@ -8,11 +8,11 @@ ellipt->dim: 2 ...@@ -8,11 +8,11 @@ ellipt->dim: 2
ellipt->components: 1 ellipt->components: 1
ellipt->polynomial degree[0]: 1 ellipt->polynomial degree[0]: 1
ellipt->solver: cg ellipt->solver: petsc-feti
ellipt->solver->max iteration: 10 ellipt->solver->max iteration: 10
ellipt->solver->tolerance: 1.e-8 ellipt->solver->tolerance: 1.e-8
ellipt->solver->info: 10 ellipt->solver->info: 10
ellipt->solver->left precon: diag ellipt->solver->left precon: no
ellipt->solver->right precon: no ellipt->solver->right precon: no
ellipt->estimator[0]: 0 ellipt->estimator[0]: 0
...@@ -22,4 +22,4 @@ parallel->log main rank: 0 ...@@ -22,4 +22,4 @@ parallel->log main rank: 0
parallel->pre refine: 0 parallel->pre refine: 0
parallel->partitioner: checker parallel->partitioner: checker
parallel->multi level test: 0 parallel->multi level test: 0
parallel->solver: petsc-feti
...@@ -8,11 +8,11 @@ ellipt->dim: 2 ...@@ -8,11 +8,11 @@ ellipt->dim: 2
ellipt->components: 1 ellipt->components: 1
ellipt->polynomial degree[0]: 1 ellipt->polynomial degree[0]: 1
ellipt->solver: cg ellipt->solver: petsc-feti
ellipt->solver->max iteration: 10 ellipt->solver->max iteration: 10
ellipt->solver->tolerance: 1.e-8 ellipt->solver->tolerance: 1.e-8
ellipt->solver->info: 10 ellipt->solver->info: 10
ellipt->solver->left precon: diag ellipt->solver->left precon: no
ellipt->solver->right precon: no ellipt->solver->right precon: no
ellipt->estimator[0]: 0 ellipt->estimator[0]: 0
...@@ -23,4 +23,3 @@ parallel->pre refine: 0 ...@@ -23,4 +23,3 @@ parallel->pre refine: 0
parallel->partitioner: checker parallel->partitioner: checker
parallel->partitioner->mode: multilevel parallel->partitioner->mode: multilevel
parallel->multi level test: 1 parallel->multi level test: 1
parallel->solver: petsc-feti
...@@ -8,11 +8,11 @@ ellipt->dim: 2 ...@@ -8,11 +8,11 @@ ellipt->dim: 2
ellipt->components: 1 ellipt->components: 1
ellipt->polynomial degree[0]: 1 ellipt->polynomial degree[0]: 1
ellipt->solver: cg ellipt->solver: petsc-feti
ellipt->solver->max iteration: 10 ellipt->solver->max iteration: 10
ellipt->solver->tolerance: 1.e-8 ellipt->solver->tolerance: 1.e-8
ellipt->solver->info: 10 ellipt->solver->info: 10
ellipt->solver->left precon: diag ellipt->solver->left precon: no
ellipt->solver->right precon: no ellipt->solver->right precon: no
ellipt->estimator[0]: 0 ellipt->estimator[0]: 0
...@@ -23,4 +23,4 @@ parallel->pre refine: 0 ...@@ -23,4 +23,4 @@ parallel->pre refine: 0
parallel->partitioner: checker parallel->partitioner: checker
parallel->partitioner->mode: multilevel parallel->partitioner->mode: multilevel
parallel->multi level test: 1 parallel->multi level test: 1
parallel->solver: petsc-feti
...@@ -8,11 +8,11 @@ ellipt->dim: 2 ...@@ -8,11 +8,11 @@ ellipt->dim: 2
ellipt->components: 1 ellipt->components: 1
ellipt->polynomial degree[0]: 1 ellipt->polynomial degree[0]: 1
ellipt->solver: cg ellipt->solver: petsc-feti
ellipt->solver->max iteration: 10 ellipt->solver->max iteration: 10
ellipt->solver->tolerance: 1.e-8 ellipt->solver->tolerance: 1.e-8
ellipt->solver->info: 10 ellipt->solver->info: 10
ellipt->solver->left precon: diag ellipt->solver->left precon: no
ellipt->solver->right precon: no ellipt->solver->right precon: no
ellipt->estimator[0]: 0 ellipt->estimator[0]: 0
...@@ -23,4 +23,4 @@ parallel->pre refine: 0 ...@@ -23,4 +23,4 @@ parallel->pre refine: 0
parallel->partitioner: checker parallel->partitioner: checker
parallel->partitioner->mode: multilevel parallel->partitioner->mode: multilevel
parallel->multi level test: 1 parallel->multi level test: 1
parallel->solver: petsc-feti
...@@ -8,11 +8,11 @@ ellipt->dim: 2 ...@@ -8,11 +8,11 @@ ellipt->dim: 2
ellipt->components: 1 ellipt->components: 1
ellipt->polynomial degree[0]: 1 ellipt->polynomial degree[0]: 1
ellipt->solver: cg ellipt->solver: petsc-feti
ellipt->solver->max iteration: 10 ellipt->solver->max iteration: 10
ellipt->solver->tolerance: 1.e-8 ellipt->solver->tolerance: 1.e-8
ellipt->solver->info: 10 ellipt->solver->info: 10
ellipt->solver->left precon: diag ellipt->solver->left precon: no
ellipt->solver->right precon: no ellipt->solver->right precon: no
ellipt->estimator[0]: 0 ellipt->estimator[0]: 0
...@@ -23,4 +23,4 @@ parallel->pre refine: 0 ...@@ -23,4 +23,4 @@ parallel->pre refine: 0
parallel->partitioner: checker parallel->partitioner: checker
parallel->partitioner->mode: multilevel parallel->partitioner->mode: multilevel
parallel->multi level test: 1 parallel->multi level test: 1
parallel->solver: petsc-feti
...@@ -8,7 +8,7 @@ ellipt->dim: 2 ...@@ -8,7 +8,7 @@ ellipt->dim: 2
ellipt->components: 1 ellipt->components: 1
ellipt->polynomial degree[0]: 1 ellipt->polynomial degree[0]: 1
ellipt->solver: cg ellipt->solver: petsc
ellipt->solver->max iteration: 10 ellipt->solver->max iteration: 10
ellipt->solver->tolerance: 1.e-8 ellipt->solver->tolerance: 1.e-8
ellipt->solver->info: 10 ellipt->solver->info: 10
......
...@@ -22,7 +22,6 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_feti) ...@@ -22,7 +22,6 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_feti)
MeshDistributor *meshDist = MeshDistributor::globalMeshDistributor; MeshDistributor *meshDist = MeshDistributor::globalMeshDistributor;
meshDist->initParallelization(); meshDist->initParallelization();
ParallelDofMapping &dofMap = meshDist->getDofMap();
Mesh* mesh = ellipt.getMesh(); Mesh* mesh = ellipt.getMesh();
BOOST_REQUIRE(mesh->getNumberOfLeaves() == 8); BOOST_REQUIRE(mesh->getNumberOfLeaves() == 8);
...@@ -32,13 +31,13 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_feti) ...@@ -32,13 +31,13 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_feti)
feSpaces.push_back(ellipt.getFeSpace(0)); feSpaces.push_back(ellipt.getFeSpace(0));
PetscSolverFeti &feti = *(dynamic_cast<PetscSolverFeti*>(ellipt.getPetscSolver())); PetscSolverFeti &feti = *(dynamic_cast<PetscSolverFeti*>(ellipt.getPetscSolver()));
feti.setMeshDistributor(meshDist); feti.initialize();
feti.initialize(feSpaces);
feti.createFetiData(); feti.createFetiData();
BOOST_REQUIRE(feti.getNumberOfPrimals() == 21); BOOST_REQUIRE(feti.getNumberOfPrimals() == 21);
BOOST_REQUIRE(feti.getNumberOfDuals() == 48); BOOST_REQUIRE(feti.getNumberOfDuals() == 48);
ParallelDofMapping &dofMap = ellipt.getPetscSolver()->getDofMap();
Spreadsheet sheet; Spreadsheet sheet;
sheet.read("data/data0002a"); sheet.read("data/data0002a");
......
...@@ -32,8 +32,7 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_feti_multilevel) ...@@ -32,8 +32,7 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_feti_multilevel)
feSpaces.push_back(ellipt.getFeSpace(0)); feSpaces.push_back(ellipt.getFeSpace(0));
PetscSolverFeti &feti = *(dynamic_cast<PetscSolverFeti*>(ellipt.getPetscSolver())); PetscSolverFeti &feti = *(dynamic_cast<PetscSolverFeti*>(ellipt.getPetscSolver()));
feti.setMeshDistributor(meshDist); feti.initialize();
feti.initialize(feSpaces);
feti.createFetiData(); feti.createFetiData();
if (feti.getNumberOfPrimals() != 5) { if (feti.getNumberOfPrimals() != 5) {
...@@ -48,8 +47,10 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_feti_multilevel) ...@@ -48,8 +47,10 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_feti_multilevel)
BOOST_ERROR("Number of lagrange constraints is " + lexical_cast<string>(feti.getNumberOfLagrange()) + " and not 24!\n"); BOOST_ERROR("Number of lagrange constraints is " + lexical_cast<string>(feti.getNumberOfLagrange()) + " and not 24!\n");
} }
if (meshDist->getDofMapSd().getOverallDofs() != 25) { ParallelDofMapping &dofMapSd = ellipt.getPetscSolver()->getDofMapSd();
BOOST_ERROR("Number of subdomain DOFs is " + lexical_cast<string>(meshDist->getDofMapSd().getOverallDofs()) + " and not 25!\n");
if (dofMapSd.getOverallDofs() != 25) {
BOOST_ERROR("Number of subdomain DOFs is " + lexical_cast<string>(dofMapSd.getOverallDofs()) + " and not 25!\n");
} }
DofComm& commSd = meshDist->getDofCommSd(); DofComm& commSd = meshDist->getDofCommSd();
......
...@@ -37,8 +37,8 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_feti_multilevel) ...@@ -37,8 +37,8 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_feti_multilevel)
DofComm::LevelDataType &sendDofs = meshDist->getDofComm().getSendDofs(); DofComm::LevelDataType &sendDofs = meshDist->getDofComm().getSendDofs();
DofComm::LevelDataType &recvDofs = meshDist->getDofComm().getRecvDofs(); DofComm::LevelDataType &recvDofs = meshDist->getDofComm().getRecvDofs();
ParallelDofMapping dofMap; ParallelDofMapping dofMap(COMPONENT_WISE);
dofMap.init(levelData, feSpaces, feSpaces, true, true); dofMap.init(levelData, feSpaces, feSpaces);
dofMap.setDofComm(meshDist->getDofComm()); dofMap.setDofComm(meshDist->getDofComm());
dofMap.clear(); dofMap.clear();
......
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