#include <Petsc.hpp>
|
| static Vector | allocate (const std::string &name="") |
| | Allocates a new vector on the given MPI communicator.
|
| static Vector | allocate (Vector &other, const std::string &name="") |
| static Vector | allocate (Vec &other, const std::string &name="") |
| | Allocated an uninitialized vector of identical shape.
|
| static Vector | allocate (Matrix &m, const std::string &name="", LEFTRIGHT type=LEFT) |
| | Allocates a vector with the same number of rows (default) or columns.
|
| static Vector | allocate (Mat &m, const std::string &name="", LEFTRIGHT type=LEFT) |
| | Allocates a vector with the same number of rows (default) or columns.
|
Definition at line 54 of file Petsc.hpp.
◆ LEFTRIGHT
◆ Vector() [1/4]
| precice::utils::petsc::Vector::Vector |
( |
const std::string & | name = "" | ) |
|
|
explicit |
Creates a new vector on the given MPI communicator.
Definition at line 181 of file Petsc.cpp.
◆ Vector() [2/4]
| precice::utils::petsc::Vector::Vector |
( |
const Vector & | other | ) |
|
Copy construction from another vector Duplicates the vector and copies the name
Definition at line 152 of file Petsc.cpp.
◆ Vector() [3/4]
| precice::utils::petsc::Vector::Vector |
( |
Vector && | other | ) |
|
|
noexcept |
Move construction Takes ownership of the other vector.
Definition at line 169 of file Petsc.cpp.
◆ Vector() [4/4]
| precice::utils::petsc::Vector::Vector |
( |
Vec & | other, |
|
|
const std::string & | name = "" ) |
Constructs the object from another Vec Takes ownership of the other Vec
Definition at line 191 of file Petsc.cpp.
◆ ~Vector()
| precice::utils::petsc::Vector::~Vector |
( |
| ) |
|
◆ allocate() [1/5]
| Vector precice::utils::petsc::Vector::allocate |
( |
const std::string & | name = "" | ) |
|
|
static |
Allocates a new vector on the given MPI communicator.
Definition at line 207 of file Petsc.cpp.
◆ allocate() [2/5]
| Vector precice::utils::petsc::Vector::allocate |
( |
Mat & | m, |
|
|
const std::string & | name = "", |
|
|
LEFTRIGHT | type = LEFT ) |
|
static |
Allocates a vector with the same number of rows (default) or columns.
Definition at line 231 of file Petsc.cpp.
◆ allocate() [3/5]
Allocates a vector with the same number of rows (default) or columns.
Definition at line 226 of file Petsc.cpp.
◆ allocate() [4/5]
| Vector precice::utils::petsc::Vector::allocate |
( |
Vec & | other, |
|
|
const std::string & | name = "" ) |
|
static |
Allocated an uninitialized vector of identical shape.
Definition at line 217 of file Petsc.cpp.
◆ allocate() [5/5]
| Vector precice::utils::petsc::Vector::allocate |
( |
Vector & | other, |
|
|
const std::string & | name = "" ) |
|
static |
Allocated an uninitialized vector of identical shape. Duplicates type, row layout etc. (not values) of v.
Definition at line 212 of file Petsc.cpp.
◆ arange()
| void precice::utils::petsc::Vector::arange |
( |
double | start, |
|
|
double | stop ) |
◆ assemble()
| void precice::utils::petsc::Vector::assemble |
( |
| ) |
|
◆ copyFrom()
◆ copyTo()
◆ fillWithRandoms()
| void precice::utils::petsc::Vector::fillWithRandoms |
( |
| ) |
|
◆ getLocalSize()
| PetscInt precice::utils::petsc::Vector::getLocalSize |
( |
| ) |
const |
◆ getSize()
| PetscInt precice::utils::petsc::Vector::getSize |
( |
| ) |
const |
◆ init()
| void precice::utils::petsc::Vector::init |
( |
PetscInt | rows | ) |
|
Sets the size and calls VecSetFromOptions.
Definition at line 256 of file Petsc.cpp.
◆ l2norm()
| double precice::utils::petsc::Vector::l2norm |
( |
| ) |
const |
returns the l2-norm of the vector
Definition at line 396 of file Petsc.cpp.
◆ operator Vec &()
| precice::utils::petsc::Vector::operator Vec & |
( |
| ) |
|
Enables implicit conversion into a reference to a PETSc Vec type.
Definition at line 251 of file Petsc.cpp.
◆ operator=() [1/2]
| Vector & precice::utils::petsc::Vector::operator= |
( |
const Vector & | other | ) |
|
Copy assignment Destroys the current vector and takes ownership of the other.
Definition at line 162 of file Petsc.cpp.
◆ operator=() [2/2]
| Vector & precice::utils::petsc::Vector::operator= |
( |
Vector && | other | ) |
|
|
noexcept |
Move assignment Destroys the current vector and takes ownership of the other.
Definition at line 175 of file Petsc.cpp.
◆ ownerRange()
| std::pair< PetscInt, PetscInt > precice::utils::petsc::Vector::ownerRange |
( |
| ) |
const |
Returns a pair that mark the beginning and end of the vectors ownership range. Use first and second to access.
Definition at line 383 of file Petsc.cpp.
◆ read()
| void precice::utils::petsc::Vector::read |
( |
const std::string & | filename, |
|
|
VIEWERFORMAT | format = ASCII ) |
Reads the vector from file.
Definition at line 403 of file Petsc.cpp.
◆ setValue()
| void precice::utils::petsc::Vector::setValue |
( |
PetscInt | row, |
|
|
PetscScalar | value ) |
◆ sort()
| void precice::utils::petsc::Vector::sort |
( |
| ) |
|
Sorts the LOCAL partition of the vector.
Definition at line 359 of file Petsc.cpp.
◆ swap()
| void precice::utils::petsc::Vector::swap |
( |
Vector & | other | ) |
|
|
noexcept |
Swaps the ownership of two vectors.
Definition at line 245 of file Petsc.cpp.
◆ view()
| void precice::utils::petsc::Vector::view |
( |
| ) |
const |
Prints the vector.
Definition at line 409 of file Petsc.cpp.
◆ write()
| void precice::utils::petsc::Vector::write |
( |
const std::string & | filename, |
|
|
VIEWERFORMAT | format = ASCII ) const |
Writes the vector to file.
Definition at line 390 of file Petsc.cpp.
◆ _log
◆ vector
| Vec precice::utils::petsc::Vector::vector = nullptr |
The documentation for this class was generated from the following files: