Reference documentation for deal.II version GIT relicensing-724-g64994cceda 2024-05-23 06:50:02+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{
166 template <int dim, typename VectorType = Vector<double>, int spacedim = dim>
167 class FEFieldFunction : public Function<dim, typename VectorType::value_type>
168 {
169 public:
180 const VectorType &data_vector,
182
188 void
191
207 virtual void
209 const Point<dim> &p,
210 Vector<typename VectorType::value_type> &values) const override;
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
291 &gradients) const override;
292
310 const unsigned int component = 0) const override;
311
325 virtual void
327 const std::vector<Point<dim>> &p,
329 &gradients) const override;
330
344 virtual void
346 const std::vector<Point<dim>> &p,
348 const unsigned int component = 0) const override;
349
350
362 virtual typename VectorType::value_type
364 const unsigned int component = 0) const override;
365
378 virtual void
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
458
462 const VectorType &data_vector;
463
468
473
478
484 std::optional<Point<dim>>
487 const Point<dim> &point) const;
488 };
489} // namespace Functions
490
491
493
494#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
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
SmartPointer< const DoFHandler< dim, spacedim >, FEFieldFunction< dim, VectorType, spacedim > > dh
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:502
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503
static ::ExceptionBase & ExcPointNotAvailableHere()
typename ActiveSelector::active_cell_iterator active_cell_iterator