ExcWrongMode (VectorOperation::insert,
vector.last_action));
+ Assert (!vector.has_ghost_elements(), ExcGhostsPresent());
+
#ifdef PETSC_USE_64BIT_INDICES
const PetscInt petsc_i = index;
#else
ExcWrongMode (VectorOperation::add,
vector.last_action));
+ Assert (!vector.has_ghost_elements(), ExcGhostsPresent());
+
vector.last_action = VectorOperation::add;
// we have to do above actions in any
ExcWrongMode (VectorOperation::add,
vector.last_action));
+ Assert (!vector.has_ghost_elements(), ExcGhostsPresent());
+
vector.last_action = VectorOperation::add;
// we have to do above actions in any
ExcWrongMode (VectorOperation::insert,
vector.last_action));
+ Assert (!vector.has_ghost_elements(), ExcGhostsPresent());
+
vector.last_action = VectorOperation::insert;
// we have to do above actions in any
ExcWrongMode (VectorOperation::insert,
vector.last_action));
+ Assert (!vector.has_ghost_elements(), ExcGhostsPresent());
+
vector.last_action = VectorOperation::insert;
// we have to do above actions in any
VectorBase::normalize () const
{
real_type d;
-
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
const int ierr = VecNormalize (vector, &d);
AssertThrow (ierr == 0, ExcPETScError(ierr));
VectorBase &
VectorBase::abs ()
{
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
+
const int ierr = VecAbs (vector);
AssertThrow (ierr == 0, ExcPETScError(ierr));
VectorBase &
VectorBase::conjugate ()
{
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
+
const int ierr = VecConjugate (vector);
AssertThrow (ierr == 0, ExcPETScError(ierr));
VectorBase &
VectorBase::mult ()
{
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
+
const int ierr = VecPointwiseMult (vector,vector,vector);
AssertThrow (ierr == 0, ExcPETScError(ierr));
VectorBase &
VectorBase::mult (const VectorBase &v)
{
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
const int ierr = VecPointwiseMult (vector,vector,v);
AssertThrow (ierr == 0, ExcPETScError(ierr));
VectorBase::mult (const VectorBase &u,
const VectorBase &v)
{
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
const int ierr = VecPointwiseMult (vector,u,v);
AssertThrow (ierr == 0, ExcPETScError(ierr));
VectorBase &
VectorBase::operator *= (const PetscScalar a)
{
-
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (numbers::is_finite(a), ExcNumberNotFinite());
const int ierr = VecScale (vector, a);
VectorBase &
VectorBase::operator /= (const PetscScalar a)
{
-
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (numbers::is_finite(a), ExcNumberNotFinite());
const PetscScalar factor = 1./a;
VectorBase &
VectorBase::operator += (const VectorBase &v)
{
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
const int ierr = VecAXPY (vector, 1, v);
AssertThrow (ierr == 0, ExcPETScError(ierr));
VectorBase &
VectorBase::operator -= (const VectorBase &v)
{
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
const int ierr = VecAXPY (vector, -1, v);
AssertThrow (ierr == 0, ExcPETScError(ierr));
void
VectorBase::add (const PetscScalar s)
{
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (numbers::is_finite(s), ExcNumberNotFinite());
const int ierr = VecShift (vector, s);
VectorBase::add (const PetscScalar a,
const VectorBase &v)
{
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (numbers::is_finite(a), ExcNumberNotFinite());
const int ierr = VecAXPY (vector, a, v);
const PetscScalar b,
const VectorBase &w)
{
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (numbers::is_finite(a), ExcNumberNotFinite());
Assert (numbers::is_finite(b), ExcNumberNotFinite());
VectorBase::sadd (const PetscScalar s,
const VectorBase &v)
{
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (numbers::is_finite(s), ExcNumberNotFinite());
const int ierr = VecAYPX (vector, s, v);
const PetscScalar a,
const VectorBase &v)
{
-
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (numbers::is_finite(s), ExcNumberNotFinite());
Assert (numbers::is_finite(a), ExcNumberNotFinite());
const PetscScalar b,
const VectorBase &w)
{
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (numbers::is_finite(s), ExcNumberNotFinite());
Assert (numbers::is_finite(a), ExcNumberNotFinite());
Assert (numbers::is_finite(b), ExcNumberNotFinite());
const PetscScalar c,
const VectorBase &x)
{
-
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (numbers::is_finite(s), ExcNumberNotFinite());
Assert (numbers::is_finite(a), ExcNumberNotFinite());
Assert (numbers::is_finite(b), ExcNumberNotFinite());
void
VectorBase::scale (const VectorBase &factors)
{
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
const int ierr
= VecPointwiseMult (vector, factors, vector);
AssertThrow (ierr == 0, ExcPETScError(ierr));
VectorBase::equ (const PetscScalar a,
const VectorBase &v)
{
-
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (numbers::is_finite(a), ExcNumberNotFinite());
Assert (size() == v.size(),
const PetscScalar b,
const VectorBase &w)
{
-
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (numbers::is_finite(a), ExcNumberNotFinite());
Assert (numbers::is_finite(b), ExcNumberNotFinite());
VectorBase::ratio (const VectorBase &a,
const VectorBase &b)
{
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
const int ierr = VecPointwiseDivide (vector, a, b);
AssertThrow (ierr == 0, ExcPETScError(ierr));
}
(last_action == ::dealii::VectorOperation::unknown),
internal::VectorReference::ExcWrongMode (action,
last_action));
-
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
// VecSetValues complains if we
// come with an empty
// vector. however, it is not a