22 VecCreate(PETSC_COMM_WORLD,&x);
24 VecSetSizes(x, local_size, global_size);
25 VecSetOption(x,VEC_IGNORE_NEGATIVE_INDICES,PETSC_TRUE);
43 VecCreate(PETSC_COMM_WORLD,&x);
45 VecSetSizes(x, local_size, global_size);
46 VecSetOption(x,VEC_IGNORE_NEGATIVE_INDICES,PETSC_TRUE);
69 const std::vector<int64_t>& ghost_indices)
72 VecCreateGhost(PETSC_COMM_WORLD,
76 (ghost_indices.empty())? NULL : ghost_indices.data(),
79 VecSetOption(x,VEC_IGNORE_NEGATIVE_INDICES,PETSC_TRUE);
Vec CreateVectorWithGhosts(int64_t local_size, int64_t global_size, int64_t nghosts, const std::vector< int64_t > &ghost_indices)
Vec CreateVector(int64_t local_size, int64_t global_size)