Skip to content
Snippets Groups Projects
Commit e022b1e0 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

dg : micro macro particle

parent 19588862
No related branches found
No related tags found
No related merge requests found
...@@ -93,6 +93,7 @@ class linearSystemPETSc : public linearSystem<scalar> { ...@@ -93,6 +93,7 @@ class linearSystemPETSc : public linearSystem<scalar> {
void addToRightHandSide(int row, const scalar &val); void addToRightHandSide(int row, const scalar &val);
void getFromRightHandSide(int row, scalar &val) const; void getFromRightHandSide(int row, scalar &val) const;
double normInfRightHandSide() const; double normInfRightHandSide() const;
int getNumKspIteration() const;
void addToMatrix(int row, int col, const scalar &val); void addToMatrix(int row, int col, const scalar &val);
void addToSolution(int row, const scalar &val); void addToSolution(int row, const scalar &val);
void getFromSolution(int row, scalar &val) const; void getFromSolution(int row, scalar &val) const;
...@@ -129,6 +130,7 @@ class linearSystemPETSc : public linearSystem<scalar> { ...@@ -129,6 +130,7 @@ class linearSystemPETSc : public linearSystem<scalar> {
void addToSolution(int row, const scalar &val) {} void addToSolution(int row, const scalar &val) {}
void getFromRightHandSide(int row, scalar &val) const {} void getFromRightHandSide(int row, scalar &val) const {}
void getFromSolution(int row, scalar &val) const {} void getFromSolution(int row, scalar &val) const {}
int getNumKspIteration() const {return 0;};
void zeroMatrix() {} void zeroMatrix() {}
void zeroRightHandSide() {} void zeroRightHandSide() {}
void zeroSolution() {} void zeroSolution() {}
......
...@@ -35,6 +35,14 @@ void linearSystemPETSc<scalar>::_kspCreate() ...@@ -35,6 +35,14 @@ void linearSystemPETSc<scalar>::_kspCreate()
_kspAllocated = true; _kspAllocated = true;
} }
template <class scalar>
int linearSystemPETSc<scalar>::getNumKspIteration() const
{
int n;
_try(KSPGetIterationNumber(_ksp, &n));
return n;
}
template <class scalar> template <class scalar>
linearSystemPETSc<scalar>::linearSystemPETSc(MPI_Comm com) linearSystemPETSc<scalar>::linearSystemPETSc(MPI_Comm com)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment