14 #include "libmesh/petsc_vector.h" 15 #include "libmesh/dof_map.h" 43 #ifdef MOOSE_KOKKOS_SCOPE
void create(const Array< Array< libMesh::dof_id_type >> &list)
Allocate data.
bool isAlloc() const
Get whether the vector was allocated.
bool _assemble
Flag whether the vector will be assembled.
void restore()
Restore the underlying PETSc vector.
const System * _system
Pointer to the Kokkos system.
Array< int > offset
Starting offset of each process into the communication buffer.
void destroy()
Free all data and reset.
Kokkos functions for direct assembly on device.
Array< PetscScalar > buffer
Communication buffer.
KOKKOS_FUNCTION PetscScalar & operator()(dof_id_type i) const
Get an entry with a given index.
Array< PetscScalar > _local
Data vectors on device.
void close()
Assemble the underlying PETSc vector.
Vector()=default
Default constructor.
Array< int > count
Number of DOFs to send/receive for each process.
KOKKOS_FUNCTION PetscScalar & operator[](dof_id_type i) const
Get an entry with a given index.
bool _is_host
Flag whether the PETSc vector is a host vector.
Data for direct assembly on device.
void create(libMesh::NumericVector< PetscScalar > &vector, const System &system, bool assemble)
Create the vector from a libMesh PetscVector.
The Kokkos wrapper class for PETSc vector.
const libMesh::Parallel::Communicator * _comm
Pointer to the libMesh communicator.
void copyToDevice()
Copy from the host libMesh PetscVector.
auto & operator=(PetscScalar scalar)
Assign a scalar value uniformly.
PetscScalar * _array
Raw data of local PETSc vector.
bool _is_ghosted
Flag whether the PETSc vector is ghosted.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
Array< Array< libMesh::dof_id_type > > list
List of DOFs to send/receive for each process.
unsigned int _current_proc
bool _is_alloc
Flag whether the vector was allocated.
void copyToHost()
Copy to the host libMesh PetscVector.
Vec _global_vector
PETSc vectors.
Array< PetscScalar > _ghost