33 return prec_method !=
"None";
46 if (prec_method ==
"Mean-based") {
48 buildMeanPreconditionerFactory();
50 sg_comm, sg_basis, epetraCijk,
51 base_map, sg_map, prec_factory,
54 else if (prec_method ==
"Approximate Gauss-Seidel") {
56 buildMeanPreconditionerFactory();
58 sg_comm, sg_basis, epetraCijk,
59 base_map, sg_map, prec_factory,
62 else if (prec_method ==
"Approximate Jacobi") {
64 buildMeanPreconditionerFactory();
66 sg_comm, sg_basis, epetraCijk,
67 base_map, sg_map, prec_factory,
70 else if (prec_method ==
"Approximate Schur Complement") {
72 buildMeanPreconditionerFactory();
74 sg_comm, sg_basis, epetraCijk,
75 base_map, sg_map, prec_factory,
78 #ifdef HAVE_STOKHOS_NOX
79 else if (prec_method ==
"Gauss-Seidel") {
82 sg_prec =
Teuchos::rcp(
new Stokhos::GaussSeidelPreconditioner(
83 sg_comm, sg_basis, epetraCijk,
84 base_map, sg_map, det_solver,
88 else if (prec_method ==
"Kronecker Product") {
90 buildMeanPreconditionerFactory();
91 std::string G_prec_name =
92 params->get(
"G Preconditioner Type",
"Ifpack");
94 Teuchos::rcp(&(params->sublist(
"G Preconditioner Parameters")),
false);
99 sg_comm, sg_basis, epetraCijk, base_map, sg_map,
100 mean_prec_factory, G_prec_factory, params));
102 else if (prec_method ==
"Fully Assembled") {
103 std::string prec_name =
104 params->get(
"Fully Assembled Preconditioner Type",
"Ifpack");
106 Teuchos::rcp(&(params->sublist(
"Fully Assembled Preconditioner Parameters")),
false);
110 prec_factory, params));
112 else if (prec_method ==
"None")
116 "Error! Unknown preconditioner method " << prec_method
117 <<
"." << std::endl);
126 std::string prec_name =
127 params->get(
"Mean Preconditioner Type",
"Ifpack");
129 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.