Skip to content
Snippets Groups Projects
Forked from iwr / amdis
2111 commits behind the upstream repository.
NonLinSolver.hh 707 B
#include "OEMSolver.h"
#include "Parameters.h"

namespace AMDiS {

  template<typename VectorType>
  NonLinSolver<VectorType>::NonLinSolver(std::string name_, 
					 OEMSolver *solver,
					 NonLinUpdater<VectorType> *updater)
    : name(name_),
      linSolver(solver),
      nonLinUpdater(updater),
      tolerance(1.e-4),
      maxIter(50),
      info(8),
      initial_residual(0.0),
      residual(0.0),
      usedNorm(NO_NORM),
      vectorCreator(NULL)
  {
    GET_PARAMETER(0, name + "->tolerance", "%e", &tolerance);
    GET_PARAMETER(0, name + "->max iteration", "%d", &maxIter);
    GET_PARAMETER(0, name + "->info", "%d", &info);
    GET_PARAMETER(0, name + "->norm", "%d", &usedNorm);  
  }

}