* elements.
*/
bool has_ghost_elements() const;
-
+
/**
* Return the scalar (inner)
* product of two vectors. The
return ((index >= range.first) && (index < range.second));
}
-
+
inline
bool
return vector->Map().UniqueGIDs()==false;
}
-
-
+
+
inline
internal::VectorReference
VectorBase::operator () (const unsigned int index)
}
-
+
inline
void
VectorBase::reinit (const VectorBase &v,
double_mode,
result);
Assert(result.max-result.min<1e-5, ExcTrilinosError(0));
-
+
# endif
#endif
-
+
// Now pass over the information about
// what we did last to the vector.
const int ierr = vector->GlobalAssemble(mode);
{
// if we have ghost values, do not allow
// writing to this vector at all.
- Assert (!has_ghost_elements(), ExcGhostsPresent());
-
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
+
if (last_action == Add)
vector->GlobalAssemble(Add);
VectorBase::add (const std::vector<unsigned int> &indices,
const std::vector<TrilinosScalar> &values)
{
+ // 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()));
VectorBase::add (const std::vector<unsigned int> &indices,
const ::dealii::Vector<TrilinosScalar> &values)
{
+ // 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()));
{
// if we have ghost values, do not allow
// writing to this vector at all.
- Assert (!has_ghost_elements(), ExcGhostsPresent());
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
if (last_action != Add)
{
unsigned int
VectorBase::size () const
{
- return (unsigned int) (vector->Map().MaxAllGID() + 1 -
+ return (unsigned int) (vector->Map().MaxAllGID() + 1 -
vector->Map().MinAllGID());
}
{
Assert (vector->Map().SameAs(vec.vector->Map()),
ExcDifferentParallelPartitioning());
- Assert (!has_ghost_elements(), ExcGhostsPresent());
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
TrilinosScalar result;
TrilinosScalar
VectorBase::mean_value () const
{
- Assert (!has_ghost_elements(), ExcGhostsPresent());
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
TrilinosScalar mean;
const int ierr = vector->MeanValue (&mean);
VectorBase::real_type
VectorBase::l1_norm () const
{
- Assert (!has_ghost_elements(), ExcGhostsPresent());
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
TrilinosScalar d;
const int ierr = vector->Norm1 (&d);
VectorBase::real_type
VectorBase::l2_norm () const
{
- Assert (!has_ghost_elements(), ExcGhostsPresent());
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
TrilinosScalar d;
const int ierr = vector->Norm2 (&d);
VectorBase::real_type
VectorBase::lp_norm (const TrilinosScalar p) const
{
- Assert (!has_ghost_elements(), ExcGhostsPresent());
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
TrilinosScalar norm = 0;
TrilinosScalar sum=0;
VectorBase &
VectorBase::operator *= (const TrilinosScalar a)
{
+ // if we have ghost values, do not allow
+ // writing to this vector at all.
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (numbers::is_finite(a), ExcNumberNotFinite());
VectorBase &
VectorBase::operator /= (const TrilinosScalar a)
{
+ // if we have ghost values, do not allow
+ // writing to this vector at all.
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (numbers::is_finite(a), ExcNumberNotFinite());
VectorBase &
VectorBase::operator += (const VectorBase &v)
{
+ // 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()));
Assert (vector->Map().SameAs(v.vector->Map()),
VectorBase &
VectorBase::operator -= (const VectorBase &v)
{
+ // 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()));
Assert (vector->Map().SameAs(v.vector->Map()),
void
VectorBase::add (const TrilinosScalar s)
{
+ // if we have ghost values, do not allow
+ // writing to this vector at all.
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (numbers::is_finite(s), ExcNumberNotFinite());
VectorBase::add (const TrilinosScalar a,
const VectorBase &v)
{
+ // 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()));
Assert (vector->Map().SameAs(v.vector->Map()),
const TrilinosScalar b,
const VectorBase &w)
{
+ // 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()));
Assert (size() == w.size(),
VectorBase::sadd (const TrilinosScalar s,
const VectorBase &v)
{
+ // 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()));
Assert (vector->Map().SameAs(v.vector->Map()),
const TrilinosScalar a,
const VectorBase &v)
{
+ // 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()));
Assert (vector->Map().SameAs(v.vector->Map()),
const TrilinosScalar b,
const VectorBase &w)
{
+ // 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()));
Assert (size() == w.size(),
const TrilinosScalar c,
const VectorBase &x)
{
+ // 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()));
Assert (size() == w.size(),
void
VectorBase::scale (const VectorBase &factors)
{
+ // if we have ghost values, do not allow
+ // writing to this vector at all.
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (size() == factors.size(),
ExcDimensionMismatch(size(), factors.size()));
Assert (vector->Map().SameAs(factors.vector->Map()),
VectorBase::equ (const TrilinosScalar a,
const VectorBase &v)
{
+ // if we have ghost values, do not allow
+ // writing to this vector at all.
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (numbers::is_finite(a), ExcNumberNotFinite());
// If we don't have the same map, copy.
const TrilinosScalar b,
const VectorBase &w)
{
+ // if we have ghost values, do not allow
+ // writing to this vector at all.
+ Assert (!has_ghost_elements(), ExcGhostsPresent());
Assert (v.size() == w.size(),
ExcDimensionMismatch (v.size(), w.size()));