Reference documentation for deal.II version Git 180c135554 2021-06-23 17:42:41 -0400
\(\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 - 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_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 {
166  template <int dim, typename VectorType = Vector<double>, int spacedim = dim>
167  class FEFieldFunction : public Function<dim, typename VectorType::value_type>
168  {
169  public:
179  const DoFHandler<dim, spacedim> &dh,
180  const VectorType & data_vector,
181  const Mapping<dim> & mapping = StaticMappingQ1<dim>::mapping);
182 
188  void
189  set_active_cell(
190  const typename DoFHandler<dim, spacedim>::active_cell_iterator &newcell);
191 
207  virtual void
208  vector_value(
209  const Point<dim> & p,
211 
229  virtual typename VectorType::value_type
230  value(const Point<dim> &p, const unsigned int component = 0) const override;
231 
247  virtual void
248  value_list(const std::vector<Point<dim>> & points,
249  std::vector<typename VectorType::value_type> &values,
250  const unsigned int component = 0) const override;
251 
252 
268  virtual void
269  vector_value_list(const std::vector<Point<dim>> &points,
271  &values) const override;
272 
288  virtual void
289  vector_gradient(const Point<dim> &p,
291  &gradients) const override;
292 
309  gradient(const Point<dim> & p,
310  const unsigned int component = 0) const override;
311 
325  virtual void
326  vector_gradient_list(
327  const std::vector<Point<dim>> &p,
328  std::vector<std::vector<Tensor<1, dim, typename VectorType::value_type>>>
329  &gradients) const override;
330 
344  virtual void
345  gradient_list(
346  const std::vector<Point<dim>> & p,
348  const unsigned int component = 0) const override;
349 
350 
362  virtual typename VectorType::value_type
363  laplacian(const Point<dim> & p,
364  const unsigned int component = 0) const override;
365 
378  virtual void
379  vector_laplacian(
380  const Point<dim> & p,
381  Vector<typename VectorType::value_type> &values) const override;
382 
394  virtual void
395  laplacian_list(const std::vector<Point<dim>> & points,
396  std::vector<typename VectorType::value_type> &values,
397  const unsigned int component = 0) const override;
398 
410  virtual void
411  vector_laplacian_list(const std::vector<Point<dim>> &points,
413  &values) const override;
414 
437  unsigned int
439  const std::vector<Point<dim>> &points,
441  & cells,
442  std::vector<std::vector<Point<dim>>> & qpoints,
443  std::vector<std::vector<unsigned int>> &maps) const;
444 
445  private:
451 
457  dh;
458 
463 
468 
473 
478 
484  std_cxx17::optional<Point<dim>>
485  get_reference_coordinates(
487  const Point<dim> &point) const;
488  };
489 } // namespace Functions
490 
491 namespace Legacy
492 {
493  namespace Functions
494  {
499  template <int dim,
500  typename DoFHandlerType = DoFHandler<dim>,
501  typename VectorType = Vector<double>>
502  using FEFieldFunction DEAL_II_DEPRECATED = ::Functions::
503  FEFieldFunction<dim, VectorType, DoFHandlerType::space_dimension>;
504  } // namespace Functions
505 } // namespace Legacy
506 
507 
509 
510 #endif
static ::ExceptionBase & ExcPointNotAvailableHere()
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:399
::Functions::FEFieldFunction< dim, VectorType, DoFHandlerType::space_dimension > FEFieldFunction
Point< spacedim > point(const gp_Pnt &p, const double tolerance=1e-10)
Definition: utilities.cc:188
SmartPointer< const DoFHandler< dim, spacedim >, FEFieldFunction< dim, VectorType, spacedim > > dh
Definition: tensor.h:462
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:398
GridTools::Cache< dim, spacedim > cache
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:5438
typename ActiveSelector::active_cell_iterator active_cell_iterator
Definition: dof_handler.h:438
const Mapping< dim > & mapping
#define DEAL_II_DEPRECATED
Definition: config.h:158
const VectorType & data_vector