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\}}\)
fe_field_function.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2007 - 2019 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_fe_function_h
17 #define dealii_fe_function_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/base/function.h>
22 #include <deal.II/base/point.h>
24 #include <deal.II/base/tensor.h>
26 
29 
30 #include <deal.II/fe/mapping_q1.h>
31 
33 
34 #include <deal.II/lac/vector.h>
35 
36 
38 
39 // Forward declaration
40 #ifndef DOXYGEN
41 namespace VectorTools
42 {
44 }
45 #endif
46 
47 namespace Functions
48 {
163  template <int dim,
164  typename DoFHandlerType = DoFHandler<dim>,
165  typename VectorType = Vector<double>>
166  class FEFieldFunction : public Function<dim, typename VectorType::value_type>
167  {
168  public:
178  const DoFHandlerType &dh,
179  const VectorType & data_vector,
181 
187  void
189  const typename DoFHandlerType::active_cell_iterator &newcell);
190 
206  virtual void
207  vector_value(
208  const Point<dim> & p,
209  Vector<typename VectorType::value_type> &values) const override;
210 
228  virtual typename VectorType::value_type
229  value(const Point<dim> &p, const unsigned int component = 0) const override;
230 
246  virtual void
247  value_list(const std::vector<Point<dim>> & points,
248  std::vector<typename VectorType::value_type> &values,
249  const unsigned int component = 0) const override;
250 
251 
267  virtual void
268  vector_value_list(const std::vector<Point<dim>> &points,
270  &values) const override;
271 
287  virtual void
288  vector_gradient(const Point<dim> &p,
290  &gradients) const override;
291 
308  gradient(const Point<dim> & p,
309  const unsigned int component = 0) const override;
310 
324  virtual void
326  const std::vector<Point<dim>> &p,
327  std::vector<std::vector<Tensor<1, dim, typename VectorType::value_type>>>
328  &gradients) const override;
329 
343  virtual void
345  const std::vector<Point<dim>> & p,
346  std::vector<Tensor<1, dim, typename VectorType::value_type>> &gradients,
347  const unsigned int component = 0) const override;
348 
349 
361  virtual typename VectorType::value_type
362  laplacian(const Point<dim> & p,
363  const unsigned int component = 0) const override;
364 
377  virtual void
379  const Point<dim> & p,
380  Vector<typename VectorType::value_type> &values) const override;
381 
393  virtual void
394  laplacian_list(const std::vector<Point<dim>> & points,
395  std::vector<typename VectorType::value_type> &values,
396  const unsigned int component = 0) const override;
397 
409  virtual void
410  vector_laplacian_list(const std::vector<Point<dim>> &points,
412  &values) const override;
413 
436  unsigned int
438  const std::vector<Point<dim>> & points,
439  std::vector<typename DoFHandlerType::active_cell_iterator> &cells,
440  std::vector<std::vector<Point<dim>>> & qpoints,
441  std::vector<std::vector<unsigned int>> & maps) const;
442 
443  private:
448  typename DoFHandlerType::active_cell_iterator>;
449 
453  SmartPointer<const DoFHandlerType,
455  dh;
456 
461 
466 
471 
476 
482  std_cxx17::optional<Point<dim>>
484  const typename DoFHandlerType::active_cell_iterator &cell,
485  const Point<dim> & point) const;
486  };
487 } // namespace Functions
488 
490 
491 #endif
Functions::FEFieldFunction::cache
GridTools::Cache< dim, DoFHandlerType::space_dimension > cache
Definition: fe_field_function.h:470
Functions::FEFieldFunction::vector_gradient
virtual void vector_gradient(const Point< dim > &p, std::vector< Tensor< 1, dim, typename VectorType::value_type >> &gradients) const override
Functions::FEFieldFunction::cell_hint
cell_hint_t cell_hint
Definition: fe_field_function.h:475
Functions
Definition: flow_function.h:28
Functions::FEFieldFunction::laplacian
virtual VectorType::value_type laplacian(const Point< dim > &p, const unsigned int component=0) const override
StaticMappingQ1
Definition: mapping_q1.h:88
optional.h
Functions::FEFieldFunction::gradient
virtual Tensor< 1, dim, typename VectorType::value_type > gradient(const Point< dim > &p, const unsigned int component=0) const override
Functions::FEFieldFunction::gradient_list
virtual void gradient_list(const std::vector< Point< dim >> &p, std::vector< Tensor< 1, dim, typename VectorType::value_type >> &gradients, const unsigned int component=0) const override
mapping_q1.h
VectorType
Functions::FEFieldFunction::get_reference_coordinates
std_cxx17::optional< Point< dim > > get_reference_coordinates(const typename DoFHandlerType::active_cell_iterator &cell, const Point< dim > &point) const
Functions::FEFieldFunction
Definition: fe_field_function.h:166
Functions::FEFieldFunction::vector_value_list
virtual void vector_value_list(const std::vector< Point< dim >> &points, std::vector< Vector< typename VectorType::value_type >> &values) const override
DoFHandler< dim >
Functions::FEFieldFunction::vector_laplacian
virtual void vector_laplacian(const Point< dim > &p, Vector< typename VectorType::value_type > &values) const override
thread_local_storage.h
Functions::FEFieldFunction::vector_laplacian_list
virtual void vector_laplacian_list(const std::vector< Point< dim >> &points, std::vector< Vector< typename VectorType::value_type >> &values) const override
Functions::FEFieldFunction::data_vector
const VectorType & data_vector
Definition: fe_field_function.h:460
Functions::FEFieldFunction::vector_gradient_list
virtual void vector_gradient_list(const std::vector< Point< dim >> &p, std::vector< std::vector< Tensor< 1, dim, typename VectorType::value_type >>> &gradients) const override
OpenCASCADE::point
Point< spacedim > point(const gp_Pnt &p, const double tolerance=1e-10)
Definition: utilities.cc:188
Functions::FEFieldFunction::vector_value
virtual void vector_value(const Point< dim > &p, Vector< typename VectorType::value_type > &values) const override
VectorTools
Definition: vector_tools.h:303
Functions::FEFieldFunction::FEFieldFunction
FEFieldFunction(const DoFHandlerType &dh, const VectorType &data_vector, const Mapping< dim > &mapping=StaticMappingQ1< dim >::mapping)
Mapping< dim >
tensor.h
Functions::FEFieldFunction::dh
SmartPointer< const DoFHandlerType, FEFieldFunction< dim, DoFHandlerType, VectorType > > dh
Definition: fe_field_function.h:455
Functions::FEFieldFunction::compute_point_locations
unsigned int compute_point_locations(const std::vector< Point< dim >> &points, std::vector< typename DoFHandlerType::active_cell_iterator > &cells, std::vector< std::vector< Point< dim >>> &qpoints, std::vector< std::vector< unsigned int >> &maps) const
VectorTools::ExcPointNotAvailableHere
static ::ExceptionBase & ExcPointNotAvailableHere()
Functions::FEFieldFunction::laplacian_list
virtual void laplacian_list(const std::vector< Point< dim >> &points, std::vector< typename VectorType::value_type > &values, const unsigned int component=0) const override
Functions::FEFieldFunction::mapping
const Mapping< dim > & mapping
Definition: fe_field_function.h:465
Tensor
Definition: tensor.h:450
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
Threads::ThreadLocalStorage
A class that provides a separate storage location on each thread that accesses the object.
Definition: thread_local_storage.h:72
GridTools::Cache
Definition: grid_tools.h:128
SmartPointer
Definition: smartpointer.h:68
function.h
vector.h
Functions::FEFieldFunction::set_active_cell
void set_active_cell(const typename DoFHandlerType::active_cell_iterator &newcell)
dof_handler.h
dof_accessor.h
grid_tools_cache.h
Point< dim >
config.h
Function
Definition: function.h:151
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
Functions::FEFieldFunction::value_list
virtual void value_list(const std::vector< Point< dim >> &points, std::vector< typename VectorType::value_type > &values, const unsigned int component=0) const override
Vector< double >
Functions::FEFieldFunction::value
virtual VectorType::value_type value(const Point< dim > &p, const unsigned int component=0) const override
point.h