19#include <petscsystypes.h>
41template <
typename MatrixOrVector>
48template <
typename MatrixOrVector>
55template <
typename MatrixOrVector>
62template <
typename MatrixOrVector>
69template <
typename MatrixOrVector>
77template <
typename MatrixOrVector>
82template <
typename MatrixOrVector>
86template <
typename MatrixOrVector>
90template <
typename MatrixOrVector>
93template <
typename MatrixOrVector>
109template <
typename Matrix>
120template <
typename Matrix,
typename Vector>
121void matMult(Matrix
const& A, Vector
const& x, Vector& y)
133template <
typename Matrix,
typename Vector>
163void copy(PETScVector
const& x, PETScVector& y);
175 PETScVector
const& x);
179void copy(PETScMatrix
const& A, PETScMatrix& B);
193void matMult(PETScMatrix
const& A, PETScVector
const& x, PETScVector& y);
196void matMultAdd(PETScMatrix
const& A, PETScVector
const&
v1,
197 PETScVector
const&
v2, PETScVector&
v3);
202 PETScVector
const& b, PETScVector&
new_b);
235void set(EigenVector& x,
double const a);
237void copy(EigenVector
const& x, EigenVector& y);
239void scale(EigenVector& x,
double const a);
242void aypx(EigenVector& y,
double const a, EigenVector
const& x);
245void axpy(EigenVector& y,
double const a, EigenVector
const& x);
248void axpby(EigenVector& y,
double const a,
double const b,
249 EigenVector
const& x);
253void copy(EigenMatrix
const& A, EigenMatrix& B);
256void scale(EigenMatrix& A,
double const a);
259void aypx(EigenMatrix& Y,
double const a, EigenMatrix
const& X);
262void axpy(EigenMatrix& Y,
double const a, EigenMatrix
const& X);
267void matMult(EigenMatrix
const& A, EigenVector
const& x, EigenVector& y);
270void matMultAdd(EigenMatrix
const& A, EigenVector
const&
v1,
271 EigenVector
const&
v2, EigenVector&
v3);
275 EigenVector
const& b, EigenVector&
new_b);
296template <
typename VectorType>
302 OGS_FATAL(
"An invalid norm type has been passed");
313 if (
norm_x > std::numeric_limits<double>::epsilon())
319 if (
norm_diff < std::numeric_limits<double>::epsilon())
325 return norm_diff / std::numeric_limits<double>::epsilon();
double norm(MatrixOrVector const &x, MathLib::VecNormType type)
void linearSysNormalize(PETScMatrix const &, PETScMatrix &, PETScVector const &, PETScVector &)
void finalizeAssembly(PETScMatrix &A)
double norm1(PETScVector const &x)
double normMax(PETScVector const &x)
void copy(PETScVector const &x, PETScVector &y)
void componentwiseDivide(PETScVector &w, PETScVector const &x, PETScVector const &y)
void setLocalAccessibleVector(PETScVector const &x)
void set(PETScVector &x, PetscScalar const a)
void matMult(PETScMatrix const &A, PETScVector const &x, PETScVector &y)
double computeRelativeNorm(VectorType const &x, VectorType const &y, MathLib::VecNormType norm_type)
void matMultAdd(PETScMatrix const &A, PETScVector const &v1, PETScVector const &v2, PETScVector &v3)
double norm2(PETScVector const &x)
void scale(PETScVector &x, PetscScalar const a)
void aypx(PETScVector &y, PetscScalar const a, PETScVector const &x)
void axpy(PETScVector &y, PetscScalar const a, PETScVector const &x)
void axpby(PETScVector &y, PetscScalar const a, PetscScalar const b, PETScVector const &x)