VectorBase::add (const TrilinosScalar a,
const VectorBase &v)
{
- Assert (size() == v.size(),
- ExcDimensionMismatch(size(), v.size()));
- Assert (vector->Map().SameAs(v.vector->Map()),
- ExcDifferentParallelPartitioning());
+ Assert (local_size() == v.local_size(),
+ ExcDimensionMismatch(local_size(), v.local_size()));
Assert (numbers::is_finite(a), ExcNumberNotFinite());
const TrilinosScalar b,
const VectorBase &w)
{
- Assert (size() == v.size(),
- ExcDimensionMismatch(size(), v.size()));
- Assert (size() == w.size(),
- ExcDimensionMismatch(size(), w.size()));
- Assert (vector->Map().SameAs(v.vector->Map()),
- ExcDifferentParallelPartitioning());
- Assert (vector->Map().SameAs(w.vector->Map()),
- ExcDifferentParallelPartitioning());
+ Assert (local_size() == v.local_size(),
+ ExcDimensionMismatch(local_size(), v.local_size()));
+ Assert (local_size() == w.local_size(),
+ ExcDimensionMismatch(local_size(), w.local_size()));
Assert (numbers::is_finite(a), ExcNumberNotFinite());
Assert (numbers::is_finite(b), ExcNumberNotFinite());
VectorBase::sadd (const TrilinosScalar s,
const VectorBase &v)
{
- Assert (size() == v.size(),
- ExcDimensionMismatch(size(), v.size()));
- Assert (vector->Map().SameAs(v.vector->Map()),
- ExcDifferentParallelPartitioning());
+ Assert (local_size() == v.local_size(),
+ ExcDimensionMismatch(local_size(), v.local_size()));
Assert (numbers::is_finite(s), ExcNumberNotFinite());
const TrilinosScalar a,
const VectorBase &v)
{
- Assert (size() == v.size(),
- ExcDimensionMismatch(size(), v.size()));
- Assert (vector->Map().SameAs(v.vector->Map()),
- ExcDifferentParallelPartitioning());
+ Assert (local_size() == v.local_size(),
+ ExcDimensionMismatch(local_size(), v.local_size()));
Assert (numbers::is_finite(s), ExcNumberNotFinite());
Assert (numbers::is_finite(a), ExcNumberNotFinite());
const TrilinosScalar b,
const VectorBase &w)
{
- Assert (size() == v.size(),
- ExcDimensionMismatch(size(), v.size()));
- Assert (size() == w.size(),
- ExcDimensionMismatch(size(), w.size()));
- Assert (vector->Map().SameAs(v.vector->Map()),
- ExcDifferentParallelPartitioning());
- Assert (vector->Map().SameAs(w.vector->Map()),
- ExcDifferentParallelPartitioning());
+ Assert (local_size() == v.local_size(),
+ ExcDimensionMismatch(local_size(), v.local_size()));
+ Assert (local_size() == w.local_size(),
+ ExcDimensionMismatch(local_size(), w.local_size()));
Assert (numbers::is_finite(s), ExcNumberNotFinite());
Assert (numbers::is_finite(a), ExcNumberNotFinite());
const TrilinosScalar c,
const VectorBase &x)
{
- Assert (size() == v.size(),
- ExcDimensionMismatch(size(), v.size()));
- Assert (size() == w.size(),
- ExcDimensionMismatch(size(), w.size()));
- Assert (size() == x.size(),
- ExcDimensionMismatch(size(), x.size()));
- Assert (vector->Map().SameAs(v.vector->Map()),
- ExcDifferentParallelPartitioning());
- Assert (vector->Map().SameAs(w.vector->Map()),
- ExcDifferentParallelPartitioning());
- Assert (vector->Map().SameAs(x.vector->Map()),
- ExcDifferentParallelPartitioning());
+ Assert (local_size() == v.local_size(),
+ ExcDimensionMismatch(local_size(), v.local_size()));
+ Assert (local_size() == w.local_size(),
+ ExcDimensionMismatch(local_size(), w.local_size()));
+ Assert (local_size() == x.local_size(),
+ ExcDimensionMismatch(local_size(), x.local_size()));
Assert (numbers::is_finite(s), ExcNumberNotFinite());
Assert (numbers::is_finite(a), ExcNumberNotFinite());
void
VectorBase::scale (const VectorBase &factors)
{
- Assert (size() == factors.size(),
- ExcDimensionMismatch(size(), factors.size()));
- Assert (vector->Map().SameAs(factors.vector->Map()),
- ExcDifferentParallelPartitioning());
+ Assert (local_size() == factors.local_size(),
+ ExcDimensionMismatch(local_size(), factors.local_size()));
const int ierr = vector->Multiply (1.0, *(factors.vector), *vector, 0.0);
AssertThrow (ierr == 0, ExcTrilinosError(ierr));
else
{
// Otherwise, just update
- int ierr;
- ierr = vector->GlobalAssemble(last_action);
- AssertThrow (ierr == 0, ExcTrilinosError(ierr));
-
- ierr = vector->Update(a, *v.vector, 0.0);
+ int ierr = vector->Update(a, *v.vector, 0.0);
AssertThrow (ierr == 0, ExcTrilinosError(ierr));
last_action = Zero;
const TrilinosScalar b,
const VectorBase &w)
{
- Assert (v.size() == w.size(),
- ExcDimensionMismatch (v.size(), w.size()));
+ Assert (v.local_size() == w.local_size(),
+ ExcDimensionMismatch (v.local_size(), w.local_size()));
Assert (numbers::is_finite(a), ExcNumberNotFinite());
Assert (numbers::is_finite(b), ExcNumberNotFinite());
// w
Assert (vector->Map().SameAs(w.vector->Map()),
ExcDifferentParallelPartitioning());
- int ierr;
- ierr = vector->GlobalAssemble(last_action);
- AssertThrow (ierr == 0, ExcTrilinosError(ierr));
-
- ierr = vector->Update(a, *v.vector, b, *w.vector, 0.0);
+ int ierr = vector->Update(a, *v.vector, b, *w.vector, 0.0);
AssertThrow (ierr == 0, ExcTrilinosError(ierr));
last_action = Zero;
VectorBase::ratio (const VectorBase &v,
const VectorBase &w)
{
- Assert (v.size() == w.size(),
- ExcDimensionMismatch (v.size(), w.size()));
- Assert (size() == w.size(),
- ExcDimensionMismatch (size(), w.size()));
- Assert (vector->Map().SameAs(v.vector->Map()),
- ExcDifferentParallelPartitioning());
- Assert (vector->Map().SameAs(w.vector->Map()),
- ExcDifferentParallelPartitioning());
+ Assert (v.local_size() == w.local_size(),
+ ExcDimensionMismatch (v.local_size(), w.local_size()));
+ Assert (local_size() == w.local_size(),
+ ExcDimensionMismatch (local_size(), w.local_size()));
const int ierr = vector->ReciprocalMultiply(1.0, *(w.vector),
*(v.vector), 0.0);