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

dg : parallel block jacobi matrix free

parent a760bf78
No related branches found
No related tags found
No related merge requests found
...@@ -103,7 +103,9 @@ void linearSystemPETSc<scalar>::allocate(int nbRows) ...@@ -103,7 +103,9 @@ void linearSystemPETSc<scalar>::allocate(int nbRows)
_try(MatAppendOptionsPrefix(_a, this->_parameters["petscPrefix"].c_str())); _try(MatAppendOptionsPrefix(_a, this->_parameters["petscPrefix"].c_str()));
_try(MatSetFromOptions(_a)); _try(MatSetFromOptions(_a));
_try(MatGetOwnershipRange(_a, &_localRowStart, &_localRowEnd)); _try(MatGetOwnershipRange(_a, &_localRowStart, &_localRowEnd));
_try(MatGetSize(_a, &_globalSize, &_localSize)); int nbColumns;
_localSize = _localRowEnd - _localRowStart;
_try(MatGetSize(_a, &_globalSize, &nbColumns));
// preallocation option must be set after other options // preallocation option must be set after other options
_try(VecCreate(PETSC_COMM_WORLD, &_x)); _try(VecCreate(PETSC_COMM_WORLD, &_x));
_try(VecSetSizes(_x, nbRows, PETSC_DETERMINE)); _try(VecSetSizes(_x, nbRows, PETSC_DETERMINE));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment