Commit e8983bcb authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Work on FETI-DP, Initfile parses changes due to exception throw problem when debugging.

parent f582eb49
...@@ -47,7 +47,7 @@ namespace AMDiS { ...@@ -47,7 +47,7 @@ namespace AMDiS {
if (string(argv[0]) != "ddt") if (string(argv[0]) != "ddt")
Parameters::init(string(argv[1])); Parameters::init(string(argv[1]));
else else
Parameters::init(string(argv[2])); Parameters::init(string(argv[1]));
Parameters::readArgv(argc, argv); Parameters::readArgv(argc, argv);
} }
......
...@@ -149,7 +149,8 @@ namespace AMDiS { ...@@ -149,7 +149,8 @@ namespace AMDiS {
posVarBegin = posVar; posVarBegin = posVar;
} }
std::string varName = inputSwap.substr(posVarBegin + 1 , posVarEnd - posVarBegin - 1); std::string varName = inputSwap.substr(posVarBegin + 1 , posVarEnd - posVarBegin - 1);
std::string varParam = checkedGet(varName); std::string varParam = "";
int error_code = checkedGet(varName, varParam);
// if varname is found in parameter list then replace variable by value // if varname is found in parameter list then replace variable by value
// otherwise throw tagNotFound exception // otherwise throw tagNotFound exception
std::string replaceName = inputSwap.substr(posVar , posVarEnd - posVar + (posVarBegin - posVar)); std::string replaceName = inputSwap.substr(posVar , posVarEnd - posVar + (posVarBegin - posVar));
......
...@@ -58,6 +58,12 @@ namespace AMDiS { ...@@ -58,6 +58,12 @@ namespace AMDiS {
{} {}
}; };
struct GetTagError : std::runtime_error {
GetTagError(std::string m)
: std::runtime_error(m)
{}
};
template<typename T> template<typename T>
struct WrongValueFormat : std::runtime_error { struct WrongValueFormat : std::runtime_error {
static std::string name(int) static std::string name(int)
...@@ -384,6 +390,8 @@ namespace AMDiS { ...@@ -384,6 +390,8 @@ namespace AMDiS {
{ {
typedef std::map< std::string, std::string > super; typedef std::map< std::string, std::string > super;
static const int TAG_NOT_FOUND = 1;
static const int TAG_NOT_FOUND_BREAK = 2;
/// Exceptions /// Exceptions
struct TagNotFound : std::invalid_argument { struct TagNotFound : std::invalid_argument {
...@@ -409,8 +417,9 @@ namespace AMDiS { ...@@ -409,8 +417,9 @@ namespace AMDiS {
static void init(int print, string filename, const char *flags = NULL) static void init(int print, string filename, const char *flags = NULL)
{ {
ERROR_EXIT("Parameters::init(int,std::string,const char*) is depreciated. " WARNING("Parameters::init(int,std::string,const char*) is depreciated. "
"Use Parameters::init(std::string) instead!\n"); "Use Parameters::init(std::string) instead!\n");
init(filename);
} }
...@@ -430,17 +439,19 @@ namespace AMDiS { ...@@ -430,17 +439,19 @@ namespace AMDiS {
if (debugInfo == -1) if (debugInfo == -1)
debugInfo = singlett->getMsgInfo(); debugInfo = singlett->getMsgInfo();
try { std::string valStr;
std::string valStr(singlett->checkedGet(tag)); int error_code = singlett->checkedGet(tag, valStr);
valStr = trim(valStr); if (error_code == 0) {
convert(valStr, value); valStr = trim(valStr);
if (debugInfo == 2) { convert(valStr, value);
std::cout << "Parameter '" << tag << "'" } else if(error_code == TAG_NOT_FOUND_BREAK)
<< " initialized with: " << value << std::endl; throw TagNotFoundBreak("required tag '" + tag + "' not found");
} else if (error_code == TAG_NOT_FOUND && debugInfo == 2)
} catch (TagNotFound ia) { std::cout << "there is no tag '" + tag + "'" << std::endl;
if (debugInfo >= 1)
std::cout << ia.what() << std::endl; if (debugInfo == 2) {
std::cout << "Parameter '" << tag << "'"
<< " initialized with: " << value << std::endl;
} }
} }
...@@ -449,16 +460,19 @@ namespace AMDiS { ...@@ -449,16 +460,19 @@ namespace AMDiS {
static InitEntry get(const std::string tag) static InitEntry get(const std::string tag)
{ {
using namespace InitfileInternal; using namespace InitfileInternal;
int debugInfo = singlett->getMsgInfo(); singlett->getMsgInfo();
InitEntry result; InitEntry result;
try {
std::string valStr(singlett->checkedGet(tag)); std::string valStr;
valStr = trim(valStr); int error_code = singlett->checkedGet(tag, valStr);
result = InitEntry(valStr); if (error_code == 0) {
} catch (TagNotFound ia) { valStr = trim(valStr);
if (debugInfo >= 1) result = InitEntry(valStr);
std::cout << ia.what() << std::endl; } else if(error_code == TAG_NOT_FOUND_BREAK)
} throw TagNotFoundBreak("required tag '" + tag + "' not found");
else if (error_code == TAG_NOT_FOUND)
throw TagNotFound("there is no tag '" + tag + "'"); // exception must be thrown, because an empty object would be return otherwise
return result; return result;
} }
...@@ -568,16 +582,18 @@ protected: ...@@ -568,16 +582,18 @@ protected:
/// return the value of the given tag or throws an exception if the tag /// return the value of the given tag or throws an exception if the tag
/// does not exist /// does not exist
std::string checkedGet(const std::string& tag) const int checkedGet(const std::string& tag, std::string &valStr) const
{ {
super::const_iterator it = find(tag); super::const_iterator it = find(tag);
if (it == end()) { if (it == end()) {
if (breakOnMissingTag == 0 || msgInfo <= 2) if (breakOnMissingTag == 0 || msgInfo <= 2)
throw TagNotFound("there is no tag '" + tag + "'"); return TAG_NOT_FOUND;
else else
throw TagNotFoundBreak("required tag '" + tag + "' not found"); return TAG_NOT_FOUND_BREAK;
} }
return it->second; valStr = it->second;
return 0;
} }
/// replace variables by its value defined as parameter previousely /// replace variables by its value defined as parameter previousely
......
...@@ -168,6 +168,8 @@ namespace AMDiS { ...@@ -168,6 +168,8 @@ namespace AMDiS {
macroElIndexTypeMap[(*it)->getIndex()] = (*it)->getElType(); macroElIndexTypeMap[(*it)->getIndex()] = (*it)->getElType();
} }
createBoundaryDofs();
#if (DEBUG != 0) #if (DEBUG != 0)
ParallelDebug::writeDebugFile(*this, debugOutputDir + "mpi-dbg", "dat"); ParallelDebug::writeDebugFile(*this, debugOutputDir + "mpi-dbg", "dat");
#endif #endif
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "parallel/PetscSolverFeti.h" #include "parallel/PetscSolverFeti.h"
#include "parallel/StdMpi.h" #include "parallel/StdMpi.h"
#include "parallel/MpiHelper.h" #include "parallel/MpiHelper.h"
#include "io/VtkWriter.h"
namespace AMDiS { namespace AMDiS {
...@@ -203,10 +204,13 @@ namespace AMDiS { ...@@ -203,10 +204,13 @@ namespace AMDiS {
string preconditionerName = ""; string preconditionerName = "";
Parameters::get("parallel->solver->precon", preconditionerName); Parameters::get("parallel->solver->precon", preconditionerName);
if (preconditionerName == "" || preconditionerName == "none") { if (preconditionerName == "" || preconditionerName == "none") {
MSG("Create FETI-DP solver with no preconditioner!\n");
fetiPreconditioner = FETI_NONE; fetiPreconditioner = FETI_NONE;
} else if (preconditionerName == "dirichlet") { } else if (preconditionerName == "dirichlet") {
MSG("Create FETI-DP solver with Dirichlet preconditioner!\n");
fetiPreconditioner = FETI_DIRICHLET; fetiPreconditioner = FETI_DIRICHLET;
} else if (preconditionerName == "lumped") { } else if (preconditionerName == "lumped") {
MSG("Create FETI-DP solver with lumped preconditioner!\n");
fetiPreconditioner = FETI_LUMPED; fetiPreconditioner = FETI_LUMPED;
} else { } else {
ERROR_EXIT("Preconditioner \"%s\" not available!\n", ERROR_EXIT("Preconditioner \"%s\" not available!\n",
...@@ -244,7 +248,9 @@ namespace AMDiS { ...@@ -244,7 +248,9 @@ namespace AMDiS {
// === Define all vertices on the interior boundaries of the macro mesh === // === Define all vertices on the interior boundaries of the macro mesh ===
// === to be primal variables. === // === to be primal variables. ===
primals.clear(); /// Set of DOF indices that are considered to be primal variables.
DofIndexSet primals;
DofContainerSet& vertices = DofContainerSet& vertices =
meshDistributor->getBoundaryDofInfo().geoDofs[VERTEX]; meshDistributor->getBoundaryDofInfo().geoDofs[VERTEX];
TEST_EXIT_DBG(vertices.size())("No primal vertices on this rank!\n"); TEST_EXIT_DBG(vertices.size())("No primal vertices on this rank!\n");
...@@ -329,10 +335,6 @@ namespace AMDiS { ...@@ -329,10 +335,6 @@ namespace AMDiS {
TEST_EXIT_DBG(primals.size() == globalPrimalIndex.size()) TEST_EXIT_DBG(primals.size() == globalPrimalIndex.size())
("Number of primals %d, but number of global primals on this rank is %d!\n", ("Number of primals %d, but number of global primals on this rank is %d!\n",
primals.size(), globalPrimalIndex.size()); primals.size(), globalPrimalIndex.size());
TEST_EXIT_DBG(nOverallPrimals > 0)
("There are zero primal nodes in domain!\n");
} }
...@@ -351,7 +353,7 @@ namespace AMDiS { ...@@ -351,7 +353,7 @@ namespace AMDiS {
for (DofContainer::iterator dofIt = it->second.begin(); for (DofContainer::iterator dofIt = it->second.begin();
dofIt != it->second.end(); ++dofIt) { dofIt != it->second.end(); ++dofIt) {
// If DOF is not primal, i.e., its a dual node // If DOF is not primal, i.e., its a dual node
if (primals.count(**dofIt) == 0) { if (globalPrimalIndex.count(**dofIt) == 0) {
boundaryDofRanks[**dofIt].insert(mpiRank); boundaryDofRanks[**dofIt].insert(mpiRank);
boundaryDofRanks[**dofIt].insert(it->first); boundaryDofRanks[**dofIt].insert(it->first);
} }
...@@ -367,7 +369,7 @@ namespace AMDiS { ...@@ -367,7 +369,7 @@ namespace AMDiS {
it != sendDofs.end(); ++it) it != sendDofs.end(); ++it)
for (DofContainer::iterator dofIt = it->second.begin(); for (DofContainer::iterator dofIt = it->second.begin();
dofIt != it->second.end(); ++dofIt) dofIt != it->second.end(); ++dofIt)
if (primals.count(**dofIt) == 0) if (globalPrimalIndex.count(**dofIt) == 0)
stdMpi.getSendData(it->first).push_back(boundaryDofRanks[**dofIt]); stdMpi.getSendData(it->first).push_back(boundaryDofRanks[**dofIt]);
stdMpi.updateSendDataSize(); stdMpi.updateSendDataSize();
...@@ -378,7 +380,7 @@ namespace AMDiS { ...@@ -378,7 +380,7 @@ namespace AMDiS {
bool recvFromRank = false; bool recvFromRank = false;
for (DofContainer::iterator dofIt = it->second.begin(); for (DofContainer::iterator dofIt = it->second.begin();
dofIt != it->second.end(); ++dofIt) dofIt != it->second.end(); ++dofIt)
if (primals.count(**dofIt) == 0) { if (globalPrimalIndex.count(**dofIt) == 0) {
recvFromRank = true; recvFromRank = true;
break; break;
} }
...@@ -393,7 +395,7 @@ namespace AMDiS { ...@@ -393,7 +395,7 @@ namespace AMDiS {
int i = 0; int i = 0;
for (DofContainer::iterator dofIt = it->second.begin(); for (DofContainer::iterator dofIt = it->second.begin();
dofIt != it->second.end(); ++dofIt) dofIt != it->second.end(); ++dofIt)
if (primals.count(**dofIt) == 0) if (globalPrimalIndex.count(**dofIt) == 0)
boundaryDofRanks[**dofIt] = stdMpi.getRecvData(it->first)[i++]; boundaryDofRanks[**dofIt] = stdMpi.getRecvData(it->first)[i++];
} }
...@@ -404,7 +406,7 @@ namespace AMDiS { ...@@ -404,7 +406,7 @@ namespace AMDiS {
globalDualIndex.clear(); globalDualIndex.clear();
int nRankAllDofs = meshDistributor->getFeSpace()->getAdmin()->getUsedDofs(); int nRankAllDofs = meshDistributor->getFeSpace()->getAdmin()->getUsedDofs();
nRankB = nRankAllDofs - primals.size(); nRankB = nRankAllDofs - globalPrimalIndex.size();
nOverallB = 0; nOverallB = 0;
rStartB = 0; rStartB = 0;
mpi::getDofNumbering(meshDistributor->getMpiComm(), mpi::getDofNumbering(meshDistributor->getMpiComm(),
...@@ -416,7 +418,7 @@ namespace AMDiS { ...@@ -416,7 +418,7 @@ namespace AMDiS {
int nRankDuals = 0; int nRankDuals = 0;
for (DofContainer::iterator it = allBoundaryDofs.begin(); for (DofContainer::iterator it = allBoundaryDofs.begin();
it != allBoundaryDofs.end(); ++it) { it != allBoundaryDofs.end(); ++it) {
if (primals.count(**it) == 0) { if (globalPrimalIndex.count(**it) == 0) {
duals.insert(**it); duals.insert(**it);
globalDualIndex[**it] = rStartB + nRankInteriorDofs + nRankDuals; globalDualIndex[**it] = rStartB + nRankInteriorDofs + nRankDuals;
nRankDuals++; nRankDuals++;
...@@ -473,7 +475,7 @@ namespace AMDiS { ...@@ -473,7 +475,7 @@ namespace AMDiS {
it != sendDofs.end(); ++it) it != sendDofs.end(); ++it)
for (DofContainer::iterator dofIt = it->second.begin(); for (DofContainer::iterator dofIt = it->second.begin();
dofIt != it->second.end(); ++dofIt) { dofIt != it->second.end(); ++dofIt) {
if (primals.count(**dofIt) == 0) { if (globalPrimalIndex.count(**dofIt) == 0) {
TEST_EXIT_DBG(dofFirstLagrange.count(**dofIt))("Should not happen!\n"); TEST_EXIT_DBG(dofFirstLagrange.count(**dofIt))("Should not happen!\n");
stdMpi.getSendData(it->first).push_back(dofFirstLagrange[**dofIt]); stdMpi.getSendData(it->first).push_back(dofFirstLagrange[**dofIt]);
} }
...@@ -486,7 +488,7 @@ namespace AMDiS { ...@@ -486,7 +488,7 @@ namespace AMDiS {
bool recvData = false; bool recvData = false;
for (DofContainer::iterator dofIt = it->second.begin(); for (DofContainer::iterator dofIt = it->second.begin();
dofIt != it->second.end(); ++dofIt) dofIt != it->second.end(); ++dofIt)
if (primals.count(**dofIt) == 0) { if (globalPrimalIndex.count(**dofIt) == 0) {
recvData = true; recvData = true;
break; break;
} }
...@@ -501,7 +503,7 @@ namespace AMDiS { ...@@ -501,7 +503,7 @@ namespace AMDiS {
it != recvDofs.end(); ++it) { it != recvDofs.end(); ++it) {
int counter = 0; int counter = 0;
for (unsigned int i = 0; i < it->second.size(); i++) for (unsigned int i = 0; i < it->second.size(); i++)
if (primals.count(*(it->second[i])) == 0) if (globalPrimalIndex.count(*(it->second[i])) == 0)
dofFirstLagrange[*(it->second[i])] = stdMpi.getRecvData(it->first)[counter++]; dofFirstLagrange[*(it->second[i])] = stdMpi.getRecvData(it->first)[counter++];
} }
} }
...@@ -519,8 +521,8 @@ namespace AMDiS { ...@@ -519,8 +521,8 @@ namespace AMDiS {
// === without defining a correct index. === // === without defining a correct index. ===
for (int i = 0; i < admin->getUsedSize(); i++) for (int i = 0; i < admin->getUsedSize(); i++)
if (admin->isDofFree(i) == false && primals.count(i) == 0) if (admin->isDofFree(i) == false && globalPrimalIndex.count(i) == 0)
if (duals.count(i) == 0 && primals.count(i) == 0) if (duals.count(i) == 0 && globalPrimalIndex.count(i) == 0)
localIndexB[i] = -1; localIndexB[i] = -1;
...@@ -534,7 +536,7 @@ namespace AMDiS { ...@@ -534,7 +536,7 @@ namespace AMDiS {
} }
nLocalDuals = duals.size(); nLocalDuals = duals.size();
TEST_EXIT_DBG(nLocalInterior + primals.size() + duals.size() == TEST_EXIT_DBG(nLocalInterior + globalPrimalIndex.size() + duals.size() ==
static_cast<unsigned int>(admin->getUsedDofs())) static_cast<unsigned int>(admin->getUsedDofs()))
("Should not happen!\n"); ("Should not happen!\n");
...@@ -610,6 +612,8 @@ namespace AMDiS { ...@@ -610,6 +612,8 @@ namespace AMDiS {
FUNCNAME("PetscSolverFeti::createSchurPrimal()"); FUNCNAME("PetscSolverFeti::createSchurPrimal()");
if (schurPrimalSolver == 0) { if (schurPrimalSolver == 0) {
MSG("Create iterative schur primal solver!\n");
schurPrimalData.mat_primal_primal = &mat_primal_primal; schurPrimalData.mat_primal_primal = &mat_primal_primal;
schurPrimalData.mat_primal_b = &mat_primal_b; schurPrimalData.mat_primal_b = &mat_primal_b;
schurPrimalData.mat_b_primal = &mat_b_primal; schurPrimalData.mat_b_primal = &mat_b_primal;
...@@ -635,6 +639,8 @@ namespace AMDiS { ...@@ -635,6 +639,8 @@ namespace AMDiS {
KSPSetOptionsPrefix(ksp_schur_primal, "solver_sp_"); KSPSetOptionsPrefix(ksp_schur_primal, "solver_sp_");
KSPSetFromOptions(ksp_schur_primal); KSPSetFromOptions(ksp_schur_primal);
} else { } else {
MSG("Create direct schur primal solver!\n");
TEST_EXIT(ksp_b)("No solver object for local problem!\n"); TEST_EXIT(ksp_b)("No solver object for local problem!\n");
double wtime = MPI::Wtime(); double wtime = MPI::Wtime();
...@@ -832,6 +838,8 @@ namespace AMDiS { ...@@ -832,6 +838,8 @@ namespace AMDiS {
PCShellSetContext(precon_feti, static_cast<void*>(&fetiLumpedPreconData)); PCShellSetContext(precon_feti, static_cast<void*>(&fetiLumpedPreconData));
PCShellSetApply(precon_feti, petscApplyFetiLumpedPrecon); PCShellSetApply(precon_feti, petscApplyFetiLumpedPrecon);
break;
default:
break; break;
} }
} }
...@@ -884,6 +892,8 @@ namespace AMDiS { ...@@ -884,6 +892,8 @@ namespace AMDiS {
VecDestroy(&fetiLumpedPreconData.tmp_vec_duals0); VecDestroy(&fetiLumpedPreconData.tmp_vec_duals0);
VecDestroy(&fetiLumpedPreconData.tmp_vec_duals1); VecDestroy(&fetiLumpedPreconData.tmp_vec_duals1);
break; break;
default:
break;
} }
} }
...@@ -894,6 +904,12 @@ namespace AMDiS { ...@@ -894,6 +904,12 @@ namespace AMDiS {
{ {
FUNCNAME("PetscSolverFeti::recoverSolution()"); FUNCNAME("PetscSolverFeti::recoverSolution()");
PetscScalar *ttt;
VecGetArray(vec_sol_primal, &ttt);
for (int i = 0; i < nRankPrimals; i++)
MSG("PRIM VAL = %f\n", ttt[i * 3 + 1]);
VecRestoreArray(vec_sol_primal, &ttt);
// === Get local part of the solution for B variables. === // === Get local part of the solution for B variables. ===
PetscScalar *localSolB; PetscScalar *localSolB;
...@@ -912,6 +928,8 @@ namespace AMDiS { ...@@ -912,6 +928,8 @@ namespace AMDiS {
for (DofMapping::iterator it = globalPrimalIndex.begin(); for (DofMapping::iterator it = globalPrimalIndex.begin();
it != globalPrimalIndex.end(); ++it) { it != globalPrimalIndex.end(); ++it) {
for (int i = 0; i < nComponents; i++) { for (int i = 0; i < nComponents; i++) {
MSG("COPY GLOBAL PRIM %d of COMP %d TO LOCAL TMP %d\n",
it->second, i, counter);
globalIsIndex.push_back(it->second * nComponents + i); globalIsIndex.push_back(it->second * nComponents + i);
localIsIndex.push_back(counter++); localIsIndex.push_back(counter++);
} }
...@@ -948,6 +966,9 @@ namespace AMDiS { ...@@ -948,6 +966,9 @@ namespace AMDiS {
PetscScalar *localSolPrimal; PetscScalar *localSolPrimal;
VecGetArray(local_sol_primal, &localSolPrimal); VecGetArray(local_sol_primal, &localSolPrimal);
for (int i = 0; i < globalPrimalIndex.size(); i++)
MSG("TEST VAL %f\n", localSolPrimal[i * 3 + 1]);
// === And copy from PETSc local vectors to the DOF vectors. === // === And copy from PETSc local vectors to the DOF vectors. ===
...@@ -963,12 +984,16 @@ namespace AMDiS { ...@@ -963,12 +984,16 @@ namespace AMDiS {
int counter = 0; int counter = 0;
for (DofMapping::iterator it = globalPrimalIndex.begin(); for (DofMapping::iterator it = globalPrimalIndex.begin();
it != globalPrimalIndex.end(); ++it) { it != globalPrimalIndex.end(); ++it) {
if (i == 1)
MSG("AND SET THE VAL OF DOF %d TO VAL %f\n",
it->first,
localSolPrimal[counter * nComponents + i]);
dofVec[it->first] = localSolPrimal[counter * nComponents + i]; dofVec[it->first] = localSolPrimal[counter * nComponents + i];
counter++; counter++;
} }
} }
MSG("VAL BOUNDS: %f %f\n", vec.getDOFVector(1)->min(), vec.getDOFVector(1)->max());
VecRestoreArray(vec_sol_b, &localSolB); VecRestoreArray(vec_sol_b, &localSolB);
VecRestoreArray(local_sol_primal, &localSolPrimal); VecRestoreArray(local_sol_primal, &localSolPrimal);
...@@ -1076,7 +1101,7 @@ namespace AMDiS { ...@@ -1076,7 +1101,7 @@ namespace AMDiS {
for (cursor_type cursor = begin<row>((*mat)[i][j]->getBaseMatrix()), for (cursor_type cursor = begin<row>((*mat)[i][j]->getBaseMatrix()),
cend = end<row>((*mat)[i][j]->getBaseMatrix()); cursor != cend; ++cursor) { cend = end<row>((*mat)[i][j]->getBaseMatrix()); cursor != cend; ++cursor) {
bool rowPrimal = primals.count(*cursor) != 0; bool rowPrimal = globalPrimalIndex.count(*cursor) != 0;
cols.clear(); cols.clear();
colsOther.clear(); colsOther.clear();
...@@ -1093,7 +1118,7 @@ namespace AMDiS { ...@@ -1093,7 +1118,7 @@ namespace AMDiS {
for (icursor_type icursor = begin<nz>(cursor), icend = end<nz>(cursor); for (icursor_type icursor = begin<nz>(cursor), icend = end<nz>(cursor);
icursor != icend; ++icursor) { icursor != icend; ++icursor) {
bool colPrimal = primals.count(col(*icursor)) != 0; bool colPrimal = globalPrimalIndex.count(col(*icursor)) != 0;
if (colPrimal) { if (colPrimal) {
// Column is a primal variable. // Column is a primal variable.
...@@ -1242,6 +1267,8 @@ namespace AMDiS { ...@@ -1242,6 +1267,8 @@ namespace AMDiS {
} }
} }
break; break;
default:
break;
} }
} }
} }
...@@ -1323,7 +1350,7 @@ namespace AMDiS { ...@@ -1323,7 +1350,7 @@ namespace AMDiS {
DOFVector<double>::Iterator dofIt(vec->getDOFVector(i), USED_DOFS); DOFVector<double>::Iterator dofIt(vec->getDOFVector(i), USED_DOFS);
for (dofIt.reset(); !dofIt.end(); ++dofIt) { for (dofIt.reset(); !dofIt.end(); ++dofIt) {
int index = dofIt.getDOFIndex(); int index = dofIt.getDOFIndex();
if (primals.count(index)) { if (globalPrimalIndex.count(index)) {
TEST_EXIT_DBG(globalPrimalIndex.count(index)) TEST_EXIT_DBG(globalPrimalIndex.count(index))
("Should not happen!\n"); ("Should not happen!\n");
...@@ -1520,7 +1547,9 @@ namespace AMDiS { ...@@ -1520,7 +1547,9 @@ namespace AMDiS {
solveReducedFetiMatrix(vec); solveReducedFetiMatrix(vec);
// printStatistics(); // printStatistics();
VtkWriter::writeFile(&vec, "test-before.vtu");
MeshDistributor::globalMeshDistributor->synchVector(vec); MeshDistributor::globalMeshDistributor->synchVector(vec);
VtkWriter::writeFile(&vec, "test-after.vtu");
} }
......
...@@ -255,9 +255,6 @@ namespace AMDiS { ...@@ -255,9 +255,6 @@ namespace AMDiS {
/// Number of components in the PDE to be solved. /// Number of components in the PDE to be solved.
int nComponents; int nComponents;