NoxSolver<Scalar>::NoxSolver(DiscreteProblemInterface<Scalar>* problem) : NonlinearSolver<Scalar>(problem) { if(!this->dp->is_matrix_free()) prealloc_jacobian(); this->precond = Teuchos::null; // default values nl_dir = "Newton"; output_flags = NOX::Utils::Error; // linear solver settings ls_type = "GMRES"; ls_max_iters = 800; ls_tolerance = 1e-8; ls_sizeof_krylov_subspace = 50; precond_type = "None"; // convergence test conv.max_iters = 10; conv.abs_resid = 1.0e-6; conv.rel_resid = 1.0e-2; conv.norm_type = NOX::Abstract::Vector::TwoNorm; conv.stype = NOX::StatusTest::NormF::Scaled; conv.update = 1.0e-5; conv.wrms_rtol = 1.0e-2; conv.wrms_atol = 1.0e-8; conv_flag.absresid = 1; conv_flag.relresid = 0; conv_flag.update = 0; conv_flag.wrms = 0; }
NoxProblemInterface::NoxProblemInterface(DiscreteProblem* problem) { fep = problem; int ndof = fep->get_num_dofs(); // allocate initial solution init_sln.alloc(ndof); if (!fep->is_matrix_free()) prealloc_jacobian(); this->precond = Teuchos::null; }
NoxProblemInterface::NoxProblemInterface(DiscreteProblem &problem) : fep(problem) { _F_ int ndofs = fep.get_num_dofs(); // allocate initial solution init_sln.alloc(ndofs); if (!fep.is_matrix_free()) prealloc_jacobian(); precond = NULL; }
NoxSolver<Scalar>::NoxSolver(DiscreteProblemInterface<Scalar> *problem, unsigned message_type, const char* ls_type, const char* nl_dir, double ls_tolerance, const char* precond_type, unsigned flag_absresid, double abs_resid, unsigned flag_relresid, double rel_resid, int max_iters, double update, int ls_max_iters, int ls_sizeof_krylov_subspace, NOX::Abstract::Vector::NormType norm_type, NOX::StatusTest::NormF::ScaleType stype, double wrms_rtol, double wrms_atol, unsigned flag_update, unsigned flag_wrms ) : NonlinearSolver<Scalar>(problem) { if(!this->dp->is_matrix_free()) prealloc_jacobian(); this->precond = Teuchos::null; // default values this->nl_dir = nl_dir; output_flags = message_type; // linear solver settings this->ls_type = ls_type; this->ls_max_iters = ls_max_iters; this->ls_tolerance = ls_tolerance; this->ls_sizeof_krylov_subspace = ls_sizeof_krylov_subspace; this->precond_type = precond_type; // convergence test this->conv.max_iters = max_iters; this->conv.abs_resid = abs_resid; this->conv.rel_resid = rel_resid; this->conv.norm_type = norm_type; this->conv.stype = stype; this->conv.update = update; this->conv.wrms_rtol = wrms_rtol; this->conv.wrms_atol = wrms_atol; this->conv_flag.absresid = flag_absresid; this->conv_flag.relresid = flag_relresid; this->conv_flag.update = flag_update; this->conv_flag.wrms = flag_wrms; }
void NoxSolver<Scalar>::set_precond(Teuchos::RCP<Precond<Scalar> > &pc) { this->precond_yes = true; precond = pc; prealloc_jacobian(); }
void NoxProblemInterface::set_precond(Teuchos::RCP<Precond> &pc) { precond = pc; prealloc_jacobian(); }
void NoxProblemInterface::set_precond(Precond *pc) { _F_ precond = pc; prealloc_jacobian(); }