-Changed: The deprecated member functions add(), normalize(), conjugate(), abs()
-and mult() in the vector classes have been removed.
+Changed: The deprecated member functions add(), normalize(), conjugate(),
+abs(), sadd(), equ() and mult() in the vector classes have been removed.
<br>
(Daniel Arndt, 2017/06/12)
const PetscScalar a,
const VectorBase &V);
- /**
- * Scaling and multiple addition.
- *
- * This function is deprecated.
- */
- void sadd (const PetscScalar s,
- const PetscScalar a,
- const VectorBase &V,
- const PetscScalar b,
- const VectorBase &W) DEAL_II_DEPRECATED;
-
- /**
- * Scaling and multiple addition. <tt>*this = s*(*this)+a*V + b*W +
- * c*X</tt>.
- *
- * This function is deprecated.
- */
- void sadd (const PetscScalar s,
- const PetscScalar a,
- const VectorBase &V,
- const PetscScalar b,
- const VectorBase &W,
- const PetscScalar c,
- const VectorBase &X) DEAL_II_DEPRECATED;
-
/**
* Scale each element of this vector by the corresponding element in the
* argument. This function is mostly meant to simulate multiplication (and
*/
void equ (const PetscScalar a, const VectorBase &V);
- /**
- * Assignment <tt>*this = a*V + b*W</tt>.
- *
- * This function is deprecated.
- */
- void equ (const PetscScalar a, const VectorBase &V,
- const PetscScalar b, const VectorBase &W) DEAL_II_DEPRECATED;
-
/**
* Compute the elementwise ratio of the two given vectors, that is let
* <tt>this[i] = a[i]/b[i]</tt>. This is useful for example if you want to
const Number a,
const Vector<Number> &V);
- /**
- * Scaling and multiple addition.
- *
- * This function is deprecated.
- *
- * @dealiiOperationIsMultithreaded
- */
- void sadd (const Number s,
- const Number a,
- const Vector<Number> &V,
- const Number b,
- const Vector<Number> &W) DEAL_II_DEPRECATED;
-
- /**
- * Scaling and multiple addition. <tt>*this = s*(*this)+a*V + b*W +
- * c*X</tt>.
- *
- * This function is deprecated.
- *
- * @dealiiOperationIsMultithreaded
- */
- void sadd (const Number s,
- const Number a,
- const Vector<Number> &V,
- const Number b,
- const Vector<Number> &W,
- const Number c,
- const Vector<Number> &X) DEAL_II_DEPRECATED;
-
/**
* Scale each element of the vector by a constant value.
*
template <typename Number2>
void equ (const Number a, const Vector<Number2> &u);
- /**
- * Assignment <tt>*this = a*u + b*v</tt>.
- *
- * This function is deprecated.
- *
- * @dealiiOperationIsMultithreaded
- */
- void equ (const Number a, const Vector<Number> &u,
- const Number b, const Vector<Number> &v) DEAL_II_DEPRECATED;
-
- /**
- * Assignment <tt>*this = a*u + b*v + b*w</tt>.
- *
- * This function is deprecated.
- *
- * @dealiiOperationIsMultithreaded
- */
- void equ (const Number a, const Vector<Number> &u,
- const Number b, const Vector<Number> &v,
- const Number c, const Vector<Number> &w) DEAL_II_DEPRECATED;
-
/**
* Compute the elementwise ratio of the two given vectors, that is let
* <tt>this[i] = a[i]/b[i]</tt>. This is useful for example if you want to
-template <typename Number>
-void Vector<Number>::sadd (const Number x, const Number a,
- const Vector<Number> &v, const Number b,
- const Vector<Number> &w)
-{
- AssertIsFinite(x);
- AssertIsFinite(a);
- AssertIsFinite(b);
-
- Assert (vec_size!=0, ExcEmptyObject());
- Assert (vec_size == v.vec_size, ExcDimensionMismatch(vec_size, v.vec_size));
- Assert (vec_size == w.vec_size, ExcDimensionMismatch(vec_size, w.vec_size));
-
- internal::VectorOperations::Vectorization_sadd_xavbw<Number> vector_sadd(val, v.val, w.val, x,
- a, b);
- internal::VectorOperations::parallel_for(vector_sadd,0,vec_size,thread_loop_partitioner);
-}
-
-
-template <typename Number>
-void Vector<Number>::sadd (const Number x, const Number a,
- const Vector<Number> &v, const Number b,
- const Vector<Number> &w, const Number c,
- const Vector<Number> &y)
-{
- sadd (x, a, v, b, w);
- add (c, y);
-}
-
-
-
template <typename Number>
void Vector<Number>::scale (const Vector<Number> &s)
{
-template <typename Number>
-void Vector<Number>::equ (const Number a, const Vector<Number> &u,
- const Number b, const Vector<Number> &v)
-{
- AssertIsFinite(a);
- AssertIsFinite(b);
-
- Assert (vec_size!=0, ExcEmptyObject());
- Assert (vec_size == u.vec_size, ExcDimensionMismatch(vec_size, u.vec_size));
- Assert (vec_size == v.vec_size, ExcDimensionMismatch(vec_size, v.vec_size));
-
- internal::VectorOperations::Vectorization_equ_aubv<Number> vector_equ(val, u.val, v.val, a, b);
- internal::VectorOperations::parallel_for(vector_equ,0,vec_size,thread_loop_partitioner);
-}
-
-
-template <typename Number>
-void Vector<Number>::equ (const Number a, const Vector<Number> &u,
- const Number b, const Vector<Number> &v,
- const Number c, const Vector<Number> &w)
-{
- Assert (vec_size!=0, ExcEmptyObject());
- Assert (vec_size == u.vec_size, ExcDimensionMismatch(vec_size, u.vec_size));
- Assert (vec_size == v.vec_size, ExcDimensionMismatch(vec_size, v.vec_size));
- Assert (vec_size == w.vec_size, ExcDimensionMismatch(vec_size, w.vec_size));
-
- internal::VectorOperations::Vectorization_equ_aubvcw<Number> vector_equ(val, u.val, v.val, w.val,
- a, b, c);
- internal::VectorOperations::parallel_for(vector_equ,0,vec_size,thread_loop_partitioner);
-}
-
-
template <typename Number>
void Vector<Number>::ratio (const Vector<Number> &a,
const Vector<Number> &b)
- void
- VectorBase::sadd (const PetscScalar s,
- const PetscScalar a,
- const VectorBase &v,
- const PetscScalar b,
- const VectorBase &w)
- {
- Assert (!has_ghost_elements(), ExcGhostsPresent());
- AssertIsFinite(s);
- AssertIsFinite(a);
- AssertIsFinite(b);
-
- // there is no operation like MAXPAY, so
- // do it in two steps
- *this *= s;
-
- const PetscScalar weights[2] = {a,b};
- Vec addends[2] = {v.vector,w.vector};
-
- const PetscErrorCode ierr = VecMAXPY (vector, 2, weights, addends);
- AssertThrow (ierr == 0, ExcPETScError(ierr));
- }
-
-
-
- void
- VectorBase::sadd (const PetscScalar s,
- const PetscScalar a,
- const VectorBase &v,
- const PetscScalar b,
- const VectorBase &w,
- const PetscScalar c,
- const VectorBase &x)
- {
- Assert (!has_ghost_elements(), ExcGhostsPresent());
- AssertIsFinite(s);
- AssertIsFinite(a);
- AssertIsFinite(b);
- AssertIsFinite(c);
-
- // there is no operation like MAXPAY, so
- // do it in two steps
- *this *= s;
-
- const PetscScalar weights[3] = {a,b,c};
- Vec addends[3] = {v.vector, w.vector, x.vector};
-
- const PetscErrorCode ierr = VecMAXPY (vector, 3, weights, addends);
- AssertThrow (ierr == 0, ExcPETScError(ierr));
- }
-
-
-
void
VectorBase::scale (const VectorBase &factors)
{
- void
- VectorBase::equ (const PetscScalar a,
- const VectorBase &v,
- const PetscScalar b,
- const VectorBase &w)
- {
- Assert (!has_ghost_elements(), ExcGhostsPresent());
- AssertIsFinite(a);
- AssertIsFinite(b);
-
- Assert (size() == v.size(),
- ExcDimensionMismatch (size(), v.size()));
-
- // there is no simple operation for this
- // in PETSc. there are multiple ways to
- // emulate it, we choose this one:
- const PetscErrorCode ierr = VecCopy (v.vector, vector);
- AssertThrow (ierr == 0, ExcPETScError(ierr));
-
- sadd (a, b, w);
- }
-
-
-
void
VectorBase::ratio (const VectorBase &a,
const VectorBase &b)
d2.sadd (2., .5, d1);
print (d2);
- d1.sadd (2, 2, d2, 2, d3);
- print (d1);
-
d1 *= 4.;
print (d1);
d2.equ (.25, d1);
print (d2);
- d2.equ (.25, d1, 2, d3);
- print (d2);
-
d1.ratio (d1, d2);
print (d1);
}
DEAL::sadd & scale
DEAL::-1.00 -0.25 0.50 1.25 2.00 2.75 3.50 4.25 5.00 5.75
DEAL::0 1.88 3.75 5.62 7.50 9.38 11.25 13.12 15.00 16.88
-DEAL::12.00 16.25 20.50 24.75 29.00 33.25 37.50 41.75 46.00 50.25
-DEAL::48.00 65.00 82.00 99.00 116.00 133.00 150.00 167.00 184.00 201.00
+DEAL::16.00 19.00 22.00 25.00 28.00 31.00 34.00 37.00 40.00 43.00
DEAL::equ
-DEAL::12.00 16.25 20.50 24.75 29.00 33.25 37.50 41.75 46.00 50.25
-DEAL::16.00 19.25 22.50 25.75 29.00 32.25 35.50 38.75 42.00 45.25
-DEAL::3.00 3.38 3.64 3.84 4.00 4.12 4.23 4.31 4.38 4.44
+DEAL::4.00 4.75 5.50 6.25 7.00 7.75 8.50 9.25 10.00 10.75
+DEAL::4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00
DEAL::Fill & Swap
DEAL::0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
DEAL::0.00 2.00 4.00 6.00 8.00 10.00 12.00 14.00 16.00 18.00
DEAL::sadd & scale
DEAL::-1.00 -0.25 0.50 1.25 2.00 2.75 3.50 4.25 5.00 5.75
DEAL::0.00 1.88 3.75 5.62 7.50 9.38 11.25 13.12 15.00 16.88
-DEAL::12.00 16.25 20.50 24.75 29.00 33.25 37.50 41.75 46.00 50.25
-DEAL::48.00 65.00 82.00 99.00 116.00 133.00 150.00 167.00 184.00 201.00
+DEAL::16.00 19.00 22.00 25.00 28.00 31.00 34.00 37.00 40.00 43.00
DEAL::equ
-DEAL::12.00 16.25 20.50 24.75 29.00 33.25 37.50 41.75 46.00 50.25
-DEAL::16.00 19.25 22.50 25.75 29.00 32.25 35.50 38.75 42.00 45.25
-DEAL::3.00 3.38 3.64 3.84 4.00 4.12 4.23 4.31 4.38 4.44
+DEAL::4.00 4.75 5.50 6.25 7.00 7.75 8.50 9.25 10.00 10.75
+DEAL::4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00
DEAL::Fill & Swap
DEAL::0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
DEAL::0.00 2.00 4.00 6.00 8.00 10.00 12.00 14.00 16.00 18.00
DEAL::sadd & scale
DEAL::-1.00 -0.25 0.50 1.25 2.00 2.75 3.50 4.25 5.00 5.75
DEAL::0.00 1.88 3.75 5.62 7.50 9.38 11.25 13.12 15.00 16.88
-DEAL::12.00 16.25 20.50 24.75 29.00 33.25 37.50 41.75 46.00 50.25
-DEAL::48.00 65.00 82.00 99.00 116.00 133.00 150.00 167.00 184.00 201.00
+DEAL::16.00 19.00 22.00 25.00 28.00 31.00 34.00 37.00 40.00 43.00
DEAL::equ
-DEAL::12.00 16.25 20.50 24.75 29.00 33.25 37.50 41.75 46.00 50.25
-DEAL::16.00 19.25 22.50 25.75 29.00 32.25 35.50 38.75 42.00 45.25
-DEAL::3.00 3.38 3.64 3.84 4.00 4.12 4.23 4.31 4.38 4.44
+DEAL::4.00 4.75 5.50 6.25 7.00 7.75 8.50 9.25 10.00 10.75
+DEAL::4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2004 - 2016 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE at
-// the top level of the deal.II distribution.
-//
-// ---------------------------------------------------------------------
-
-
-
-// check Vector<std::complex<double> >::sadd(s,s,V,s,V)
-
-#include "../tests.h"
-#include <deal.II/lac/vector.h>
-#include <fstream>
-#include <iomanip>
-#include <vector>
-
-
-void test (Vector<std::complex<double> > &v,
- Vector<std::complex<double> > &w,
- Vector<std::complex<double> > &x)
-{
- for (unsigned int i=0; i<v.size(); ++i)
- {
- v(i) = i;
- w(i) = std::complex<double> (i+1., i+2.);
- x(i) = i+2.;
- }
-
- v.compress ();
- w.compress ();
- x.compress ();
-
- v.sadd (1.5, 2, w, 3, x);
-
- // make sure we get the expected result
- for (unsigned int i=0; i<v.size(); ++i)
- {
- AssertThrow (w(i) == std::complex<double> (i+1., i+2.), ExcInternalError());
- AssertThrow (x(i) == i+2., ExcInternalError());
- AssertThrow (v(i) == 1.5*i+2.*std::complex<double> (i+1., i+2.)+3*(i+2.),
- ExcInternalError());
- }
-
- deallog << "OK" << std::endl;
-}
-
-
-
-int main ()
-{
- initlog();
- deallog.threshold_double(1.e-10);
-
- try
- {
- Vector<std::complex<double> > v (100);
- Vector<std::complex<double> > w (100);
- Vector<std::complex<double> > x (100);
- test (v,w,x);
- }
- catch (std::exception &exc)
- {
- deallog << std::endl << std::endl
- << "----------------------------------------------------"
- << std::endl;
- deallog << "Exception on processing: " << std::endl
- << exc.what() << std::endl
- << "Aborting!" << std::endl
- << "----------------------------------------------------"
- << std::endl;
-
- return 1;
- }
- catch (...)
- {
- deallog << std::endl << std::endl
- << "----------------------------------------------------"
- << std::endl;
- deallog << "Unknown exception!" << std::endl
- << "Aborting!" << std::endl
- << "----------------------------------------------------"
- << std::endl;
- return 1;
- };
-}
+++ /dev/null
-
-DEAL::OK
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2004 - 2016 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE at
-// the top level of the deal.II distribution.
-//
-// ---------------------------------------------------------------------
-
-
-
-// check Vector<std::complex<double> >::sadd(s,s,V,s,V,s,V)
-
-#include "../tests.h"
-#include <deal.II/lac/vector.h>
-#include <fstream>
-#include <iomanip>
-#include <vector>
-
-
-void test (Vector<std::complex<double> > &v,
- Vector<std::complex<double> > &w,
- Vector<std::complex<double> > &x,
- Vector<std::complex<double> > &y)
-{
- for (unsigned int i=0; i<v.size(); ++i)
- {
- v(i) = i;
- w(i) = std::complex<double> (i+1., i+2.);
- x(i) = i+2.;
- y(i) = std::complex<double> (i+3., i+4.);
- }
-
- v.compress ();
- w.compress ();
- x.compress ();
- y.compress ();
-
- v.sadd (1.5, 2, w, 3, x, 4, y);
-
- // make sure we get the expected result
- for (unsigned int i=0; i<v.size(); ++i)
- {
- AssertThrow (w(i) == std::complex<double> (i+1., i+2.),
- ExcInternalError());
- AssertThrow (x(i) == i+2., ExcInternalError());
- AssertThrow (y(i) == std::complex<double> (i+3., i+4.),
- ExcInternalError());
- AssertThrow (v(i) ==
- 1.5*i+2.*std::complex<double> (i+1., i+2.)+
- 3.*(i+2.)+4.*std::complex<double> (i+3., i+4.),
- ExcInternalError());
- }
-
- deallog << "OK" << std::endl;
-}
-
-
-
-int main ()
-{
- initlog();
- deallog.threshold_double(1.e-10);
-
- try
- {
- Vector<std::complex<double> > v (100);
- Vector<std::complex<double> > w (100);
- Vector<std::complex<double> > x (100);
- Vector<std::complex<double> > y (100);
- test (v,w,x,y);
- }
- catch (std::exception &exc)
- {
- deallog << std::endl << std::endl
- << "----------------------------------------------------"
- << std::endl;
- deallog << "Exception on processing: " << std::endl
- << exc.what() << std::endl
- << "Aborting!" << std::endl
- << "----------------------------------------------------"
- << std::endl;
-
- return 1;
- }
- catch (...)
- {
- deallog << std::endl << std::endl
- << "----------------------------------------------------"
- << std::endl;
- deallog << "Unknown exception!" << std::endl
- << "Aborting!" << std::endl
- << "----------------------------------------------------"
- << std::endl;
- return 1;
- };
-}
+++ /dev/null
-
-DEAL::OK
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2004 - 2016 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE at
-// the top level of the deal.II distribution.
-//
-// ---------------------------------------------------------------------
-
-
-
-// check Vector<std::complex<double> >::equ (s,V,s,V)
-
-#include "../tests.h"
-#include <deal.II/lac/vector.h>
-#include <fstream>
-#include <iomanip>
-#include <vector>
-
-
-void test (Vector<std::complex<double> > &v,
- Vector<std::complex<double> > &w,
- Vector<std::complex<double> > &x)
-{
- for (unsigned int i=0; i<v.size(); ++i)
- {
- v(i) = i;
- w(i) = std::complex<double> (i+1., i+2.);
- x(i) = i+2.;
- }
-
- v.compress ();
- w.compress ();
- x.compress ();
-
- v.equ (2, w, 3, x);
-
- // make sure we get the expected result
- for (unsigned int i=0; i<v.size(); ++i)
- {
- AssertThrow (w(i) == std::complex<double> (i+1., i+2.),
- ExcInternalError());
- AssertThrow (x(i) == i+2., ExcInternalError());
- AssertThrow (v(i) == 2.*std::complex<double> (i+1., i+2.)+3.*(i+2.),
- ExcInternalError());
- }
-
- deallog << "OK" << std::endl;
-}
-
-
-
-int main ()
-{
- initlog();
- deallog.threshold_double(1.e-10);
-
- try
- {
- Vector<std::complex<double> > v (100);
- Vector<std::complex<double> > w (100);
- Vector<std::complex<double> > x (100);
- test (v,w,x);
- }
- catch (std::exception &exc)
- {
- deallog << std::endl << std::endl
- << "----------------------------------------------------"
- << std::endl;
- deallog << "Exception on processing: " << std::endl
- << exc.what() << std::endl
- << "Aborting!" << std::endl
- << "----------------------------------------------------"
- << std::endl;
-
- return 1;
- }
- catch (...)
- {
- deallog << std::endl << std::endl
- << "----------------------------------------------------"
- << std::endl;
- deallog << "Unknown exception!" << std::endl
- << "Aborting!" << std::endl
- << "----------------------------------------------------"
- << std::endl;
- return 1;
- };
-}
+++ /dev/null
-
-DEAL::OK
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2004 - 2016 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE at
-// the top level of the deal.II distribution.
-//
-// ---------------------------------------------------------------------
-
-
-
-// check Vector<double>::sadd(s,s,V,s,V)
-
-#include "../tests.h"
-#include <deal.II/lac/vector.h>
-#include <fstream>
-#include <iomanip>
-#include <vector>
-
-
-void test (Vector<double> &v,
- Vector<double> &w,
- Vector<double> &x)
-{
- for (unsigned int i=0; i<v.size(); ++i)
- {
- v(i) = i;
- w(i) = i+1.;
- x(i) = i+2.;
- }
-
- v.compress ();
- w.compress ();
- x.compress ();
-
- v.sadd (1.5, 2, w, 3, x);
-
- // make sure we get the expected result
- for (unsigned int i=0; i<v.size(); ++i)
- {
- AssertThrow (w(i) == i+1., ExcInternalError());
- AssertThrow (x(i) == i+2., ExcInternalError());
- AssertThrow (v(i) == 1.5*i+2*(i+1.)+3*(i+2.), ExcInternalError());
- }
-
- deallog << "OK" << std::endl;
-}
-
-
-
-int main ()
-{
- initlog();
- deallog.threshold_double(1.e-10);
-
- try
- {
- Vector<double> v (100);
- Vector<double> w (100);
- Vector<double> x (100);
- test (v,w,x);
- }
- catch (std::exception &exc)
- {
- deallog << std::endl << std::endl
- << "----------------------------------------------------"
- << std::endl;
- deallog << "Exception on processing: " << std::endl
- << exc.what() << std::endl
- << "Aborting!" << std::endl
- << "----------------------------------------------------"
- << std::endl;
-
- return 1;
- }
- catch (...)
- {
- deallog << std::endl << std::endl
- << "----------------------------------------------------"
- << std::endl;
- deallog << "Unknown exception!" << std::endl
- << "Aborting!" << std::endl
- << "----------------------------------------------------"
- << std::endl;
- return 1;
- };
-}
+++ /dev/null
-
-DEAL::OK
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2004 - 2016 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE at
-// the top level of the deal.II distribution.
-//
-// ---------------------------------------------------------------------
-
-
-
-// check Vector<double>::sadd(s,s,V,s,V,s,V)
-
-#include "../tests.h"
-#include <deal.II/lac/vector.h>
-#include <fstream>
-#include <iomanip>
-#include <vector>
-
-
-void test (Vector<double> &v,
- Vector<double> &w,
- Vector<double> &x,
- Vector<double> &y)
-{
- for (unsigned int i=0; i<v.size(); ++i)
- {
- v(i) = i;
- w(i) = i+1.;
- x(i) = i+2.;
- y(i) = i+3.;
- }
-
- v.compress ();
- w.compress ();
- x.compress ();
- y.compress ();
-
- v.sadd (1.5, 2, w, 3, x, 4, y);
-
- // make sure we get the expected result
- for (unsigned int i=0; i<v.size(); ++i)
- {
- AssertThrow (w(i) == i+1., ExcInternalError());
- AssertThrow (x(i) == i+2., ExcInternalError());
- AssertThrow (y(i) == i+3., ExcInternalError());
- AssertThrow (v(i) == 1.5*i+2*(i+1.)+3*(i+2.)+4*(i+3), ExcInternalError());
- }
-
- deallog << "OK" << std::endl;
-}
-
-
-
-int main ()
-{
- initlog();
- deallog.threshold_double(1.e-10);
-
- try
- {
- Vector<double> v (100);
- Vector<double> w (100);
- Vector<double> x (100);
- Vector<double> y (100);
- test (v,w,x,y);
- }
- catch (std::exception &exc)
- {
- deallog << std::endl << std::endl
- << "----------------------------------------------------"
- << std::endl;
- deallog << "Exception on processing: " << std::endl
- << exc.what() << std::endl
- << "Aborting!" << std::endl
- << "----------------------------------------------------"
- << std::endl;
-
- return 1;
- }
- catch (...)
- {
- deallog << std::endl << std::endl
- << "----------------------------------------------------"
- << std::endl;
- deallog << "Unknown exception!" << std::endl
- << "Aborting!" << std::endl
- << "----------------------------------------------------"
- << std::endl;
- return 1;
- };
-}
+++ /dev/null
-
-DEAL::OK
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2004 - 2016 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE at
-// the top level of the deal.II distribution.
-//
-// ---------------------------------------------------------------------
-
-
-
-// check Vector<double>::equ (s,V,s,V)
-
-#include "../tests.h"
-#include <deal.II/lac/vector.h>
-#include <fstream>
-#include <iomanip>
-#include <vector>
-
-
-void test (Vector<double> &v,
- Vector<double> &w,
- Vector<double> &x)
-{
- for (unsigned int i=0; i<v.size(); ++i)
- {
- v(i) = i;
- w(i) = i+1.;
- x(i) = i+2.;
- }
-
- v.compress ();
- w.compress ();
- x.compress ();
-
- v.equ (2, w, 3, x);
-
- // make sure we get the expected result
- for (unsigned int i=0; i<v.size(); ++i)
- {
- AssertThrow (w(i) == i+1., ExcInternalError());
- AssertThrow (x(i) == i+2., ExcInternalError());
- AssertThrow (v(i) == 2*(i+1.)+3*(i+2.), ExcInternalError());
- }
-
- deallog << "OK" << std::endl;
-}
-
-
-
-int main ()
-{
- initlog();
- deallog.threshold_double(1.e-10);
-
- try
- {
- Vector<double> v (100);
- Vector<double> w (100);
- Vector<double> x (100);
- test (v,w,x);
- }
- catch (std::exception &exc)
- {
- deallog << std::endl << std::endl
- << "----------------------------------------------------"
- << std::endl;
- deallog << "Exception on processing: " << std::endl
- << exc.what() << std::endl
- << "Aborting!" << std::endl
- << "----------------------------------------------------"
- << std::endl;
-
- return 1;
- }
- catch (...)
- {
- deallog << std::endl << std::endl
- << "----------------------------------------------------"
- << std::endl;
- deallog << "Unknown exception!" << std::endl
- << "Aborting!" << std::endl
- << "----------------------------------------------------"
- << std::endl;
- return 1;
- };
-}
+++ /dev/null
-
-DEAL::OK