The Kokkos wrapper class for PETSc vector.
More...
#include <KokkosVector.h>
The Kokkos wrapper class for PETSc vector.
Definition at line 27 of file KokkosVector.h.
◆ Vector()
Moose::Kokkos::Vector::Vector |
( |
| ) |
|
|
default |
◆ ~Vector()
Moose::Kokkos::Vector::~Vector |
( |
| ) |
|
|
inline |
Destructor.
Definition at line 37 of file KokkosVector.h.
void destroy()
Free all data and reset.
◆ close()
void Moose::Kokkos::Vector::close |
( |
| ) |
|
Assemble the underlying PETSc vector.
◆ copyToDevice()
void Moose::Kokkos::Vector::copyToDevice |
( |
| ) |
|
Copy from the host libMesh PetscVector.
◆ copyToHost()
void Moose::Kokkos::Vector::copyToHost |
( |
| ) |
|
Copy to the host libMesh PetscVector.
◆ create()
Create the vector from a libMesh PetscVector.
- Parameters
-
vector | The libMesh PetscVector |
system | The Kokkos system |
assemble | Whether the vector will be assembled |
◆ destroy()
void Moose::Kokkos::Vector::destroy |
( |
| ) |
|
Free all data and reset.
Referenced by ~Vector().
◆ isAlloc()
bool Moose::Kokkos::Vector::isAlloc |
( |
| ) |
const |
|
inline |
Get whether the vector was allocated.
- Returns
- Whether the vector was allocated
Definition at line 48 of file KokkosVector.h.
bool _is_alloc
Flag whether the vector was allocated.
◆ operator()() [1/3]
KOKKOS_FUNCTION PetscScalar& Moose::Kokkos::Vector::operator() |
( |
dof_id_type |
i | ) |
const |
|
inline |
Get an entry with a given index.
- Parameters
-
i | The entry index local to this process |
- Returns
- The reference of the entry
Definition at line 78 of file KokkosVector.h.
Array< PetscScalar > _local
Data vectors on device.
Array< PetscScalar > _ghost
◆ operator()() [2/3]
KOKKOS_FUNCTION void Moose::Kokkos::Vector::operator() |
( |
PackBuffer |
, |
|
|
const PetscCount |
tid |
|
) |
| const |
◆ operator()() [3/3]
KOKKOS_FUNCTION void Moose::Kokkos::Vector::operator() |
( |
UnpackBuffer |
, |
|
|
const PetscCount |
tid |
|
) |
| const |
◆ operator=()
auto& Moose::Kokkos::Vector::operator= |
( |
PetscScalar |
scalar | ) |
|
|
inline |
Assign a scalar value uniformly.
- Parameters
-
scalar | The scalar value to be assigned |
Definition at line 95 of file KokkosVector.h.
Array< PetscScalar > _local
Data vectors on device.
Array< PetscScalar > _ghost
◆ operator[]()
KOKKOS_FUNCTION PetscScalar& Moose::Kokkos::Vector::operator[] |
( |
dof_id_type |
i | ) |
const |
|
inline |
Get an entry with a given index.
- Parameters
-
i | The entry index local to this process |
- Returns
- The reference of the entry
Definition at line 87 of file KokkosVector.h.
Array< PetscScalar > _local
Data vectors on device.
Array< PetscScalar > _ghost
◆ restore()
void Moose::Kokkos::Vector::restore |
( |
| ) |
|
Restore the underlying PETSc vector.
◆ _array
PetscScalar* Moose::Kokkos::Vector::_array = PETSC_NULLPTR |
|
private |
◆ _assemble
bool Moose::Kokkos::Vector::_assemble = false |
|
private |
Flag whether the vector will be assembled.
Definition at line 187 of file KokkosVector.h.
◆ _comm
◆ _current_proc
unsigned int Moose::Kokkos::Vector::_current_proc |
|
private |
◆ _ghost
Array<PetscScalar> Moose::Kokkos::Vector::_ghost |
|
private |
◆ _global_vector
Vec Moose::Kokkos::Vector::_global_vector = PETSC_NULLPTR |
|
private |
◆ _is_alloc
bool Moose::Kokkos::Vector::_is_alloc = false |
|
private |
◆ _is_ghosted
bool Moose::Kokkos::Vector::_is_ghosted = false |
|
private |
Flag whether the PETSc vector is ghosted.
Definition at line 191 of file KokkosVector.h.
◆ _is_host
bool Moose::Kokkos::Vector::_is_host = false |
|
private |
Flag whether the PETSc vector is a host vector.
Definition at line 195 of file KokkosVector.h.
◆ _local
Array<PetscScalar> Moose::Kokkos::Vector::_local |
|
private |
◆ _local_vector
Vec Moose::Kokkos::Vector::_local_vector = PETSC_NULLPTR |
|
private |
◆ _recv
◆ _send
◆ _system
const System* Moose::Kokkos::Vector::_system |
|
private |
The documentation for this class was generated from the following file: