Feel++
0.91.0
|
Public Types | |
typedef super::graph_type | graph_type |
typedef super::graph_ptrtype | graph_ptrtype |
typedef super::value_type | value_type |
Public Member Functions | |
MatrixPetscMPI (DataMap const &dmRow, DataMap const &dmCol, WorldComm const &worldComm=WorldComm()) | |
MatrixPetscMPI (Mat m, DataMap const &dmRow, DataMap const &dmCol) | |
void | init (const size_type m, const size_type n, const size_type m_l, const size_type n_l, const size_type nnz=30, const size_type noz=10) |
void | init (const size_type m, const size_type n, const size_type m_l, const size_type n_l, graph_ptrtype const &graph) |
size_type | size1 () const |
size_type | size2 () const |
size_type | rowStart () const |
size_type | rowStop () const |
size_type | colStart () const |
size_type | colStop () const |
void | set (const size_type i, const size_type j, const value_type &value) |
void | add (const size_type i, const size_type j, const value_type &value) |
void | addMatrix (const ublas::matrix< value_type > &dm, const std::vector< size_type > &rows, const std::vector< size_type > &cols) |
void | addMatrix (int *rows, int nrows, int *cols, int ncols, value_type *data) |
void | zero () |
void | zero (size_type start1, size_type stop1, size_type start2, size_type stop2) |
void | zeroRows (std::vector< int > const &rows, std::vector< value_type > const &values, Vector< value_type > &rhs, Context const &on_context) |
void Feel::MatrixPetscMPI< T >::add | ( | const size_type | i, |
const size_type | j, | ||
const value_type & | value | ||
) | [inline, virtual] |
Add value
to the element (i,j). Throws an error if the entry does not exist. Still, it is allowed to store zero values in non-existent fields.
Reimplemented from Feel::MatrixPetsc< T >.
void Feel::MatrixPetscMPI< T >::addMatrix | ( | const ublas::matrix< value_type > & | dm, |
const std::vector< size_type > & | rows, | ||
const std::vector< size_type > & | cols | ||
) | [virtual] |
Add the full matrix to the Petsc matrix. This is useful for adding an element matrix at assembly time
Reimplemented from Feel::MatrixPetsc< T >.
void Feel::MatrixPetscMPI< T >::addMatrix | ( | int * | rows, |
int | nrows, | ||
int * | cols, | ||
int | ncols, | ||
value_type * | data | ||
) | [virtual] |
Add the full matrix to the Petsc matrix. This is useful for adding an element matrix at assembly time
Reimplemented from Feel::MatrixPetsc< T >.
void Feel::MatrixPetscMPI< T >::init | ( | const size_type | m, |
const size_type | n, | ||
const size_type | m_l, | ||
const size_type | n_l, | ||
const size_type | nnz = 30 , |
||
const size_type | noz = 10 |
||
) | [virtual] |
Initialize a Petsc matrix that is of global dimension with local dimensions
.
nnz
is the number of on-processor nonzeros per row (defaults to 30). noz
is the number of on-processor nonzeros per row (defaults to 30).
n_nz, PETSC_NULL, n_oz, PETSC_NULL, &_M_mat);
Reimplemented from Feel::MatrixPetsc< T >.
void Feel::MatrixPetscMPI< T >::init | ( | const size_type | m, |
const size_type | n, | ||
const size_type | m_l, | ||
const size_type | n_l, | ||
graph_ptrtype const & | graph | ||
) | [virtual] |
Initialize using sparsity structure computed by dof_map
.
Reimplemented from Feel::MatrixPetsc< T >.
size_type Feel::MatrixPetscMPI< T >::rowStart | ( | ) | const [inline, virtual] |
return row_start, the index of the first matrix row stored on this processor
Reimplemented from Feel::MatrixPetsc< T >.
size_type Feel::MatrixPetscMPI< T >::rowStop | ( | ) | const [inline, virtual] |
return row_stop, the index of the last matrix row (+1) stored on this processor
Reimplemented from Feel::MatrixPetsc< T >.
void Feel::MatrixPetscMPI< T >::set | ( | const size_type | i, |
const size_type | j, | ||
const value_type & | value | ||
) | [inline, virtual] |
Set the element (i,j) to
value
. Throws an error if the entry does not exist. Still, it is allowed to store zero values in non-existent fields.
Reimplemented from Feel::MatrixPetsc< T >.
size_type Feel::MatrixPetscMPI< T >::size1 | ( | ) | const [inline, virtual] |
m
, the row-dimension of the matrix where the marix is Reimplemented from Feel::MatrixPetsc< T >.
size_type Feel::MatrixPetscMPI< T >::size2 | ( | ) | const [inline, virtual] |
n
, the column-dimension of the matrix where the marix is Reimplemented from Feel::MatrixPetsc< T >.
void Feel::MatrixPetscMPI< T >::zero | ( | ) | [virtual] |
Set all entries to 0. This method retains sparsity structure.
Reimplemented from Feel::MatrixPetsc< T >.
void Feel::MatrixPetscMPI< T >::zero | ( | size_type | start1, |
size_type | stop1, | ||
size_type | start2, | ||
size_type | stop2 | ||
) | [virtual] |
Set all entries to 0 in the range [start1-stop1,start2-stop2]. This method retains sparsity structure.
Reimplemented from Feel::MatrixPetsc< T >.
void Feel::MatrixPetscMPI< T >::zeroRows | ( | std::vector< int > const & | rows, |
std::vector< value_type > const & | values, | ||
Vector< value_type > & | rhs, | ||
Context const & | on_context | ||
) | [virtual] |
eliminate row without change pattern, and put 1 on the diagonal entry
Reimplemented from Feel::MatrixPetsc< T >.
References Feel::VectorPetscMPI< T >::close(), Feel::Vector< T >::set(), and Feel::VectorPetsc< T >::vec().