Skip to content
Snippets Groups Projects
Commit 79bc0684 authored by Markus Blatt's avatar Markus Blatt
Browse files

Merged changes I made on the other laptop (before it broke).

These are again mainly documentation fixes.

[[Imported from SVN: r766]]
parent 0b06cd77
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,10 @@
*/
namespace Dune {
/**
* @addtogroup ISTL_SPMV
* @{
*/
/** \brief A block-diagonal matrix
\todo It would be safer and more efficient to have a real implementation of
......@@ -93,7 +96,7 @@ namespace Dune {
void addindex (size_type row, size_type col) {}
void endindices () {}
};
/** @}*/
} // end namespace Dune
......
......@@ -330,6 +330,23 @@ namespace Dune {
return out;
}
//! y = A x
template <class X, class Y>
void mv(const X& x, Y& y) const
{
#ifdef DUNE_ISTL_WITH_CHECKING
if (x.N()!=M()) DUNE_THROW(ISTLError,"vector/matrix size mismatch!");
if (y.N()!=N()) DUNE_THROW(ISTLError,"vector/matrix size mismatch!");
#endif
for (int i=0; i<data_.size(); i++) {
y[i]=0;
for (int j=0; j<cols_; j++)
(*this)[i][j].umv(x[j], y[i]);
}
}
//! y += A x
template <class X, class Y>
void umv(const X& x, Y& y) const
......
......@@ -136,8 +136,7 @@ namespace Dune {
//! apply operator to x: \f$ y = A(x) \f$
virtual void apply (const X& x, Y& y) const
{
y = 0;
_A_.umv(x,y);
_A_.mv(x,y);
}
//! apply operator to x, scale and add: \f$ y = y + \alpha A(x) \f$
......
......@@ -19,8 +19,30 @@
namespace Dune {
/** @defgroup ISTL_Prec Preconditioners
@ingroup ISTL_Solvers
* @ingroup ISTL_Solvers
*
* All of our \ref ISTL_Solvers "Krylow solvers" are preconditioned versions.
* There are sequential precondiotioner (e,g. SeqJacobi, SeqSOR, SeqSSOR) as well as parallel preconditioners
* (e.g. Amg, BlockPreconditioner) available for plugging them into the solvers
* together with matching ScalarProducts.
*
* Some of the available perconditioners (e.g. SeqJacobi, SeqSOR, SeqSSOR))
* may be given an aditional int as a template parameter, the block recursion level.
* These preconditioners
* can be used on blockrecursive matrices with an arbitrary hierarchy depths
* (eg. BCRSMatrix<BCRSMatrix<FieldMatrix,n,m> > >. Given a block recursion level
* \f$k\f$ those preconditioners work as
* normal on the offdiagonal blocks, treating them as traditional matrix
* entries. For the diagonal values a special procedure applies: If
* \f$k>1\f$ the diagonal is treated as a matrix itself and the preconditioner
* is applied recursively on the matrix representing the diagonal value
* \f$D=A_{ii}\f$ with block level \f$k-1\f$. For the case that \f$k=1\f$ the diagonal
* is treated as a
* matrix entry resulting in a linear solve or an identity operation
* depending on the algorithm.
*/
*/
/** @addtogroup ISTL_Prec
@{
*/
......
......@@ -29,6 +29,26 @@
namespace Dune {
/**
* @defgroup ISTL_Parallel Parallel Solvers
* @ingroup ISTL_Solvers
* Instead of using parallel data structures (matrices and vectors) that
* (implicitly) know the data distribution and communication patterns,
* there is a clear separation of the parallel data composition together
* with the communication APIs from the data structures. This allows for
* implementing overalapping and nonoverlapping domain decompositions as
* well as data parallel parallelisation aproaches.
*
* The \ref ISTL_Solvers "solvers" can easily be turned into parallel solvers
* initializing them with matching parallel subclasses of the the base classes
* ScalarProduct, Preconditioner and LinearOperator.
*
* The information of the data distribution is provided by OwnerOverlapCopyCommunication
* of \ref ISTL_Comm "communication API".
*
* Currently only data parallel versions are shipped with dune-istl. Domain
* decomposition can be found in module dune-dd.
*/
/**
@addtogroup ISTL_Operators
@{
......
......@@ -506,7 +506,7 @@ namespace Dune {
// convergence test
double defnew=_sp.norm(b); // comp defect norm
if (_verbose>1) // print
printf("%5d %12.4E %12.4g\n",i,defnew,defnew/def);
printf("%5d %12.4E %12.4E\n",i,defnew,defnew/def);
def = defnew; // update norm
if (def<def0*_reduction || def<1E-30 || i==_maxit) // convergence check
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment