65 return prec_method !=
"None";
78 if (prec_method ==
"Mean-based") {
80 buildMeanPreconditionerFactory();
82 sg_comm, sg_basis, epetraCijk,
83 base_map, sg_map, prec_factory,
86 else if (prec_method ==
"Approximate Gauss-Seidel") {
88 buildMeanPreconditionerFactory();
90 sg_comm, sg_basis, epetraCijk,
91 base_map, sg_map, prec_factory,
94 else if (prec_method ==
"Approximate Jacobi") {
96 buildMeanPreconditionerFactory();
98 sg_comm, sg_basis, epetraCijk,
99 base_map, sg_map, prec_factory,
102 else if (prec_method ==
"Approximate Schur Complement") {
104 buildMeanPreconditionerFactory();
106 sg_comm, sg_basis, epetraCijk,
107 base_map, sg_map, prec_factory,
110 #ifdef HAVE_STOKHOS_NOX
111 else if (prec_method ==
"Gauss-Seidel") {
114 sg_prec =
Teuchos::rcp(
new Stokhos::GaussSeidelPreconditioner(
115 sg_comm, sg_basis, epetraCijk,
116 base_map, sg_map, det_solver,
120 else if (prec_method ==
"Kronecker Product") {
122 buildMeanPreconditionerFactory();
123 std::string G_prec_name =
124 params->get(
"G Preconditioner Type",
"Ifpack");
126 Teuchos::rcp(&(params->sublist(
"G Preconditioner Parameters")),
false);
131 sg_comm, sg_basis, epetraCijk, base_map, sg_map,
132 mean_prec_factory, G_prec_factory, params));
134 else if (prec_method ==
"Fully Assembled") {
135 std::string prec_name =
136 params->get(
"Fully Assembled Preconditioner Type",
"Ifpack");
138 Teuchos::rcp(&(params->sublist(
"Fully Assembled Preconditioner Parameters")),
false);
142 prec_factory, params));
144 else if (prec_method ==
"None")
148 "Error! Unknown preconditioner method " << prec_method
149 <<
"." << std::endl);
158 std::string prec_name =
159 params->get(
"Mean Preconditioner Type",
"Ifpack");
161 Teuchos::rcp(¶ms->sublist(
"Mean Preconditioner Parameters"),
false);
A stochastic preconditioner based on applying one iteration of approximate Gauss-Seidel.
A stochastic preconditioner based on applying two iterations of approximate Jacobi.
T & get(ParameterList &l, const std::string &name)
A stochastic preconditioner based on applying the inverse of the mean.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
A stochastic preconditioner based on applying a preconditioner to the fully assembled operator...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual bool isPrecSupported() const
Return whether a preconditioner will be supported.
SGPreconditionerFactory(const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Constructor.
virtual Teuchos::RCP< Stokhos::SGPreconditioner > build(const Teuchos::RCP< const EpetraExt::MultiComm > &sg_comm, const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > &sg_basis, const Teuchos::RCP< const Stokhos::EpetraSparse3Tensor > &epetraCijk, const Teuchos::RCP< const Epetra_Map > &base_map, const Teuchos::RCP< const Epetra_Map > &sg_map)
Build preconditioner operator.
Teuchos::RCP< Teuchos::ParameterList > params
Preconditioner parameters.
Teuchos::RCP< Stokhos::AbstractPreconditionerFactory > buildMeanPreconditionerFactory()
Build preconditioner factory for mean.
An class for building preconditioners.
std::string prec_method
Preconditioner method.
A stochastic preconditioner based on applying the approximate Schur complement preconditioner as defi...
An Epetra operator representing applying the mean in a block stochastic Galerkin expansion.