constraint_line->entries[q].second);
}
- vec.compress();
+ vec.compress(VectorOperation::add);
for (std::vector<ConstraintLine>::const_iterator
constraint_line = lines.begin();
constraint_line!=lines.end(); ++constraint_line)
if (vec.in_local_range(constraint_line->line) == true)
vec(constraint_line->line) = 0.;
+
+ vec.compress(VectorOperation::insert);
}
void set_zero_all(const dealii::ConstraintMatrix &cm, VEC &vec)
{
set_zero_in_parallel<VEC>(cm, vec, internal::bool2type<IsBlockVector<VEC>::value>());
+ vec.compress(VectorOperation::insert);
}
// be reimplemented in derived classes
vmult (*y, *x);
- y->compress();
// copy the result back to dst
ierr = VecCopy (&(*(*y)), dst);
AssertThrow (ierr == 0, ExcPETScError(ierr));
Assert (numbers::is_finite(s), ExcNumberNotFinite());
- // flush previously cached elements. this
- // seems to be necessary since petsc
- // 2.2.1, at least for parallel vectors
- // (see test bits/petsc_65)
- compress ();
+ //TODO[TH]: assert(is_compressed())
const int ierr = VecSet (vector, s);
AssertThrow (ierr == 0, ExcPETScError(ierr));
void
VectorBase::write_ascii (const PetscViewerFormat format)
{
- // First flush PETSc caches
- compress();
+ //TODO[TH]:assert(is_compressed())
// Set options
PetscViewerSetFormat (PETSC_VIEWER_STDOUT_WORLD,