#include <Petsc.hpp>
Definition at line 56 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 220 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 191 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 208 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 230 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 246 of file Petsc.cpp.
◆ allocate() [2/5]
Allocates a vector with the same number of rows (default) or columns.
Definition at line 270 of file Petsc.cpp.
◆ allocate() [3/5]
Allocates a vector with the same number of rows (default) or columns.
Definition at line 265 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 256 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 251 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 295 of file Petsc.cpp.
◆ l2norm()
double precice::utils::petsc::Vector::l2norm |
( |
| ) |
const |
returns the l2-norm of the vector
Definition at line 435 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 290 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 201 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 214 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 422 of file Petsc.cpp.
◆ read()
Reads the vector from file.
Definition at line 442 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 398 of file Petsc.cpp.
◆ swap()
void precice::utils::petsc::Vector::swap |
( |
Vector & | other | ) |
|
|
noexcept |
Swaps the ownership of two vectors.
Definition at line 284 of file Petsc.cpp.
◆ view()
void precice::utils::petsc::Vector::view |
( |
| ) |
const |
Prints the vector.
Definition at line 448 of file Petsc.cpp.
◆ write()
Writes the vector to file.
Definition at line 429 of file Petsc.cpp.
◆ _log
◆ vector
Vec precice::utils::petsc::Vector::vector = nullptr |
The documentation for this class was generated from the following files: