Reference documentation for deal.II version 9.1.0-pre
derivative_approximation.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2000 - 2018 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_derivative_approximation_h
17 #define dealii_derivative_approximation_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/base/exceptions.h>
22 #include <deal.II/base/synchronous_iterator.h>
23 
24 #include <deal.II/fe/fe_update_flags.h>
25 #include <deal.II/fe/mapping.h>
26 
27 #include <deal.II/grid/filtered_iterator.h>
28 
29 #include <deal.II/lac/vector.h>
30 #ifdef _MSC_VER
31 # include <deal.II/dofs/dof_accessor.h>
32 #endif
33 #include <utility>
34 
35 DEAL_II_NAMESPACE_OPEN
36 
161 {
177  template <int dim,
178  template <int, int> class DoFHandlerType,
179  class InputVector,
180  int spacedim>
181  void
183  const DoFHandlerType<dim, spacedim> &dof,
184  const InputVector & solution,
186  const unsigned int component = 0);
187 
192  template <int dim,
193  template <int, int> class DoFHandlerType,
194  class InputVector,
195  int spacedim>
196  void
197  approximate_gradient(const DoFHandlerType<dim, spacedim> &dof,
198  const InputVector & solution,
199  Vector<float> & derivative_norm,
200  const unsigned int component = 0);
201 
219  template <int dim,
220  template <int, int> class DoFHandlerType,
221  class InputVector,
222  int spacedim>
223  void
225  const DoFHandlerType<dim, spacedim> &dof,
226  const InputVector & solution,
227  Vector<float> & derivative_norm,
228  const unsigned int component = 0);
229 
234  template <int dim,
235  template <int, int> class DoFHandlerType,
236  class InputVector,
237  int spacedim>
238  void
239  approximate_second_derivative(const DoFHandlerType<dim, spacedim> &dof,
240  const InputVector & solution,
241  Vector<float> & derivative_norm,
242  const unsigned int component = 0);
243 
257  template <typename DoFHandlerType, class InputVector, int order>
258  void
261  & mapping,
262  const DoFHandlerType &dof,
263  const InputVector & solution,
264 #ifndef _MSC_VER
265  const typename DoFHandlerType::active_cell_iterator &cell,
266 #else
268  &cell,
269 #endif
271  const unsigned int component = 0);
272 
276  template <typename DoFHandlerType, class InputVector, int order>
277  void
279  const DoFHandlerType &dof,
280  const InputVector & solution,
281 #ifndef _MSC_VER
282  const typename DoFHandlerType::active_cell_iterator &cell,
283 #else
285  &cell,
286 #endif
288  const unsigned int component = 0);
289 
293  template <int dim, int order>
294  double
295  derivative_norm(const Tensor<order, dim> &derivative);
296 
301  int,
302  int,
303  << "The output vector needs to have a size equal "
304  "to the number of active cells of your triangulation "
305  "but has length "
306  << arg1 << "There are " << arg2
307  << " active cells in your triangulation.");
312  "We have encountered a cell on which the number of linearly "
313  "independent directions that span the matrix Y (discussed "
314  "in the documentation of the DerivativeApproximation "
315  "class) is not equal to dim. The matrix Y then is "
316  "rank deficient and can not be inverted.");
317 } // namespace DerivativeApproximation
318 
319 
320 
321 DEAL_II_NAMESPACE_CLOSE
322 
323 #endif
static::ExceptionBase & ExcInsufficientDirections()
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:420
Abstract base class for mapping classes.
Definition: dof_tools.h:57
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:397
double derivative_norm(const Tensor< order, dim > &derivative)
void approximate_derivative_tensor(const Mapping< DoFHandlerType::dimension, DoFHandlerType::space_dimension > &mapping, const DoFHandlerType &dof, const InputVector &solution, const typename DoFHandlerType::active_cell_iterator &cell, Tensor< order, DoFHandlerType::dimension > &derivative, const unsigned int component=0)
Definition: mpi.h:55
void approximate_second_derivative(const Mapping< dim, spacedim > &mapping, const DoFHandlerType< dim, spacedim > &dof, const InputVector &solution, Vector< float > &derivative_norm, const unsigned int component=0)
void approximate_gradient(const Mapping< dim, spacedim > &mapping, const DoFHandlerType< dim, spacedim > &dof, const InputVector &solution, Vector< float > &derivative_norm, const unsigned int component=0)
static::ExceptionBase & ExcVectorLengthVsNActiveCells(int arg1, int arg2)