Commit 79920e17 authored by Praetorius, Simon's avatar Praetorius, Simon

Expressions updated

parent c7d5651a
......@@ -22,8 +22,8 @@
/** \file Expressions.h */
#ifndef AMDIS_EXPRESSIONS_H
#define AMDIS_EXPRESSIONS_H
#ifndef AMDIS_EXPRESSIONS_BASE_H
#define AMDIS_EXPRESSIONS_BASE_H
#include "AMDiS_fwd.h"
#include "OperatorTerm.h"
......@@ -854,6 +854,6 @@ operator<<(std::ostream& result, const Term& term);
} // end namespace AMDiS
#include "GenericOperatorTerm.hh"
#include "Expressions.hh"
#endif // AMDIS_GENERIC_OPERATOR_TERM_H
#endif // AMDIS_EXPRESSIONS_BASE_H
......@@ -86,7 +86,7 @@ namespace AMDiS {
}
template<typename SolverType, typename RunnerType>
static void createSubSolver(std::string param, SolverType*& solver, RunnerType*& runner, std::string solverType = "0")
static void createSubSolver(std::string param, SolverType*& solver, RunnerType*& runner, std::string solverType = "0", std::string preconType = "no", int max_iter = 100, double tol = 1.e-8)
{
// definition of standard-backends
#if defined HAVE_PARALLEL_PETSC
......@@ -101,10 +101,23 @@ namespace AMDiS {
// === read backend-name ===
std::string initFileStr = param + "->solver";
Parameters::get(initFileStr + "->backend", backend);
// === read solver-name ===
Parameters::get(initFileStr, solverType);
std::string tmp = "0";
Parameters::get(initFileStr, tmp);
if (tmp == "0") {
TEST_EXIT(solverType != "0")("You have to specify the parameter %s in the initfile!\n", initFileStr.c_str());
Parameters::set(initFileStr, solverType);
Parameters::set(initFileStr + "->backend", backend);
Parameters::set(initFileStr + "->left precon", preconType);
Parameters::set(initFileStr + "->max iteration", max_iter);
Parameters::set(initFileStr + "->tolerance", tol);
} else {
solverType = tmp;
}
Parameters::get(initFileStr + "->backend", backend);
if (backend != "0" && backend != "no" && backend != "")
solverType = backend + "_" + solverType;
......
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