inline Vector::iterator
Vector::end()
{
- return (*vector)[0] + local_size();
+ return (*vector)[0] + locally_owned_size();
}
inline Vector::const_iterator
Vector::end() const
{
- return (*vector)[0] + local_size();
+ return (*vector)[0] + locally_owned_size();
}
// writing to this vector at all.
Assert(!has_ghost_elements(), ExcGhostsPresent());
- Assert(indices.size() == values.size(),
- ExcDimensionMismatch(indices.size(), values.size()));
+ AssertDimension(indices.size(), values.size());
set(indices.size(), indices.data(), values.data());
}
// writing to this vector at all.
Assert(!has_ghost_elements(), ExcGhostsPresent());
- Assert(indices.size() == values.size(),
- ExcDimensionMismatch(indices.size(), values.size()));
+ AssertDimension(indices.size(), values.size());
set(indices.size(), indices.data(), values.begin());
}
// if we have ghost values, do not allow
// writing to this vector at all.
Assert(!has_ghost_elements(), ExcGhostsPresent());
- Assert(indices.size() == values.size(),
- ExcDimensionMismatch(indices.size(), values.size()));
+ AssertDimension(indices.size(), values.size());
add(indices.size(), indices.data(), values.data());
}
// if we have ghost values, do not allow
// writing to this vector at all.
Assert(!has_ghost_elements(), ExcGhostsPresent());
- Assert(indices.size() == values.size(),
- ExcDimensionMismatch(indices.size(), values.size()));
+ AssertDimension(indices.size(), values.size());
add(indices.size(), indices.data(), values.begin());
}
TrilinosScalar norm = 0;
TrilinosScalar sum = 0;
- const size_type n_local = local_size();
+ const size_type n_local = locally_owned_size();
// loop over all the elements because
// Trilinos does not support lp norms
inline Vector &
Vector::operator+=(const Vector &v)
{
- Assert(size() == v.size(), ExcDimensionMismatch(size(), v.size()));
+ AssertDimension(size(), v.size());
Assert(vector->Map().SameAs(v.vector->Map()),
ExcDifferentParallelPartitioning());
inline Vector &
Vector::operator-=(const Vector &v)
{
- Assert(size() == v.size(), ExcDimensionMismatch(size(), v.size()));
+ AssertDimension(size(), v.size());
Assert(vector->Map().SameAs(v.vector->Map()),
ExcDifferentParallelPartitioning());
Assert(!has_ghost_elements(), ExcGhostsPresent());
AssertIsFinite(s);
- size_type n_local = local_size();
+ size_type n_local = locally_owned_size();
for (size_type i = 0; i < n_local; ++i)
(*vector)[0][i] += s;
}
// if we have ghost values, do not allow
// writing to this vector at all.
Assert(!has_ghost_elements(), ExcGhostsPresent());
- Assert(local_size() == v.local_size(),
- ExcDimensionMismatch(local_size(), v.local_size()));
+ AssertDimension(locally_owned_size(), v.locally_owned_size());
AssertIsFinite(a);
// if we have ghost values, do not allow
// writing to this vector at all.
Assert(!has_ghost_elements(), ExcGhostsPresent());
- Assert(local_size() == v.local_size(),
- ExcDimensionMismatch(local_size(), v.local_size()));
- Assert(local_size() == w.local_size(),
- ExcDimensionMismatch(local_size(), w.local_size()));
+ AssertDimension(locally_owned_size(), v.locally_owned_size());
+ AssertDimension(locally_owned_size(), w.locally_owned_size());
AssertIsFinite(a);
AssertIsFinite(b);
// if we have ghost values, do not allow
// writing to this vector at all.
Assert(!has_ghost_elements(), ExcGhostsPresent());
- Assert(size() == v.size(), ExcDimensionMismatch(size(), v.size()));
+ AssertDimension(size(), v.size());
AssertIsFinite(s);
// We assume that the vectors have the same Map
// if the local size is the same and if the vectors are not ghosted
- if (local_size() == v.local_size() && !v.has_ghost_elements())
+ if (locally_owned_size() == v.locally_owned_size() &&
+ !v.has_ghost_elements())
{
Assert(this->vector->Map().SameAs(v.vector->Map()) == true,
ExcDifferentParallelPartitioning());
// if we have ghost values, do not allow
// writing to this vector at all.
Assert(!has_ghost_elements(), ExcGhostsPresent());
- Assert(size() == v.size(), ExcDimensionMismatch(size(), v.size()));
+ AssertDimension(size(), v.size());
AssertIsFinite(s);
AssertIsFinite(a);
// We assume that the vectors have the same Map
// if the local size is the same and if the vectors are not ghosted
- if (local_size() == v.local_size() && !v.has_ghost_elements())
+ if (locally_owned_size() == v.locally_owned_size() &&
+ !v.has_ghost_elements())
{
Assert(this->vector->Map().SameAs(v.vector->Map()) == true,
ExcDifferentParallelPartitioning());
// if we have ghost values, do not allow
// writing to this vector at all.
Assert(!has_ghost_elements(), ExcGhostsPresent());
- Assert(local_size() == factors.local_size(),
- ExcDimensionMismatch(local_size(), factors.local_size()));
+ AssertDimension(locally_owned_size(), factors.locally_owned_size());
const int ierr = vector->Multiply(1.0, *(factors.vector), *vector, 0.0);
AssertThrow(ierr == 0, ExcTrilinosError(ierr));