PETSC vector for linear algebra. More...
PETSC vector for linear algebra.
This vector wrap the PETSC vector for solving linear systems
Definition at line 104 of file Vector_petsc.hpp.
#include <Vector_petsc.hpp>
Public Member Functions | |
| Vector (const Vector< T, PETSC_BASE > &v) | |
| Copy the vector.  More... | |
| Vector (Vector< T, PETSC_BASE > &&v) | |
| Copy the vector.  More... | |
| ~Vector () | |
| Destroy the vector.  More... | |
| Vector (size_t n, size_t n_row_local) | |
| Create a vector with n elements.  More... | |
| Vector () | |
| Create a vector with 0 elements.  More... | |
| void | resize (size_t row, size_t l_row) | 
| Resize the Vector.  More... | |
| void | insert (size_t i, T val) | 
| Return a reference to the vector element.  More... | |
| PetscScalar & | insert (size_t i) | 
| Return a reference to the vector element.  More... | |
| const PetscScalar & | insert (size_t i) const | 
| Return a reference to the vector element.  More... | |
| const PetscScalar & | operator() (size_t i) const | 
| Return a reference to the vector element.  More... | |
| PetscScalar & | operator() (size_t i) | 
| Return a reference to the vector element.  More... | |
| const Vec & | getVec () const | 
| Get the PETSC Vector object.  More... | |
| Vec & | getVec () | 
| Get the PETSC Vector object.  More... | |
| void | update () | 
| Update the Vector with the PETSC object.  More... | |
| Vector< T, PETSC_BASE > & | operator= (const Vector< T, PETSC_BASE > &v) | 
| Copy the vector.  More... | |
| Vector< T, PETSC_BASE > & | operator= (Vector< T, PETSC_BASE > &&v) | 
| Copy the vector.  More... | |
| void | setZero () | 
| Set to zero all the entries.  More... | |
Private Member Functions | |
| void | setPetsc () const | 
| Set the Eigen internal vector.  More... | |
Private Attributes | |
| size_t | n_row | 
| Number of row the petsc vector has.  | |
| size_t | n_row_local | 
| Number of local rows.  | |
| bool | v_created = false | 
| Indicate if v has been allocated.  | |
| Vec | v | 
| Mutable vector.  | |
| 
openfpm::vector< rval < PetscScalar, PETSC_RVAL > , HeapMemory, typename memory_traits_inte< rval < PetscScalar, PETSC_RVAL > >::type, memory_traits_inte >  | row_val | 
| Mutable row value vector.  | |
| 
std::unordered_map< size_t,  size_t >  | map | 
| Global to local map.  | |
| T | invalid | 
| invalid  | |
Destroy the vector.
Definition at line 175 of file Vector_petsc.hpp.
Create a vector with n elements.
| n | global number of elements in the vector | 
| n_row_local | number | 
Definition at line 187 of file Vector_petsc.hpp.
Create a vector with 0 elements.
Definition at line 199 of file Vector_petsc.hpp.
      
  | 
  inline | 
Get the PETSC Vector object.
Definition at line 320 of file Vector_petsc.hpp.
      
  | 
  inline | 
Get the PETSC Vector object.
Definition at line 332 of file Vector_petsc.hpp.
      
  | 
  inline | 
Return a reference to the vector element.
| i | element | 
| val | value | 
Definition at line 226 of file Vector_petsc.hpp.
      
  | 
  inline | 
Return a reference to the vector element.
| i | element | 
Definition at line 244 of file Vector_petsc.hpp.
      
  | 
  inline | 
Return a reference to the vector element.
| i | element | 
Definition at line 262 of file Vector_petsc.hpp.
      
  | 
  inline | 
Return a reference to the vector element.
| i | element | 
Definition at line 282 of file Vector_petsc.hpp.
      
  | 
  inline | 
Return a reference to the vector element.
| i | element | 
Definition at line 303 of file Vector_petsc.hpp.
      
  | 
  inline | 
Resize the Vector.
| row | numbers of row | 
| l_row | number of local row | 
Definition at line 212 of file Vector_petsc.hpp.
      
  | 
  inlineprivate | 
Set the Eigen internal vector.
Definition at line 131 of file Vector_petsc.hpp.
      
  | 
  inline | 
Set to zero all the entries.
Definition at line 406 of file Vector_petsc.hpp.
      
  | 
  inline | 
Update the Vector with the PETSC object.
Definition at line 342 of file Vector_petsc.hpp.