Reference documentation for deal.II version Git 4abc4a1666 2020-07-04 19:58:34 +0200
\(\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 {
162  template <int dim,
163  typename DoFHandlerType = DoFHandler<dim>,
164  typename VectorType = Vector<double>>
165  class FEFieldFunction : public Function<dim, typename VectorType::value_type>
166  {
167  public:
177  const DoFHandlerType &dh,
178  const VectorType & data_vector,
179  const Mapping<dim> & mapping = StaticMappingQ1<dim>::mapping);
180 
186  void
187  set_active_cell(
188  const typename DoFHandlerType::active_cell_iterator &newcell);
189 
205  virtual void
206  vector_value(
207  const Point<dim> & p,
209 
227  virtual typename VectorType::value_type
228  value(const Point<dim> &p, const unsigned int component = 0) const override;
229 
245  virtual void
246  value_list(const std::vector<Point<dim>> & points,
247  std::vector<typename VectorType::value_type> &values,
248  const unsigned int component = 0) const override;
249 
250 
266  virtual void
267  vector_value_list(const std::vector<Point<dim>> &points,
269  &values) const override;
270 
286  virtual void
287  vector_gradient(const Point<dim> &p,
289  &gradients) const override;
290 
307  gradient(const Point<dim> & p,
308  const unsigned int component = 0) const override;
309 
323  virtual void
324  vector_gradient_list(
325  const std::vector<Point<dim>> &p,
326  std::vector<std::vector<Tensor<1, dim, typename VectorType::value_type>>>
327  &gradients) const override;
328 
342  virtual void
343  gradient_list(
344  const std::vector<Point<dim>> & p,
346  const unsigned int component = 0) const override;
347 
348 
360  virtual typename VectorType::value_type
361  laplacian(const Point<dim> & p,
362  const unsigned int component = 0) const override;
363 
376  virtual void
377  vector_laplacian(
378  const Point<dim> & p,
379  Vector<typename VectorType::value_type> &values) const override;
380 
392  virtual void
393  laplacian_list(const std::vector<Point<dim>> & points,
394  std::vector<typename VectorType::value_type> &values,
395  const unsigned int component = 0) const override;
396 
408  virtual void
409  vector_laplacian_list(const std::vector<Point<dim>> &points,
411  &values) const override;
412 
435  unsigned int
437  const std::vector<Point<dim>> & points,
438  std::vector<typename DoFHandlerType::active_cell_iterator> &cells,
439  std::vector<std::vector<Point<dim>>> & qpoints,
440  std::vector<std::vector<unsigned int>> & maps) const;
441 
442  private:
447  typename DoFHandlerType::active_cell_iterator>;
448 
452  SmartPointer<const DoFHandlerType,
454  dh;
455 
459  const VectorType &data_vector;
460 
465 
470 
475 
481  std_cxx17::optional<Point<dim>>
482  get_reference_coordinates(
483  const typename DoFHandlerType::active_cell_iterator &cell,
484  const Point<dim> & point) const;
485  };
486 } // namespace Functions
487 
489 
490 #endif
SmartPointer< const DoFHandlerType, FEFieldFunction< dim, DoFHandlerType, VectorType > > dh
const Mapping< dim > & mapping
static ::ExceptionBase & ExcPointNotAvailableHere()
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:363
Point< spacedim > point(const gp_Pnt &p, const double tolerance=1e-10)
Definition: utilities.cc:188
const VectorType & data_vector
GridTools::Cache< dim, DoFHandlerType::space_dimension > cache
Definition: tensor.h:448
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:362
return_type compute_point_locations(const Cache< dim, spacedim > &cache, const std::vector< Point< spacedim >> &points, const typename Triangulation< dim, spacedim >::active_cell_iterator &cell_hint=typename Triangulation< dim, spacedim >::active_cell_iterator())
Definition: grid_tools.cc:4193