// $Id$
// Version: $Name$
//
-// Copyright (C) 2008 by the deal.II authors
+// Copyright (C) 2008, 2010 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
* Standardized data struct to
* pipe additional flags to the
* preconditioner.
- */
+ */
struct AdditionalData
{};
* Destructor.
*/
~PreconditionBase ();
-
+
/**
* Apply the preconditioner.
*/
* case the matrix needs to be
* copied from deal.II format.
*/
- std::auto_ptr<Epetra_Map> map;
+ std::auto_ptr<Epetra_Map> vector_distributor;
};
-
+
/**
* A wrapper class for a (pointwise) Jacobi preconditioner for
* Trilinos matrices. This preconditioner works both in serial and in
* settings are 1 for the damping parameter and zero for the diagonal
* augmentation.
*
- * @ingroup TrilinosWrappers
- * @ingroup Preconditioners
+ * @ingroup TrilinosWrappers
+ * @ingroup Preconditioners
* @author Martin Kronbichler, 2008
*/
class PreconditionJacobi : public PreconditionBase
* is not too far away from the
* one we want to
* treat.
- */
+ */
struct AdditionalData
{
/**
*/
AdditionalData (const double omega = 1,
const double min_diagonal = 0);
-
+
/**
* This specifies the
* relaxation parameter in the
*/
Teuchos::RCP<Ifpack_Preconditioner> ifpack;
};
-
-
-
+
+
+
/**
* A wrapper class for a (pointwise) SSOR preconditioner for Trilinos
* matrices. This preconditioner works both in serial and in parallel,
class PreconditionSSOR : public PreconditionBase
{
public:
-
+
/**
* Standardized data struct to
* pipe additional flags to the
* in parallel, forming a
* so-called additive Schwarz
* preconditioner.
- */
+ */
struct AdditionalData
{
/**
AdditionalData (const double omega = 1,
const double min_diagonal = 0,
const unsigned int overlap = 0);
-
+
/**
* This specifies the (over-)
* relaxation parameter in the
* processor in a parallel
* application should be.
*/
- unsigned int overlap;
+ unsigned int overlap;
};
/**
*/
Teuchos::RCP<Ifpack_Preconditioner> ifpack;
};
-
-
-
+
+
+
/**
* A wrapper class for a (pointwise) SOR preconditioner for Trilinos
* matrices. This preconditioner works both in serial and in parallel,
* if and how much overlap there should be between the matrix
* partitions on the various MPI processes. The default settings are 1
* for the relaxation parameter, 0 for the diagonal augmentation and 0
- * for the overlap.
+ * for the overlap.
*
* Note that a parallel applicatoin of the SOR preconditioner is
* actually a block-Jacobi preconditioner with block size equal to the
* in parallel, forming a
* so-called additive Schwarz
* preconditioner.
- */
+ */
struct AdditionalData
{
/**
* processor in a parallel
* application should be.
*/
- unsigned int overlap;
+ unsigned int overlap;
};
/**
* are any.
*/
void initialize (const SparseMatrix &matrix,
- const AdditionalData &additional_data = AdditionalData());
+ const AdditionalData &additional_data = AdditionalData());
private:
/**
* partitions when the
* preconditioner runs in
* parallel.
- */
+ */
struct AdditionalData
{
/**
* processor in a parallel
* application should be.
*/
- unsigned int overlap;
+ unsigned int overlap;
};
/**
* partitions when the
* preconditioner runs in
* parallel.
- */
+ */
struct AdditionalData
{
/**
* processor in a parallel
* application should be.
*/
- unsigned int overlap;
+ unsigned int overlap;
};
/**
* parameter specifies the overlap of
* the partitions when the
* preconditioner runs in parallel.
- */
+ */
struct AdditionalData
{
/**
* processor in a parallel
* application should be.
*/
- unsigned int overlap;
+ unsigned int overlap;
};
/**
* Standardized data struct to
* pipe additional parameters
* to the preconditioner.
- */
+ */
struct AdditionalData
{
/**
* Constructor.
*/
AdditionalData (const unsigned int overlap = 0);
-
+
/**
* This determines how large
*/
Teuchos::RCP<Ifpack_Preconditioner> ifpack;
};
-
+
* Standardized data struct to
* pipe additional parameters
* to the preconditioner.
- */
+ */
struct AdditionalData
{
/**
const double min_eigenvalue = 1.,
const double min_diagonal = 1e-12,
const bool nonzero_starting = false);
-
+
/**
* This determines the degree of the
* Chebyshev polynomial. The degree
*/
Teuchos::RCP<Ifpack_Chebyshev> ifpack;
};
-
+
/**
ExcNonMatchingMaps("dst"));
Assert (src.vector_partitioner().SameAs(preconditioner->OperatorDomainMap()),
ExcNonMatchingMaps("src"));
-
- const int ierr = preconditioner->ApplyInverse (src.trilinos_vector(),
+
+ const int ierr = preconditioner->ApplyInverse (src.trilinos_vector(),
dst.trilinos_vector());
AssertThrow (ierr == 0, ExcTrilinosError(ierr));
}
dst.begin());
Epetra_Vector RHS (View, preconditioner->OperatorRangeMap(),
const_cast<double*>(src.begin()));
-
+
const int ierr = preconditioner->ApplyInverse (RHS, LHS);
AssertThrow (ierr == 0, ExcTrilinosError(ierr));
}
#ifdef DEAL_II_COMPILER_SUPPORTS_MPI
communicator (base.communicator),
#endif
- map (new Epetra_Map(*base.map))
+ vector_distributor (new Epetra_Map(*base.vector_distributor))
{}
parameter_list.set("smoother: sweeps",
static_cast<int>(additional_data.smoother_sweeps));
- parameter_list.set("cycle applications",
+ parameter_list.set("cycle applications",
static_cast<int>(additional_data.n_cycles));
if (additional_data.w_cycle == true)
parameter_list.set("prec type", "MGW");
else
parameter_list.set("prec type", "MGV");
-
+
parameter_list.set("smoother: Chebyshev alpha",10.);
parameter_list.set("smoother: ifpack overlap",
static_cast<int>(additional_data.smoother_overlap));
// equidistributed map; avoid
// storing the nonzero
// elements.
- map.reset (new Epetra_Map(n_rows, 0, communicator));
+ vector_distributor.reset (new Epetra_Map(n_rows, 0, communicator));
if (Matrix==0)
Matrix = std_cxx1x::shared_ptr<SparseMatrix> (new SparseMatrix());
- Matrix->reinit (*map, *map, deal_ii_sparse_matrix, drop_tolerance, true,
+ Matrix->reinit (*vector_distributor, *vector_distributor,
+ deal_ii_sparse_matrix, drop_tolerance, true,
use_this_sparsity);
initialize (*Matrix, additional_data);