#include <Petsc.hpp>
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 180 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 151 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 168 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 190 of file Petsc.cpp.
◆ ~Vector()
precice::utils::petsc::Vector::~Vector |
( |
| ) |
|
◆ allocate() [1/5]
Allocates a new vector on the given MPI communicator.
Definition at line 206 of file Petsc.cpp.
◆ allocate() [2/5]
Allocates a vector with the same number of rows (default) or columns.
Definition at line 230 of file Petsc.cpp.
◆ allocate() [3/5]
Allocates a vector with the same number of rows (default) or columns.
Definition at line 225 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 216 of file Petsc.cpp.
◆ allocate() [5/5]
Allocated an uninitialized vector of identical shape. Duplicates type, row layout etc. (not values) of v.
Definition at line 211 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 255 of file Petsc.cpp.
◆ l2norm()
double precice::utils::petsc::Vector::l2norm |
( |
| ) |
const |
returns the l2-norm of the vector
Definition at line 395 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 250 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 161 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 174 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 382 of file Petsc.cpp.
◆ read()
Reads the vector from file.
Definition at line 402 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 358 of file Petsc.cpp.
◆ swap()
void precice::utils::petsc::Vector::swap |
( |
Vector & | other | ) |
|
|
noexcept |
Swaps the ownership of two vectors.
Definition at line 244 of file Petsc.cpp.
◆ view()
void precice::utils::petsc::Vector::view |
( |
| ) |
const |
Prints the vector.
Definition at line 408 of file Petsc.cpp.
◆ write()
Writes the vector to file.
Definition at line 389 of file Petsc.cpp.
◆ _log
◆ vector
Vec precice::utils::petsc::Vector::vector = nullptr |
The documentation for this class was generated from the following files: