Reference documentation for deal.II version 9.2.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
derivative_approximation.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2000 - 2020 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 
23 
25 #include <deal.II/fe/mapping.h>
26 
28 
29 #include <deal.II/lac/vector.h>
30 #ifdef _MSC_VER
32 #endif
33 #include <utility>
34 
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 
191  template <int dim,
192  template <int, int> class DoFHandlerType,
193  class InputVector,
194  int spacedim>
195  void
196  approximate_gradient(const DoFHandlerType<dim, spacedim> &dof,
197  const InputVector & solution,
199  const unsigned int component = 0);
200 
218  template <int dim,
219  template <int, int> class DoFHandlerType,
220  class InputVector,
221  int spacedim>
222  void
224  const DoFHandlerType<dim, spacedim> &dof,
225  const InputVector & solution,
227  const unsigned int component = 0);
228 
232  template <int dim,
233  template <int, int> class DoFHandlerType,
234  class InputVector,
235  int spacedim>
236  void
237  approximate_second_derivative(const DoFHandlerType<dim, spacedim> &dof,
238  const InputVector & solution,
240  const unsigned int component = 0);
241 
255  template <typename DoFHandlerType, class InputVector, int order>
256  void
259  & mapping,
260  const DoFHandlerType &dof,
261  const InputVector & solution,
262 #ifndef _MSC_VER
263  const typename DoFHandlerType::active_cell_iterator &cell,
264 #else
266  &cell,
267 #endif
269  const unsigned int component = 0);
270 
274  template <typename DoFHandlerType, class InputVector, int order>
275  void
277  const DoFHandlerType &dof,
278  const InputVector & solution,
279 #ifndef _MSC_VER
280  const typename DoFHandlerType::active_cell_iterator &cell,
281 #else
283  &cell,
284 #endif
286  const unsigned int component = 0);
287 
291  template <int dim, int order>
292  double
293  derivative_norm(const Tensor<order, dim> &derivative);
294 
299  int,
300  int,
301  << "The output vector needs to have a size equal "
302  "to the number of active cells of your triangulation "
303  "but has length "
304  << arg1 << "There are " << arg2
305  << " active cells in your triangulation.");
310  "While computing a finite difference approximation to "
311  "derivatives, the algorithm encountered a cell on which "
312  "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. A common reason "
317  "why this might be happening is if a cell has neither "
318  "left/right (or up/down, or front/back) neighbors, for "
319  "example because the mesh is too coarse.");
320 } // namespace DerivativeApproximation
321 
322 
323 
325 
326 #endif
DeclExceptionMsg
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:496
fe_update_flags.h
DerivativeApproximation::approximate_gradient
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)
Definition: derivative_approximation.cc:1034
DerivativeApproximation::derivative_norm
double derivative_norm(const Tensor< order, dim > &derivative)
Definition: derivative_approximation.cc:1153
DerivativeApproximation::ExcInsufficientDirections
static ::ExceptionBase & ExcInsufficientDirections()
DerivativeApproximation
Definition: derivative_approximation.h:160
Mapping
Abstract base class for mapping classes.
Definition: mapping.h:302
Tensor
Definition: tensor.h:450
DerivativeApproximation::ExcVectorLengthVsNActiveCells
static ::ExceptionBase & ExcVectorLengthVsNActiveCells(int arg1, int arg2)
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
DoFCellAccessor
Definition: dof_accessor.h:1321
exceptions.h
TriaActiveIterator
Definition: tria_iterator.h:759
DerivativeApproximation::approximate_derivative_tensor
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: derivative_approximation.cc:1103
mapping.h
vector.h
dof_accessor.h
config.h
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
Vector
Definition: mapping_q1_eulerian.h:32
DeclException2
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:541
filtered_iterator.h
synchronous_iterator.h
DerivativeApproximation::approximate_second_derivative
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)
Definition: derivative_approximation.cc:1069