34 #ifndef petscsparsemtrx_h 35 #define petscsparsemtrx_h 41 #define _IFT_PetscSparseMtrx_Name "petsc" 81 virtual void times(
double x);
83 virtual void addDiagonal(
double x,
FloatArray &m);
89 virtual int assembleBegin();
90 virtual int assembleEnd();
96 virtual double computeNorm()
const;
97 virtual double &at(
int i,
int j);
98 virtual double at(
int i,
int j)
const;
99 virtual void toFloatMatrix(
FloatMatrix &answer)
const;
100 virtual void printStatistics()
const;
101 virtual void printYourself()
const;
102 void printMatlab()
const;
104 virtual bool isAsymmetric()
const;
105 virtual void writeToFile(
const char *fname)
const;
109 void createVecGlobal(Vec *answer)
const;
111 int scatterG2L(Vec src,
FloatArray &dest)
const;
116 int scatterL2G(
const FloatArray &src, Vec dest)
const;
120 bool giveSymmetryFlag()
const;
121 int setOption(MatOption op, PetscBool flag);
123 int giveDomainIndex()
const;
Base class for all matrices stored in sparse format.
virtual bool canBeFactorized() const
Determines, whether receiver can be factorized.
KSP ksp
Linear solver context.
Class implementing an array of integers.
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
Implements the solution of linear system of equation in the form using solvers from PETSc library...
bool kspInit
Flag if context initialized.
virtual SparseMtrx * factorized()
Returns the receiver factorized.
virtual FloatArray * backSubstitutionWith(FloatArray &y) const
Computes the solution of linear system where A is receiver.
IS localIS
Context or scattering/collecting parallel PETSc vectors.
bool newValues
Flag if matrix has changed since last solve.
virtual const char * giveClassName() const
Abstract base class representing the "problem" under consideration.
the oofem namespace is to define a context or scope in which all oofem names are defined.
This class provides an sparse matrix interface to PETSc Matrices.