Skip to content
Snippets Groups Projects
Commit 91a1637d authored by Gauthier Becker's avatar Gauthier Becker
Browse files

full DG non linear shell seems works

create NonLinearSystem (have Fext and Fint separately in system)
default implementation for explicit hulbert chung scheme (no need of
petsc)
parent 0a785e3f
No related branches found
No related tags found
No related merge requests found
...@@ -19,9 +19,9 @@ template <class scalar> ...@@ -19,9 +19,9 @@ template <class scalar>
class linearSystemGmm : public linearSystem<scalar> { class linearSystemGmm : public linearSystem<scalar> {
protected: protected:
std::vector<scalar> *_x; // the nonLinearSystemGmm has to access to this vector std::vector<scalar> *_x; // the nonLinearSystemGmm has to access to this vector
std::vector<scalar> *_b; // idem
private: private:
gmm::row_matrix<gmm::wsvector<scalar> > *_a; gmm::row_matrix<gmm::wsvector<scalar> > *_a;
std::vector<scalar> *_b;
double _prec; double _prec;
int _noisy, _gmres; int _noisy, _gmres;
public: public:
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
#include <petsc.h> #include <petsc.h>
#include <petscksp.h> #include <petscksp.h>
#include "linearSystemPETSc.h" #include "linearSystemPETSc.h"
static void _try(int ierr) static void _try(int ierr)
{ {
CHKERRABORT(PETSC_COMM_WORLD, ierr); CHKERRABORT(PETSC_COMM_WORLD, ierr);
} }
template <class scalar> template <class scalar>
void linearSystemPETSc<scalar>::_kspCreate() void linearSystemPETSc<scalar>::_kspCreate()
{ {
_try(KSPCreate(PETSC_COMM_WORLD, &_ksp)); _try(KSPCreate(PETSC_COMM_WORLD, &_ksp));
PC pc; PC pc;
...@@ -120,7 +120,7 @@ void linearSystemPETSc<scalar>::allocate(int nbRows) ...@@ -120,7 +120,7 @@ void linearSystemPETSc<scalar>::allocate(int nbRows)
} }
template <class scalar> template <class scalar>
void linearSystemPETSc<scalar>::print() void linearSystemPETSc<scalar>::print()
{ {
_try(MatAssemblyBegin(_a, MAT_FINAL_ASSEMBLY)); _try(MatAssemblyBegin(_a, MAT_FINAL_ASSEMBLY));
_try(MatAssemblyEnd(_a, MAT_FINAL_ASSEMBLY)); _try(MatAssemblyEnd(_a, MAT_FINAL_ASSEMBLY));
...@@ -254,7 +254,7 @@ int linearSystemPETSc<scalar>::systemSolve() ...@@ -254,7 +254,7 @@ int linearSystemPETSc<scalar>::systemSolve()
//Msg::Info("%d iterations", its); //Msg::Info("%d iterations", its);
return 1; return 1;
} }
template <class scalar> template <class scalar>
std::vector<scalar> linearSystemPETSc<scalar>::getData() std::vector<scalar> linearSystemPETSc<scalar>::getData()
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment