*/
template<class VECTOR>
void vmult (VECTOR&, const VECTOR&) const;
+
/**
* Apply transpose
* preconditioner. Since this is
};
+
/**
* Preconditioner using a matrix-builtin function.
* This class forms a preconditioner suitable for the LAC solver
};
+
/**
* Base class for other preconditioners.
* Here, only some common features Jacobi, SOR and SSOR preconditioners
* reasons. It defaults to 1.
*/
void initialize (const MATRIX& A, const double omega = 1.);
+
protected:
/**
* Pointer to the matrix object.
*/
SmartPointer<const MATRIX> A;
+
/**
* Relaxation parameter.
*/
double omega;
};
+
+
/**
* Jacobi preconditioner using matrix built-in function. The MATRIX
* class used is required to have a function
*/
template<class VECTOR>
void vmult (VECTOR&, const VECTOR&) const;
+
/**
* Apply transpose
* preconditioner.
};
+
/**
* SSOR preconditioner using matrix built-in function. The MATRIX
* class used is required to have a function
*/
template<class VECTOR>
void vmult (VECTOR&, const VECTOR&) const;
+
/**
* Apply transpose
* preconditioner. Since this is
*
* @author Guido Kanschat, 1999
*/
-template<class SOLVER, class MATRIX = SparseMatrix<double>, class PRECONDITION = PreconditionIdentity>
+template<class SOLVER, class MATRIX = SparseMatrix<double>, class PRECONDITION = PreconditionIdentity>
class PreconditionLACSolver
{
public:
PreconditionLACSolver(SOLVER&,
const MATRIX&,
const PRECONDITION&);
+
/**
* Execute preconditioning.
*/
* The solver class to use.
*/
SOLVER& solver;
+
/**
* The matrix in use.
*/
const MATRIX& matrix;
+
/**
* The preconditioner to use.
*/
};
+
/**
* Matrix with preconditioner.
* Given a matrix $A$ and a preconditioner $P$, this class implements a new matrix
* with the matrix-vector product $PA$. It needs an auxiliary vector for that.
*
* By this time, this is considered a temporary object to be plugged
- * into eigenvalue solvers. Therefore, no @p SmartPointer is used for
- * @p A and @p P.
+ * into eigenvalue solvers. Therefore, no @p{SmartPointer} is used for
+ * @p{A} and @p{P}.
*
* @author Guido Kanschat, 2000
*/
dst = src;
}
+
+
template<class VECTOR>
inline void
PreconditionIdentity::Tvmult (VECTOR& dst, const VECTOR& src) const
}
+
template <class MATRIX>
template<class VECTOR>
inline void
}
+
template <class MATRIX>
template<class VECTOR>
inline void
}
+
template <class MATRIX>
template<class VECTOR>
inline void
{}
+
template<class MATRIX, class VECTOR>
void
PreconditionUseMatrix<MATRIX,VECTOR>::vmult (VECTOR& dst,
solver(solver), matrix(matrix), precondition(precondition)
{}
+
+
template<class SOLVER, class MATRIX, class PRECONDITION>
template<class VECTOR>
void
}
+
template<class MATRIX, class PRECOND, class VECTOR>
inline void
PreconditionedMatrix<MATRIX, PRECOND, VECTOR>
}
+
template<class MATRIX, class PRECOND, class VECTOR>
inline double
PreconditionedMatrix<MATRIX, PRECOND, VECTOR>