18#ifdef DEAL_II_WITH_PETSC
39 std::vector<size_type> block_sizes(num_blocks, 0);
41 if (this->
components.size() != this->n_blocks())
44 for (
unsigned int i = 0; i < this->
n_blocks(); ++i)
56 PetscObjectTypeCompare(
reinterpret_cast<PetscObject
>(v),
64 ierr = VecNestGetSize(v, &nb);
66 for (PetscInt i = 0; i < nb; ++i)
69 ierr = VecNestGetSubVec(v, i, &vv);
80 std::vector<size_type> block_sizes(nb, 0);
84 for (
unsigned int i = 0; i < nb; ++i)
94 ierr = PetscObjectReference(
reinterpret_cast<PetscObject
>(v));
108 BlockVector::operator
const Vec &()
const
110 return petsc_nest_vector;
135 std::vector<Vec> pcomponents(n);
136 for (
unsigned int i = 0; i < n; i++)
140 pcomponents.size() > 0 ?
141 PetscObjectComm(
reinterpret_cast<PetscObject
>(pcomponents[0])) :
void reinit(const unsigned int n_blocks, const size_type n_elements_per_block)
unsigned int n_blocks() const
void compress(VectorOperation::values operation)
std::vector< Vector > components
BlockIndices block_indices
void compress(VectorOperation::values operation)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define AssertThrow(cond, exc)
void petsc_increment_state_counter(Vec v)
unsigned int global_dof_index