Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer, es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Ein Anmelden über dieses erzeugt ein neues Konto. Das alte Konto ist ü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. Logging in via this will create a new account. The old account can be accessed via the "Standard" tab. The administrators

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

Merge for debugging

parent b81cf528
......@@ -275,7 +275,11 @@ namespace AMDiS {
it != vertices.end(); ++it) {
double e = 1e-8;
if (meshLevel == 0) {
primals.insert(**it);
WorldVector<double> c;
feSpace->getMesh()->getDofIndexCoords(*it, feSpace, c);
if (fabs(c[1]) > 1 && fabs(c[1]) < 19)
primals.insert(**it);
} else {
WorldVector<double> c;
feSpace->getMesh()->getDofIndexCoords(*it, feSpace, c);
......@@ -990,6 +994,61 @@ namespace AMDiS {
{
FUNCNAME("PetscSolverFeti::dbgMatrix()");
#if (DEBUG != 0)
PetscInt nRow, nCol;
MatGetSize(subdomain->getMatInterior(), &nRow, &nCol);
mpi::globalAdd(nRow);
mpi::globalAdd(nCol);
MatInfo minfo;
MatGetInfo(subdomain->getMatInterior(), MAT_GLOBAL_SUM, &minfo);
int nnz = static_cast<int>(minfo.nz_used);
mpi::globalAdd(nnz);
MSG("Interior matrices [%d x %d] nnz = %d\n", nRow, nCol, nnz);
MatGetSize(subdomain->getMatCoarse(), &nRow, &nCol);
MatGetInfo(subdomain->getMatCoarse(), MAT_GLOBAL_SUM, &minfo);
MSG("Primal matrix [%d x %d] nnz = %d\n", nRow, nCol,
static_cast<int>(minfo.nz_used));
MatGetSize(subdomain->getMatCoarseInterior(), &nRow, &nCol);
MatGetInfo(subdomain->getMatCoarseInterior(), MAT_GLOBAL_SUM, &minfo);
MSG("Primal-Interior matrix [%d x %d] nnz = %d\n", nRow, nCol,
static_cast<int>(minfo.nz_used));
MatGetSize(subdomain->getMatInteriorCoarse(), &nRow, &nCol);
MatGetInfo(subdomain->getMatInteriorCoarse(), MAT_GLOBAL_SUM, &minfo);
MSG("Interior-Primal matrix [%d x %d] nnz = %d\n", nRow, nCol,
static_cast<int>(minfo.nz_used));
if (enableStokesMode) {
MatGetSize(subdomain->getMatCoarse(1, 1), &nRow, &nCol);
MatGetInfo(subdomain->getMatCoarse(1, 1), MAT_GLOBAL_SUM, &minfo);
MSG("Interface matrix [%d x %d] nnz = %d\n", nRow, nCol,
static_cast<int>(minfo.nz_used));
MatGetSize(subdomain->getMatCoarseInterior(1), &nRow, &nCol);
MatGetInfo(subdomain->getMatCoarseInterior(1), MAT_GLOBAL_SUM, &minfo);
MSG("Interface-Interior matrix [%d x %d] nnz = %d\n", nRow, nCol,
static_cast<int>(minfo.nz_used));
MatGetSize(subdomain->getMatInteriorCoarse(1), &nRow, &nCol);
MatGetInfo(subdomain->getMatInteriorCoarse(1), MAT_GLOBAL_SUM, &minfo);
MSG("Interior-Interface matrix [%d x %d] nnz = %d\n", nRow, nCol,
static_cast<int>(minfo.nz_used));
MatGetSize(subdomain->getMatCoarse(1, 0), &nRow, &nCol);
MatGetInfo(subdomain->getMatCoarse(1, 0), MAT_GLOBAL_SUM, &minfo);
MSG("Interface-Primal matrix [%d x %d] nnz = %d\n", nRow, nCol,
static_cast<int>(minfo.nz_used));
MatGetSize(subdomain->getMatCoarse(0, 1), &nRow, &nCol);
MatGetInfo(subdomain->getMatCoarse(0, 1), MAT_GLOBAL_SUM, &minfo);
MSG("Primal-Interface matrix [%d x %d] nnz = %d\n", nRow, nCol,
static_cast<int>(minfo.nz_used));
}
#endif
int writeInteriorMatrix = -1;
Parameters::get("parallel->debug->write interior matrix",
writeInteriorMatrix);
......
......@@ -106,9 +106,6 @@ namespace AMDiS {
vector<const FiniteElemSpace*> feSpaces = AMDiS::getComponentFeSpaces(*seqMat);
int nRowsRankInterior = interiorMap->getRankDofs();
int nRowsOverallInterior = interiorMap->getOverallDofs();
// === Prepare traverse of sequentially created matrices. ===
using mtl::tag::row; using mtl::tag::nz; using mtl::begin; using mtl::end;
......@@ -174,25 +171,19 @@ namespace AMDiS {
// === Set matrix values. ===
if (isRowCoarse) {
int rowIndex = rowCoarseSpace->getMatIndex(rowComponent, *cursor);
for (unsigned int i = 0; i < cols.size(); i++)
cols[i] = colCoarseSpace->getMatIndex(colComponent, cols[i]);
int rowIndex = rowCoarseSpace->getMatIndex(rowComponent, *cursor);
MatSetValues(getMatCoarseByComponent(rowComponent, colComponent),
1, &rowIndex, cols.size(),
&(cols[0]), &(values[0]), ADD_VALUES);
if (colsOther.size()) {
if (subdomainLevel == 0) {
for (unsigned int i = 0; i < colsOther.size(); i++)
colsOther[i] =
interiorMap->getMatIndex(colComponent, colsOther[i]);
} else {
for (unsigned int i = 0; i < colsOther.size(); i++)
colsOther[i] =
interiorMap->getMatIndex(colComponent, colsOther[i]) +
rStartInterior;
}
for (unsigned int i = 0; i < colsOther.size(); i++)
colsOther[i] =
interiorMap->getMatIndex(colComponent, colsOther[i]) +
rStartInterior;
MatSetValues(getMatCoarseInteriorByComponent(rowComponent),
1, &rowIndex, colsOther.size(),
......@@ -215,11 +206,9 @@ namespace AMDiS {
&(cols[0]), &(values[0]), ADD_VALUES);
if (colsOther.size()) {
int globalRowIndex = interiorMap->getMatIndex(rowComponent, *cursor);
if (subdomainLevel != 0)
globalRowIndex += rStartInterior;
int globalRowIndex =
interiorMap->getMatIndex(rowComponent, *cursor) + rStartInterior;
for (unsigned int i = 0; i < colsOther.size(); i++)
colsOther[i] =
colCoarseSpace->getMatIndex(colComponent, colsOther[i]);
......
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