Liebe Gitlab-Nutzer, 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 c06506af authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Fixed for parallel computations.

parent 54ce7c62
......@@ -9,10 +9,6 @@
#include "nonlin/ProblemNonLin.h"
#endif
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
#include "parallel/PetscProblemStat.h"
#endif
using namespace AMDiS;
const Flag INIT_EXACT_SOLUTION = 0X2000L;
......@@ -40,22 +36,6 @@ public:
exactSolutions.resize(nComponents);
for (int i = 0; i < nComponents; ++i)
exactSolutions[i] = NULL;
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
ksp_type = "bcgs";
pc_type = "bjacobi";
pc_factor_mat_solver_package = "mumps";
ksp_rtol = 0.0;
ksp_abstol = 1.e-8;
ksp_maxits = 500;
Parameters::get(nameStr + "->petsc->ksp_type",ksp_type);
Parameters::get(nameStr + "->petsc->pc_type",pc_type);
Parameters::get(nameStr + "->petsc->pc_factor_mat_solver_package",pc_factor_mat_solver_package);
Parameters::get(nameStr + "->petsc->rtol",ksp_rtol);
Parameters::get(nameStr + "->petsc->abstol",ksp_abstol);
Parameters::get(nameStr + "->petsc->maxits",ksp_maxits);
#endif
}
void initialize(Flag initFlag,
......@@ -139,40 +119,6 @@ public:
bool storeMatrixData = false)
{ FUNCNAME("ExtendedProblemStat::solve()");
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
TEST_EXIT(meshDistributor)("Should not happen!\n");
TEST_EXIT(singularDirichletBC.size() == 0)
("Singular Dirichlet BC not implemented for parallel computing!\n");
double wtime = MPI::Wtime();
if (createMatrixData) {
petscSolver->setMeshDistributor(meshDistributor);
petscSolver->fillPetscMatrix(systemMatrix);
}
petscSolver->fillPetscRhs(rhs);
MSG("set PETSC-Parameters...\n");
KSPSetType(petscSolver->getSolver(), ksp_type.c_str());
KSPSetTolerances(petscSolver->getSolver(), ksp_rtol, ksp_abstol, PETSC_DEFAULT, ksp_maxits);
if (ksp_type == "preonly") {
KSPSetInitialGuessNonzero(petscSolver->getSolver(), PETSC_FALSE);
}
PCSetType(petscSolver->getPc(), pc_type.c_str());
if (pc_type == "lu") {
PCFactorSetMatSolverPackage(petscSolver->getPc(), pc_factor_mat_solver_package.c_str());
}
petscSolver->solvePetscMatrix(*solution, adaptInfo);
if (!storeMatrixData)
petscSolver->destroyMatrixData();
INFO(info, 8)("solution of discrete system needed %.5f seconds\n",
MPI::Wtime() - wtime);
#endif
ProblemStat_::solve(adaptInfo, createMatrixData, storeMatrixData);
oldMeshChangeIdx = getMesh()->getChangeIndex();
......@@ -458,16 +404,5 @@ private:
std::map<const FiniteElemSpace*, bool> feSpaceVisited;
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
std::string ksp_type;
std::string pc_type;
std::string pc_factor_mat_solver_package;
double ksp_rtol;
double ksp_abstol;
int ksp_maxits;
#endif
};
#endif // EXTENDED_PROBLEM_STAT_H
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