Liebe Gitlab-Nutzerin, lieber Gitlab-Nutzer,
es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Die Konten der externen Nutzer:innen sind über den Reiter "Standard" erreichbar.
Die Administratoren


Dear Gitlab user,
it is now possible to log in to our service using the ZIH login/LDAP. The accounts of external users can be accessed via the "Standard" tab.
The administrators

Commit 1908148a authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Fixed some issues for multi level tests.

parent 4e34df55
......@@ -1223,7 +1223,7 @@ namespace AMDiS {
if (list->getNeighbourElement(i, 1) && list->getNeighbourNr(i, 1) < i)
lr_set += 2;
TEST_EXIT(lr_set > 0)
("No values set on both neighbours of element %d\n", el->getIndex());
......
......@@ -123,6 +123,23 @@ namespace AMDiS {
}
void MSMarker::initMarking(AdaptInfo *adaptInfo, Mesh *mesh)
{
FUNCNAME("MSMarker::initMarking()");
Marker::initMarking(adaptInfo, mesh);
double MSGammaP = pow(MSGamma, p);
double MSGammaCP = pow(MSGammaC, p);
markRLimit = MSGammaP * adaptInfo->getEstMax(row == -1 ? 0 : row);
markCLimit = MSGammaCP * adaptInfo->getEstMax(row == -1 ? 0 : row);
MSG("start max_est: %.3le mark_limits: %.3le %.3le\n",
adaptInfo->getEstMax(row == -1 ? 0 : row), markRLimit, markCLimit);
}
void ESMarker::initMarking(AdaptInfo *adaptInfo, Mesh *mesh)
{
FUNCNAME("ESMarker::initMarking()");
......
......@@ -217,16 +217,7 @@ namespace AMDiS {
}
/// Implementation of MarkScal::initMarking().
virtual void initMarking(AdaptInfo *adaptInfo, Mesh *mesh)
{
Marker::initMarking(adaptInfo, mesh);
double MSGammaP = pow(MSGamma, p);
double MSGammaCP = pow(MSGammaC, p);
markRLimit = MSGammaP * adaptInfo->getEstMax(row == -1 ? 0 : row);
markCLimit = MSGammaCP * adaptInfo->getEstMax(row == -1 ? 0 : row);
}
void initMarking(AdaptInfo *adaptInfo, Mesh *mesh);
protected:
/// Marking parameter.
......
......@@ -133,6 +133,9 @@ namespace AMDiS {
Parameters::get(name + "->print timings", printTimings);
TEST_EXIT(partitioner)("Could not create partitioner \"%s\"!\n", partStr.c_str());
// If required, create hierarchical mesh level structure.
createMeshLevelStructure();
}
......@@ -179,15 +182,11 @@ namespace AMDiS {
elObjDb.setFeSpace(feSpaces[0]);
// If required, create hierarchical mesh level structure.
createMeshLevelStructure();
// If the problem has been already read from a file, we need only to set
// isRankDofs to all matrices and rhs vector and to remove periodic
// boundary conditions (if there are some).
if (deserialized) {
createMeshLevelStructure();
updateMacroElementInfo();
removePeriodicBoundaryConditions();
......@@ -569,7 +568,7 @@ namespace AMDiS {
dofMaps.end())
("Parallel DOF mapping already registerd in mesh distributor object!\n");
dofMaps.push_back(&dofMap);
dofMaps.push_back(&dofMap);
}
......
......@@ -72,7 +72,10 @@ namespace AMDiS {
MPI::Intracomm& getMpiComm(int level)
{
TEST_EXIT_DBG(level < nLevel)("Should not happen!\n");
FUNCNAME("MeshLevelData::getMpiComm()");
TEST_EXIT_DBG(level < nLevel)
("Asked for level %d, but defined only for %d levels!\n", level, nLevel);
return mpiComms[level];
}
......
......@@ -927,6 +927,9 @@ namespace AMDiS {
Mesh *mesh = feSpace->getMesh();
if (mesh->getDim() != 3)
return;
stringstream filename;
filename << prefix << "-" << MPI::COMM_WORLD.Get_rank() << "." << postfix;
......
......@@ -48,8 +48,9 @@ namespace AMDiS {
PetscSolver::~PetscSolver()
{
if (parallelDofMappingsRegistered) {
meshDistributor->removeDofMap(dofMap);
int nLevels = meshDistributor->getMeshLevelData().getLevelNumber();
meshDistributor->removeDofMap(dofMap);
if (nLevels > 1)
meshDistributor->removeDofMap(dofMapSd);
}
......
......@@ -150,6 +150,11 @@ namespace AMDiS {
return dofMap;
}
ParallelDofMapping& getDofMapSd()
{
return dofMapSd;
}
vector<const FiniteElemSpace*>& getComponentSpaces()
{
return componentSpaces;
......
......@@ -331,11 +331,13 @@ namespace AMDiS {
// === Calculate the number of primals that are owned by the rank and ===
// === create local indices of the primals starting at zero. ===
for (DofIndexSet::iterator it = primals.begin(); it != primals.end(); ++it)
for (DofIndexSet::iterator it = primals.begin(); it != primals.end(); ++it) {
if (dofMap[feSpace].isRankDof(*it)) {
primalDofMap[component].insertRankDof(*it);
} else
} else {
primalDofMap[component].insertNonRankDof(*it);
}
}
}
......@@ -1047,7 +1049,7 @@ namespace AMDiS {
MatMatMult(subdomain->getMatCoarseInterior(), matK, MAT_INITIAL_MATRIX,
PETSC_DEFAULT, &mat_schur_primal);
MatAYPX(mat_schur_primal, -1.0, subdomain->getMatCoarse(), DIFFERENT_NONZERO_PATTERN);
MatDestroy(&matK);
} else {
Mat tmp;
......
......@@ -57,6 +57,11 @@ namespace AMDiS {
/// Constructor of FETI-DP solver class.
PetscSolverFeti(string name);
/// After mesh changes, or if the solver is called the first time, this
/// function creates all information about primal nodes, dual nodes and
/// lagrange constraints.
void createFetiData();
/// Assemble the sequentially created matrices to the global matrices
/// required by the FETI-DP method.
void fillPetscMatrix(Matrix<DOFMatrix*> *mat);
......@@ -115,11 +120,6 @@ namespace AMDiS {
///
void createDirichletData(Matrix<DOFMatrix*> &mat);
/// After mesh changes, or if the solver is called the first time, this
/// function creates all information about primal nodes, dual nodes and
/// lagrange constraints.
void createFetiData();
/// Defines which boundary nodes are primal. Creates global index of
/// the primal variables.
void createPrimals(int component);
......
......@@ -203,8 +203,8 @@ namespace AMDiS {
rStartInterior;
MatSetValues(getMatCoarseInteriorByComponent(rowComponent),
1, &rowIndex, colsOther.size(),
&(colsOther[0]), &(valuesOther[0]), ADD_VALUES);
1, &rowIndex, colsOther.size(),
&(colsOther[0]), &(valuesOther[0]), ADD_VALUES);
}
} else {
if ((*interiorMap)[rowComponent].isSet(*cursor) == false)
......@@ -222,8 +222,8 @@ namespace AMDiS {
cols[i] = interiorMap->getMatIndex(colComponent, cols[i]);
}
MatSetValues(getMatInterior(), 1, &localRowIndex, cols.size(),
&(cols[0]), &(values[0]), ADD_VALUES);
MatSetValues(getMatInterior(), 1, &localRowIndex, cols.size(),
&(cols[0]), &(values[0]), ADD_VALUES);
if (colsOther.size()) {
int globalRowIndex =
......@@ -234,8 +234,8 @@ namespace AMDiS {
colCoarseSpace->getMatIndex(colComponent, colsOther[i]);
MatSetValues(getMatInteriorCoarseByComponent(colComponent),
1, &globalRowIndex, colsOther.size(),
&(colsOther[0]), &(valuesOther[0]), ADD_VALUES);
1, &globalRowIndex, colsOther.size(),
&(colsOther[0]), &(valuesOther[0]), ADD_VALUES);
}
}
}
......@@ -244,6 +244,7 @@ namespace AMDiS {
matAssembly();
// === Create solver for the non primal (thus local) variables. ===
KSPCreate(mpiCommLocal, &kspInterior);
......
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