Function opensn::CreateVectorWithGhosts

Function Documentation

Vec opensn::CreateVectorWithGhosts(int64_t local_size, int64_t global_size, int64_t nghosts, const std::vector<int64_t> &ghost_indices)

Creates a general vector with ghost value support.

This is a macro for:

Vec x;
VecCreateGhost(opensn::mpi_comm,
               local_size,
               global_size,
               nghosts,
               ghost_indices.data(),
               &x);

VecSetOption(x,VEC_IGNORE_NEGATIVE_INDICES,PETSC_TRUE);

return x;