From dc847d967f73eda8d42e9f8e218e5f09d8b65c50 Mon Sep 17 00:00:00 2001 From: angelrca Date: Mon, 29 Jun 2015 17:48:37 +0200 Subject: [PATCH] Fix Functions::Monomial::gradient Fix Functions::Monomial::gradient Fix Functions::Monomial::gradient Fix Functions::Monomial::gradient Fix Functions::Monomial::gradient --- doc/news/changes.h | 35 +++++++++++++++++------------ include/deal.II/base/function_lib.h | 3 ++- source/base/function_lib.cc | 13 +++++++++-- 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/doc/news/changes.h b/doc/news/changes.h index d7ba82cc23..397572b333 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -93,7 +93,7 @@ inconvenience this causes.
(Matthias Maier, 2015/03/26) - +
  • Changed: The TrilinosWrappers::SparseMatrix::clear_row() function used to call TrilinosWrappers::SparseMatrix::compress() before doing its work, but this is neither efficient nor safe. You will now have to do this @@ -423,7 +423,7 @@ inconvenience this causes.
    (Wolfgang Bangerth, 2015/04/19)
  • - +
  • New: A LinearOperator class that stores the abstract concept of a linear operator. The class is fully compatible with the solver and preconditioner interfaces. The primary purpose of this class is to @@ -456,9 +456,9 @@ inconvenience this causes. (Wolfgang Bangerth, 2015/04/11)
  • -
  • Changed: All example programs used to have calls to set_boundary() - methods to deal with curved boundaries. These have been replaced with - the corresponding set_manifold() equivalent. +
  • Changed: All example programs used to have calls to set_boundary() + methods to deal with curved boundaries. These have been replaced with + the corresponding set_manifold() equivalent.
    (Luca Heltai, 2015/04/06)
  • @@ -532,6 +532,13 @@ inconvenience this causes.

    Specific improvements

      +
    1. Improved: Functions::Monomial::gradient function now works when both base and exponent + are equal to zero for one or more components of the monomial. + Also, an assertion is added to avoid exponentiation of negative base numbers with real exponents. +
      + (Angel Rodriguez, 2015/06/29) +
    2. +
    3. Improved: The SparseMatrix class can now also use std::complex scalars for its elements.
      @@ -542,7 +549,7 @@ inconvenience this causes. the quadrature rule was Gauss points.
      (Guido Kanschat, 2015/06/22) -
    4. +
    5. Improved: DoFRenumbering::Cuthill_McKee() can now also use starting indices for parallel triangulations. @@ -579,8 +586,8 @@ inconvenience this causes. (Wolfgang Bangerth, 2015/05/11)
    6. -
    7. Changed: TrilinosWrappers::Vector, TrilinosWrappers::BlockVector, - PETScWrappers::Vector, and PETScWrappers::BlockVector are deprecated. Either +
    8. Changed: TrilinosWrappers::Vector, TrilinosWrappers::BlockVector, + PETScWrappers::Vector, and PETScWrappers::BlockVector are deprecated. Either use the MPI or the deal.II version of the Vector/BlockVector.
      (Bruno Turcksin, 2015/05/04) @@ -609,7 +616,7 @@ inconvenience this causes.
      (Timo Heister, Florian Sonner, 2015/04/30)
    9. - +
    10. New: There are now MPI sum functions for Tensors and SymmetricTensors in the Utilities::MPI namespace.
      @@ -628,7 +635,7 @@ inconvenience this causes.
      (Lei Qiao, 2015/04/19)
    11. - +
    12. New: The VectorTools::integrate_difference() function can now also compute the $H_\text{div}$ seminorm, using the VectorTools::NormType::Hdiv_seminorm argument. @@ -648,16 +655,16 @@ inconvenience this causes. (Wolfgang Bangerth, 2015/04/13)
    13. -
    14. New: The GridGenerator::subdivided_hyper_cube() and +
    15. New: The GridGenerator::subdivided_hyper_cube() and GridGenerator::subdivided_hyper_rectangle() now work also for codimension one and two Triangulation;
      (Luca Heltai, 2015/04/12)
    16. -
    17. New: A new VectorTools::get_position_vector() function has been - added to the library that allows one to interpolate the Geometry of - a (possibly curved) triangulation to vector finite element fields +
    18. New: A new VectorTools::get_position_vector() function has been + added to the library that allows one to interpolate the Geometry of + a (possibly curved) triangulation to vector finite element fields of at least spacedim components.
      (Luca Heltai, 2015/04/11) diff --git a/include/deal.II/base/function_lib.h b/include/deal.II/base/function_lib.h index 985d892c24..42ec3ca5b3 100644 --- a/include/deal.II/base/function_lib.h +++ b/include/deal.II/base/function_lib.h @@ -1031,7 +1031,8 @@ namespace Functions * described by a $dim$-tuple of exponents. Consequently, the class's * constructor takes a Tensor<1,dim> to describe the set of exponents. Most * of the time these exponents will of course be integers, but real - * exponents are of course equally valid. + * exponents are of course equally valid. Exponents can't be real when + * the bases are negative numbers. * * @author Wolfgang Bangerth, 2006 */ diff --git a/source/base/function_lib.cc b/source/base/function_lib.cc index 6abfcbe38d..ea7cc38dc2 100644 --- a/source/base/function_lib.cc +++ b/source/base/function_lib.cc @@ -2112,8 +2112,13 @@ namespace Functions double prod = 1; for (unsigned int s=0; s