From 44a6ecbe407a76a92461dd0479c7c0e036351122 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Mon, 7 Sep 2015 13:46:20 -0500 Subject: [PATCH] Tensor, Point: Remove constructor taking a boolean argument This boolean has no effect any more. Simply remove it. --- doc/news/changes.h | 10 +++++++++- include/deal.II/base/point.h | 16 ---------------- include/deal.II/base/tensor.h | 15 +++++---------- 3 files changed, 14 insertions(+), 27 deletions(-) diff --git a/doc/news/changes.h b/doc/news/changes.h index 9aea8bdf85..3c7e850128 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -39,6 +39,14 @@ inconvenience this causes.
    +
  1. Removed: Tensor as well as Point no + longer have a constructor taking a boolean argument. Those were replaced + by a default constructor will always initialize underlying values with + zero. +
    + (Matthias Maier, 2015/09/07) +
  2. +
  3. Removed: The testsuite no longer supports compiler constraints of the form ".compiler=[NAME]...".
    @@ -146,7 +154,7 @@ inconvenience this causes.
    (Matthias Maier, 2015/08/29)
  4. - +
  5. New: A class BlockLinearOperator has been introduced that extends the LinearOperator concept to block structures. A BlockLinearOperator can be sliced back to a LinearOperator. diff --git a/include/deal.II/base/point.h b/include/deal.II/base/point.h index 575637d44d..177011c85a 100644 --- a/include/deal.II/base/point.h +++ b/include/deal.II/base/point.h @@ -95,13 +95,6 @@ public: */ Point (); - /** - * Constructor. Initialize all entries to zero if initialize==true - * (in which case it is equivalent to the default constructor) or leaves the - * elements uninitialized if initialize==false. - */ - explicit Point (const bool initialize); - /** * Convert a tensor to a point. */ @@ -257,15 +250,6 @@ Point::Point () -template -inline -Point::Point (const bool initialize) - : - Tensor<1,dim,Number>(initialize) -{} - - - template inline Point::Point (const Tensor<1,dim,Number> &t) diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index 29b179ded4..fcdbf8e703 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -364,11 +364,9 @@ public: // array always has positive size. /** - * Constructor. Initialize all entries to zero if - * initialize==true; this is the default behaviour. + * Constructor. Initialize all entries to zero. */ - explicit - Tensor (const bool initialize = true); + Tensor (); /** * Copy constructor. @@ -822,13 +820,10 @@ namespace internal template inline -Tensor::Tensor (const bool /*initialize*/) +Tensor::Tensor () { // All members of the c-style array values are already default initialized // and thus all values are already set to zero recursively. - - // TODO: Think about using the default heap allocator to restore the old - // behavior. } @@ -1584,7 +1579,7 @@ Tensor<1,dim,Number> operator * (const Tensor<2,dim,Number> &src1, const Tensor<1,dim,Number> &src2) { - Tensor<1,dim,Number> dest (false); + Tensor<1,dim,Number> dest; for (unsigned int i=0; i operator * (const Tensor<1,dim,Number> &src1, const Tensor<2,dim,Number> &src2) { - Tensor<1,dim,Number> dest (false); + Tensor<1,dim,Number> dest; for (unsigned int i=0; i