deal.II version GIT relicensing-1991-gec5bc16adb 2024-10-14 08:00:00+00:00
\(\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\}}\)
Loading...
Searching...
No Matches
fe_field_function.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2007 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_fe_function_h
16#define dealii_fe_function_h
17
18#include <deal.II/base/config.h>
19
21#include <deal.II/base/point.h>
22#include <deal.II/base/tensor.h>
24
27
29
31
32#include <deal.II/lac/vector.h>
33
34#include <optional>
35
36
38
39// Forward declaration
40#ifndef DOXYGEN
41namespace VectorTools
42{
44}
45#endif
46
47namespace Functions
48{
183 template <int dim, typename VectorType = Vector<double>, int spacedim = dim>
184 class FEFieldFunction : public Function<dim, typename VectorType::value_type>
185 {
186 public:
197 const VectorType &data_vector,
199
205 void
208
224 virtual void
226 const Point<dim> &p,
227 Vector<typename VectorType::value_type> &values) const override;
228
246 virtual typename VectorType::value_type
247 value(const Point<dim> &p, const unsigned int component = 0) const override;
248
264 virtual void
265 value_list(const std::vector<Point<dim>> &points,
266 std::vector<typename VectorType::value_type> &values,
267 const unsigned int component = 0) const override;
268
269
285 virtual void
286 vector_value_list(const std::vector<Point<dim>> &points,
288 &values) const override;
289
305 virtual void
308 &gradients) const override;
309
327 const unsigned int component = 0) const override;
328
342 virtual void
344 const std::vector<Point<dim>> &p,
346 &gradients) const override;
347
361 virtual void
363 const std::vector<Point<dim>> &p,
365 const unsigned int component = 0) const override;
366
367
379 virtual typename VectorType::value_type
381 const unsigned int component = 0) const override;
382
395 virtual void
397 const Point<dim> &p,
398 Vector<typename VectorType::value_type> &values) const override;
399
411 virtual void
412 laplacian_list(const std::vector<Point<dim>> &points,
413 std::vector<typename VectorType::value_type> &values,
414 const unsigned int component = 0) const override;
415
427 virtual void
428 vector_laplacian_list(const std::vector<Point<dim>> &points,
430 &values) const override;
431
454 unsigned int
456 const std::vector<Point<dim>> &points,
458 &cells,
459 std::vector<std::vector<Point<dim>>> &qpoints,
460 std::vector<std::vector<unsigned int>> &maps) const;
461
462 private:
468
475
479 const VectorType &data_vector;
480
485
490
495
501 std::optional<Point<dim>>
504 const Point<dim> &point) const;
505 };
506} // namespace Functions
507
508
510
511#endif
unsigned int compute_point_locations(const std::vector< Point< dim > > &points, std::vector< typename DoFHandler< dim, spacedim >::active_cell_iterator > &cells, std::vector< std::vector< Point< dim > > > &qpoints, std::vector< std::vector< unsigned int > > &maps) const
virtual void value_list(const std::vector< Point< dim > > &points, std::vector< typename VectorType::value_type > &values, const unsigned int component=0) const override
virtual void vector_gradient(const Point< dim > &p, std::vector< Tensor< 1, dim, typename VectorType::value_type > > &gradients) const override
virtual void laplacian_list(const std::vector< Point< dim > > &points, std::vector< typename VectorType::value_type > &values, const unsigned int component=0) const override
virtual Tensor< 1, dim, typename VectorType::value_type > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual VectorType::value_type laplacian(const Point< dim > &p, const unsigned int component=0) const override
void set_active_cell(const typename DoFHandler< dim, spacedim >::active_cell_iterator &newcell)
virtual void vector_value(const Point< dim > &p, Vector< typename VectorType::value_type > &values) const override
virtual VectorType::value_type value(const Point< dim > &p, const unsigned int component=0) const override
GridTools::Cache< dim, spacedim > cache
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
ObserverPointer< const DoFHandler< dim, spacedim >, FEFieldFunction< dim, VectorType, spacedim > > dh
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
const Mapping< dim > & mapping
virtual void vector_value_list(const std::vector< Point< dim > > &points, std::vector< Vector< typename VectorType::value_type > > &values) const override
FEFieldFunction(const DoFHandler< dim, spacedim > &dh, const VectorType &data_vector, const Mapping< dim > &mapping=StaticMappingQ1< dim >::mapping)
virtual void vector_laplacian_list(const std::vector< Point< dim > > &points, std::vector< Vector< typename VectorType::value_type > > &values) const override
std::optional< Point< dim > > get_reference_coordinates(const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, const Point< dim > &point) const
virtual void vector_laplacian(const Point< dim > &p, Vector< typename VectorType::value_type > &values) const override
Abstract base class for mapping classes.
Definition mapping.h:318
Definition point.h:111
A class that provides a separate storage location on each thread that accesses the object.
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:498
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:499
static ::ExceptionBase & ExcPointNotAvailableHere()
typename ActiveSelector::active_cell_iterator active_cell_iterator