Commit 8cb3442e authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Initfile and LinearSolver corrected

parent d8bef5fa
...@@ -254,9 +254,9 @@ namespace AMDiS { ...@@ -254,9 +254,9 @@ namespace AMDiS {
size_t pos = begBrackets.find(val[0]); size_t pos = begBrackets.find(val[0]);
if (pos == std::string::npos) if (pos == std::string::npos)
hasBrackets = false; hasBrackets = false;
/* if (hasBrackets && val[val.length() - 1] != endBrackets[pos]) */ if (hasBrackets && val[val.length() - 1] != endBrackets[pos])
/* throw WrongVectorFormat("begin and end bracket are different in" */ throw WrongVectorFormat("begin and end bracket are different in"
/* " value '" + val + "'"); */ " value '" + val + "'");
size_t oldPos = (hasBrackets ? 1 : 0); size_t oldPos = (hasBrackets ? 1 : 0);
size_t curDelim = 0; size_t curDelim = 0;
typedef typename Container::value_type ValueType; typedef typename Container::value_type ValueType;
...@@ -295,8 +295,8 @@ namespace AMDiS { ...@@ -295,8 +295,8 @@ namespace AMDiS {
{ {
std::vector<T> temp_vec; std::vector<T> temp_vec;
getContainer(valStr, temp_vec); getContainer(valStr, temp_vec);
/* if (static_cast<int>(temp_vec.size()) != c.getSize()) */ if (static_cast<int>(temp_vec.size()) != c.getSize())
/* throw WrongVectorSize("wrong number of entries for WorldVector"); */ throw WrongVectorSize("wrong number of entries for WorldVector");
for (size_t i = 0; i < temp_vec.size(); i++) for (size_t i = 0; i < temp_vec.size(); i++)
c[i] = temp_vec[i]; c[i] = temp_vec[i];
......
...@@ -120,6 +120,7 @@ namespace AMDiS { ...@@ -120,6 +120,7 @@ namespace AMDiS {
MSG("LinearSolver::solveSystem()\n"); MSG("LinearSolver::solveSystem()\n");
residual = -1.0; residual = -1.0;
rel_residual = -1.0;
int error_code = solveLinearSystem(A, x, b, createMatrixData, storeMatrixData); int error_code = solveLinearSystem(A, x, b, createMatrixData, storeMatrixData);
TEST_EXIT(error_code == 0) TEST_EXIT(error_code == 0)
...@@ -140,7 +141,7 @@ namespace AMDiS { ...@@ -140,7 +141,7 @@ namespace AMDiS {
// test for relative tolerance // test for relative tolerance
TEST_EXIT((isNumber(rel_residual) && (rel_residual < 0.0 || relative < 1.e-30 || rel_residual <= relative)) TEST_EXIT((isNumber(rel_residual) && (rel_residual < 0.0 || relative < 1.e-30 || rel_residual <= relative))
|| !breakTolNotReached) || (residual < 1.e-30) || !breakTolNotReached)
("Relative tolerance rtol = %e could not be reached!\n Set tolerance by '->solver->relative tolerance:' \n", relative); ("Relative tolerance rtol = %e could not be reached!\n Set tolerance by '->solver->relative tolerance:' \n", relative);
} }
return error_code; return error_code;
......
dimension of world: 3 dimension of world: 3
elliptMesh->macro file name: ./macro/macro.stand.3d elliptMesh->macro file name: ./macro/macro.stand.3d
elliptMesh->global refinements: 0 elliptMesh->global refinements: 1
ellipt->mesh: elliptMesh ellipt->mesh: elliptMesh
ellipt->dim: 3 ellipt->dim: 3
......
Supports Markdown
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