Skip to content
Snippets Groups Projects
Commit 5cbb73df authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix compile

parent 72ebc912
No related branches found
No related tags found
No related merge requests found
...@@ -262,7 +262,7 @@ class linearSystemPETSc : public linearSystem<scalar> { ...@@ -262,7 +262,7 @@ class linearSystemPETSc : public linearSystem<scalar> {
} }
Mat &getMatrix(){ return _a; } Mat &getMatrix(){ return _a; }
std::vector<double> getData() std::vector<scalar> getData()
{ {
_try(MatAssemblyBegin(_a, MAT_FINAL_ASSEMBLY)); _try(MatAssemblyBegin(_a, MAT_FINAL_ASSEMBLY));
_try(MatAssemblyEnd(_a, MAT_FINAL_ASSEMBLY)); _try(MatAssemblyEnd(_a, MAT_FINAL_ASSEMBLY));
...@@ -270,7 +270,7 @@ class linearSystemPETSc : public linearSystem<scalar> { ...@@ -270,7 +270,7 @@ class linearSystemPETSc : public linearSystem<scalar> {
_try(MatGetArray(_a,&v)); _try(MatGetArray(_a,&v));
MatInfo info; MatInfo info;
_try(MatGetInfo(_a,MAT_LOCAL,&info)); _try(MatGetInfo(_a,MAT_LOCAL,&info));
std::vector<double> data; // Maybe I should reserve or resize (SAM) std::vector<scalar> data; // Maybe I should reserve or resize (SAM)
for (int i = 0; i < info.nz_allocated; i++) for (int i = 0; i < info.nz_allocated; i++)
data.push_back(v[i]); data.push_back(v[i]);
_try(MatRestoreArray(_a,&v)); _try(MatRestoreArray(_a,&v));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment