16 #ifndef dealii_function_lib_h 17 #define dealii_function_lib_h 20 #include <deal.II/base/config.h> 22 #include <deal.II/base/function.h> 23 #include <deal.II/base/point.h> 24 #include <deal.II/base/smartpointer.h> 25 #include <deal.II/base/table.h> 29 DEAL_II_NAMESPACE_OPEN
56 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
61 std::vector<double> & values,
62 const unsigned int component = 0)
const override;
65 const unsigned int component = 0)
const override;
70 gradient_list(
const std::vector<
Point<dim>> &points,
72 const unsigned int component = 0)
const override;
75 const unsigned int component = 0)
const override;
78 std::vector<double> & values,
79 const unsigned int component = 0)
const override;
96 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
100 std::vector<double> & values,
101 const unsigned int component = 0)
const override;
109 const unsigned int component = 0)
const override;
112 gradient_list(
const std::vector<
Point<dim>> &points,
114 const unsigned int component = 0)
const override;
117 vector_gradient_list(
126 const unsigned int component = 0)
const override;
133 std::vector<double> & values,
134 const unsigned int component = 0)
const override;
168 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
175 std::vector<double> & values,
176 const unsigned int component = 0)
const override;
183 const unsigned int component = 0)
const override;
191 const unsigned int component = 0)
const override;
198 const unsigned int component = 0)
const override;
205 std::vector<double> & values,
206 const unsigned int component = 0)
const override;
233 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
237 std::vector<double> & values,
238 const unsigned int component = 0)
const override;
246 const unsigned int component = 0)
const override;
249 gradient_list(
const std::vector<
Point<dim>> &points,
251 const unsigned int component = 0)
const override;
255 const unsigned int component = 0)
const override;
259 std::vector<double> & values,
260 const unsigned int component = 0)
const override;
267 const unsigned int component = 0)
const override;
275 const unsigned int component = 0)
const override;
301 value(
const Point<dim> &p,
const unsigned int component)
const override;
306 std::vector<double> & values,
307 const unsigned int component)
const override;
317 gradient_list(
const std::vector<
Point<dim>> &points,
319 const unsigned int component)
const override;
322 vector_gradient_list(
324 std::vector<std::vector<
Tensor<1, dim>>> &gradients)
const override;
346 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
353 std::vector<double> & values,
354 const unsigned int component = 0)
const override;
361 const unsigned int component = 0)
const override;
369 const unsigned int component = 0)
const override;
376 const unsigned int component = 0)
const override;
383 std::vector<double> & values,
384 const unsigned int component = 0)
const override;
404 value(
const Point<2> &p,
const unsigned int component = 0)
const override;
407 value_list(
const std::vector<
Point<2>> &points,
408 std::vector<double> & values,
409 const unsigned int component = 0)
const override;
412 vector_value_list(
const std::vector<
Point<2>> &points,
417 const unsigned int component = 0)
const override;
420 gradient_list(
const std::vector<
Point<2>> &points,
422 const unsigned int component = 0)
const override;
425 vector_gradient_list(
427 std::vector<std::vector<
Tensor<1, 2>>> &)
const override;
431 const unsigned int component = 0)
const override;
434 laplacian_list(
const std::vector<
Point<2>> &points,
435 std::vector<double> & values,
436 const unsigned int component = 0)
const override;
458 value(
const Point<2> &p,
const unsigned int component)
const override;
461 value_list(
const std::vector<
Point<2>> &points,
462 std::vector<double> & values,
463 const unsigned int component)
const override;
466 vector_value_list(
const std::vector<
Point<2>> &points,
470 gradient(
const Point<2> &p,
const unsigned int component)
const override;
473 gradient_list(
const std::vector<
Point<2>> &points,
475 const unsigned int component)
const override;
478 vector_gradient_list(
480 std::vector<std::vector<
Tensor<1, 2>>> &)
const override;
483 laplacian(
const Point<2> &p,
const unsigned int component)
const override;
486 laplacian_list(
const std::vector<
Point<2>> &points,
487 std::vector<double> & values,
488 const unsigned int component)
const override;
504 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
508 std::vector<double> & values,
509 const unsigned int component = 0)
const override;
517 const unsigned int component = 0)
const override;
520 gradient_list(
const std::vector<
Point<dim>> &points,
522 const unsigned int component = 0)
const override;
525 vector_gradient_list(
531 const unsigned int component = 0)
const override;
535 std::vector<double> & values,
536 const unsigned int component = 0)
const override;
550 value(
const Point<2> &p,
const unsigned int component = 0)
const override;
553 value_list(
const std::vector<
Point<2>> &points,
554 std::vector<double> & values,
555 const unsigned int component = 0)
const override;
558 vector_value_list(
const std::vector<
Point<2>> &points,
563 const unsigned int component = 0)
const override;
566 gradient_list(
const std::vector<
Point<2>> &points,
568 const unsigned int component = 0)
const override;
571 vector_gradient_list(
573 std::vector<std::vector<
Tensor<1, 2>>> &)
const override;
577 const unsigned int component = 0)
const override;
580 laplacian_list(
const std::vector<
Point<2>> &points,
581 std::vector<double> & values,
582 const unsigned int component = 0)
const override;
616 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
623 std::vector<double> & values,
624 const unsigned int component = 0)
const override;
631 const unsigned int component = 0)
const override;
639 const unsigned int component = 0)
const override;
646 const unsigned int component = 0)
const override;
653 std::vector<double> & values,
654 const unsigned int component = 0)
const override;
723 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
731 const unsigned int component = 0)
const override;
738 const unsigned int component = 0)
const override;
778 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
786 const unsigned int component = 0)
const override;
793 const unsigned int component = 0)
const override;
821 const std::vector<double> & weights);
830 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
838 const unsigned int component = 0)
const override;
845 const unsigned int component = 0)
const override;
852 const std::vector<double> weights;
876 const std::vector<double> & weights);
885 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
893 const unsigned int component = 0)
const override;
900 const unsigned int component = 0)
const override;
907 const std::vector<double> weights;
966 DEAL_II_DEPRECATED
void 974 DEAL_II_DEPRECATED
void 1076 template <
template <
int>
class CutOffFunctionBaseType>
1096 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
1103 const unsigned int component = 0)
const override;
1106 std::array<std::unique_ptr<CutOffFunctionBase<1>>, dim> base;
1133 const double radius = 1.,
1143 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
1150 std::vector<double> & values,
1151 const unsigned int component = 0)
const override;
1182 const double radius = 1.,
1192 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
1199 std::vector<double> & values,
1200 const unsigned int component = 0)
const override;
1232 const double radius = 1.,
1242 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
1249 std::vector<double> & values,
1250 const unsigned int component = 0)
const override;
1264 const unsigned int component = 0)
const override;
1289 const double radius = 1.,
1299 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
1306 std::vector<double> & values,
1307 const unsigned int component = 0)
const override;
1321 const unsigned int component = 0)
const override;
1357 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
1373 std::vector<double> & values,
1374 const unsigned int component = 0)
const override;
1381 const unsigned int component = 0)
const override;
1457 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
1472 const unsigned int component = 0)
const override;
1563 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
1616 value(
const Point<dim> &p,
const unsigned int component = 0)
const override;
1624 std::vector<double> & values,
1625 const unsigned int component = 0)
const override;
1632 const unsigned int component = 0)
const override;
1652 template <
template <
int>
class CutOffFunctionBaseType>
1659 "You can only construct a CutOffFunctionTensorProduct function from " 1660 "a class derived from CutOffFunctionBase.");
1662 for (
unsigned int i = 0; i < dim; ++i)
1663 base[i].reset(
new CutOffFunctionBaseType<1>(this->radius,
1667 this->integrate_to_one));
1675 DEAL_II_NAMESPACE_CLOSE
const Tensor< 1, dim > exponents
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual void vector_value_list(const std::vector< Point< dim >> &points, std::vector< Vector< double >> &values) const override
virtual double value(const Point< dim > &p, const unsigned int component) const override
virtual SymmetricTensor< 2, dim > hessian(const Point< dim > &p, const unsigned int component=0) const override
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
static const unsigned int invalid_unsigned_int
virtual void value_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
virtual void value_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
const unsigned int n_components
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
TableIndices< dim > table_index_of_point(const Point< dim > &p) const
virtual void hessian_list(const std::vector< Point< dim >> &points, std::vector< SymmetricTensor< 2, dim >> &hessians, const unsigned int component=0) const override
virtual void value_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
const double unitary_integral_value
virtual void value_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component) const override
double get_radius() const
LSingularityGradFunction()
Monomial(const Tensor< 1, dim > &exponents, const unsigned int n_components=1)
Polynomial(const Table< 2, double > &exponents, const std::vector< double > &coefficients)
CutOffFunctionW1(const double radius=1., const Point< dim >=Point< dim >(), const unsigned int n_components=1, const unsigned int select=CutOffFunctionBase< dim >::no_component, const bool integrate_to_one=false)
CutOffFunctionC1(const double radius=1., const Point< dim >=Point< dim >(), const unsigned int n_components=1, const unsigned int select=CutOffFunctionBase< dim >::no_component, bool integrate_to_one=false)
virtual void value_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual void value_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
virtual void vector_value(const Point< dim > &p, Vector< double > &values) const override
CutOffFunctionTensorProduct(double radius=1.0, const Point< dim > ¢er=Point< dim >(), const unsigned int n_components=1, const unsigned int select=CutOffFunctionBase< dim >::no_component, const bool integrate_to_one=false)
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual void set_center(const Point< dim > ¢er) override
FourierCosineSum(const std::vector< Point< dim >> &fourier_coefficients, const std::vector< double > &weights)
virtual double laplacian(const Point< dim > &p, const unsigned int component=0) const override
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
CosineFunction(const unsigned int n_components=1)
const Table< dim, double > data_values
virtual double laplacian(const Point< dim > &p, const unsigned int component=0) const override
virtual void laplacian_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual void set_center(const Point< dim > &p)
virtual double laplacian(const Point< dim > &p, const unsigned int component=0) const override
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
CutOffFunctionBase(const double radius=1., const Point< dim > center=Point< dim >(), const unsigned int n_components=1, const unsigned int select=CutOffFunctionBase< dim >::no_component, const bool integrate_to_one=false, const double unitary_integral_value=1.0)
const Point< dim > & get_center() const
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual double laplacian(const Point< dim > &p, const unsigned int component=0) const override
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual void set_radius(const double radius) override
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
void new_center(const Point< dim > &p)
const Tensor< 1, dim > fourier_coefficients
std::size_t memory_consumption() const
virtual void value_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
virtual double laplacian(const Point< dim > &p, const unsigned int component=0) const override
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual void vector_value(const Point< dim > &p, Vector< double > &values) const override
virtual double laplacian(const Point< dim > &p, const unsigned int component=0) const override
virtual ~CutOffFunctionBase()=default
virtual double laplacian(const Point< dim > &p, const unsigned int component=0) const override
CutOffFunctionLinfty(const double radius=1., const Point< dim >=Point< dim >(), const unsigned int n_components=1, const unsigned int select=CutOffFunctionBase< dim >::no_component, const bool integrate_to_one=false)
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual void vector_value_list(const std::vector< Point< dim >> &points, std::vector< Vector< double >> &values) const override
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
virtual void vector_value(const Point< dim > &p, Vector< double > &values) const override
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
virtual void laplacian_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
const std::vector< Point< dim > > fourier_coefficients
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
virtual void gradient_list(const std::vector< Point< dim >> &points, std::vector< Tensor< 1, dim >> &gradients, const unsigned int component=0) const override
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component) const override
virtual void value_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
virtual double laplacian(const Point< dim > &p, const unsigned int component=0) const override
const Table< 2, double > exponents
virtual void laplacian_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
virtual void vector_value_list(const std::vector< Point< dim >> &points, std::vector< Vector< double >> &values) const override
const std::vector< double > coefficients
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
virtual void vector_value_list(const std::vector< Point< dim >> &points, std::vector< Vector< double >> &values) const override
const unsigned int selected
virtual void vector_value_list(const std::vector< Point< dim >> &points, std::vector< Vector< double >> &values) const override
virtual void vector_value_list(const std::vector< Point< dim >> &points, std::vector< Vector< double >> &values) const override
const Point< dim > direction
virtual void value_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
const std::vector< Point< dim > > fourier_coefficients
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual void vector_value_list(const std::vector< Point< dim >> &points, std::vector< Vector< double >> &values) const override
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
PillowFunction(const double offset=0.)
const std::array< std::vector< double >, dim > coordinate_values
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
InterpolatedTensorProductGridData(const std::array< std::vector< double >, dim > &coordinate_values, const Table< dim, double > &data_values)
static const unsigned int no_component
FourierCosineFunction(const Tensor< 1, dim > &fourier_coefficients)
virtual void gradient_list(const std::vector< Point< dim >> &points, std::vector< Tensor< 1, dim >> &gradients, const unsigned int component=0) const override
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
virtual double laplacian(const Point< dim > &p, const unsigned int component=0) const override
FourierSineSum(const std::vector< Point< dim >> &fourier_coefficients, const std::vector< double > &weights)
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
FourierSineFunction(const Tensor< 1, dim > &fourier_coefficients)
CutOffFunctionCinfty(const double radius=1., const Point< dim >=Point< dim >(), const unsigned int n_components=1, const unsigned int select=CutOffFunctionBase< dim >::no_component, bool integrate_to_one=false)
virtual void vector_value_list(const std::vector< Point< dim >> &points, std::vector< Vector< double >> &values) const override
virtual void laplacian_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
const Tensor< 1, dim > fourier_coefficients
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
virtual void value_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual void gradient_list(const std::vector< Point< dim >> &points, std::vector< Tensor< 1, dim >> &gradients, const unsigned int component=0) const override
void new_radius(const double r)
virtual void laplacian_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
virtual void value_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual void value_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
virtual double laplacian(const Point< dim > &p, const unsigned int component) const override
virtual void laplacian_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
virtual double laplacian(const Point< dim > &p, const unsigned int component=0) const override
virtual double value(const Point< dim > &p, const unsigned int component=0) const override
bool integrates_to_one() const
virtual void value_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
virtual double laplacian(const Point< dim > &p, const unsigned int component=0) const override
virtual void laplacian_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
virtual void set_radius(const double r)
virtual void value_list(const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const override
JumpFunction(const Point< dim > &direction, const double steepness)