32 const std::string
type =
"RELAXATION";
34 Ifpack2::Factory factory;
37 params_mp = Teuchos::rcp(
new Teuchos::ParameterList );
55 const Teuchos::RCP<vector_t>& b)
57 prec_mp->apply(*b, *x, Teuchos::NO_TRANS,
58 Teuchos::ScalarTraits<scalar_t>::one(),
59 Teuchos::ScalarTraits<scalar_t>::zero());
65 std::map<std::string, Smoother> map;
67 map[
"GS"] = Smoother::GAUSS_SEIDEL;
68 map[
"SGS"] = Smoother::SGS;
71 auto sm = map.find(smoother);
73 if ( sm == map.end() )
75 "No smoother '" + smoother +
"'.");
84 params_mp = Teuchos::rcp(
new Teuchos::ParameterList );
87 std::string
type =
"";
89 std::pair<bool, scalar_t> l1 = std::make_pair(
true, 1.5);
91 bool backward =
false;
92 std::pair<bool, scalar_t> fix = std::make_pair(
true, 1.0e-5);
99 type =
"Gauss-Seidel";
106 type =
"Symmetric Gauss-Seidel";
121 params_mp->set(
"relaxation: sweeps", nSweeps);
122 params_mp->set(
"relaxation: zero starting solution",
false);
123 params_mp->set(
"relaxation: damping factor", damping);
124 params_mp->set(
"relaxation: use l1", l1.first);
125 params_mp->set(
"relaxation: l1 eta", l1.second);
126 params_mp->set(
"relaxation: backward mode", backward);
127 params_mp->set(
"relaxation: fix tiny diagonal entries", fix.first);
128 params_mp->set(
"relaxation: min diagonal value", fix.second);
129 params_mp->set(
"relaxation: check diagonal entries", check);
@ JACOBI
Jacobi point relaxation.
boost::function< boost::tuple< double, bool >arguments_t)> type
Smoother
All supported Ifpack2 smoothers.
AmrSmoother(const Teuchos::RCP< const matrix_t > &A, const Smoother &smoother, lo_t nSweeps)
amr::local_ordinal_t lo_t
Teuchos::RCP< preconditioner_t > prec_mp
Preconditioner instance.
Teuchos::RCP< Teuchos::ParameterList > params_mp
Parameters of preconditioner.
void initParameter_m(const Smoother &smoother, lo_t nSweeps)
void smooth(const Teuchos::RCP< vector_t > &x, const Teuchos::RCP< vector_t > &b)
static Smoother convertToEnumSmoother(const std::string &smoother)
The base class for all OPAL exceptions.