Reference documentation for deal.II version 9.2.0
\(\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\}}\)
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
Functions::CutOffFunctionBase< dim > Class Template Reference

#include <deal.II/base/function_lib.h>

Inheritance diagram for Functions::CutOffFunctionBase< dim >:
[legend]

Public Member Functions

 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)
 
virtual ~CutOffFunctionBase ()=default
 
void new_center (const Point< dim > &p)
 
void new_radius (const double r)
 
virtual void set_center (const Point< dim > &p)
 
virtual void set_radius (const double r)
 
const Point< dim > & get_center () const
 
double get_radius () const
 
bool integrates_to_one () const
 
- Public Member Functions inherited from Function< dim >
 Function (const unsigned int n_components=1, const time_type initial_time=0.0)
 
 Function (const Function &f)=default
 
virtual ~Function () override=0
 
Functionoperator= (const Function &f)
 
virtual double value (const Point< dim > &p, const unsigned int component=0) const
 
virtual void vector_value (const Point< dim > &p, Vector< double > &values) const
 
virtual void value_list (const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const
 
virtual void vector_value_list (const std::vector< Point< dim >> &points, std::vector< Vector< double >> &values) const
 
virtual void vector_values (const std::vector< Point< dim >> &points, std::vector< std::vector< double >> &values) const
 
virtual Tensor< 1, dim, doublegradient (const Point< dim > &p, const unsigned int component=0) const
 
virtual void vector_gradient (const Point< dim > &p, std::vector< Tensor< 1, dim, double >> &gradients) const
 
virtual void gradient_list (const std::vector< Point< dim >> &points, std::vector< Tensor< 1, dim, double >> &gradients, const unsigned int component=0) const
 
virtual void vector_gradients (const std::vector< Point< dim >> &points, std::vector< std::vector< Tensor< 1, dim, double >>> &gradients) const
 
virtual void vector_gradient_list (const std::vector< Point< dim >> &points, std::vector< std::vector< Tensor< 1, dim, double >>> &gradients) const
 
virtual double laplacian (const Point< dim > &p, const unsigned int component=0) const
 
virtual void vector_laplacian (const Point< dim > &p, Vector< double > &values) const
 
virtual void laplacian_list (const std::vector< Point< dim >> &points, std::vector< double > &values, const unsigned int component=0) const
 
virtual void vector_laplacian_list (const std::vector< Point< dim >> &points, std::vector< Vector< double >> &values) const
 
virtual SymmetricTensor< 2, dim, doublehessian (const Point< dim > &p, const unsigned int component=0) const
 
virtual void vector_hessian (const Point< dim > &p, std::vector< SymmetricTensor< 2, dim, double >> &values) const
 
virtual void hessian_list (const std::vector< Point< dim >> &points, std::vector< SymmetricTensor< 2, dim, double >> &values, const unsigned int component=0) const
 
virtual void vector_hessian_list (const std::vector< Point< dim >> &points, std::vector< std::vector< SymmetricTensor< 2, dim, double >>> &values) const
 
std::size_t memory_consumption () const
 
- Public Member Functions inherited from FunctionTime< numbers::NumberTraits< double >::real_type >
 FunctionTime (const numbers::NumberTraits< double >::real_type initial_time=numbers::NumberTraits< double >::real_type(0.0))
 
virtual ~FunctionTime ()=default
 
numbers::NumberTraits< double >::real_type get_time () const
 
virtual void set_time (const numbers::NumberTraits< double >::real_type new_time)
 
virtual void advance_time (const numbers::NumberTraits< double >::real_type delta_t)
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
 Subscriptor (Subscriptor &&) noexcept
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
Subscriptoroperator= (Subscriptor &&) noexcept
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
template<typename StreamType >
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Static Public Attributes

static const unsigned int no_component = numbers::invalid_unsigned_int
 
- Static Public Attributes inherited from Function< dim >
static const unsigned int dimension
 

Protected Attributes

Point< dim > center
 
double radius
 
const unsigned int selected
 
bool integrate_to_one
 
const double unitary_integral_value
 
double rescaling
 

Additional Inherited Members

- Public Types inherited from Function< dim >
using time_type = typename FunctionTime< typename numbers::NumberTraits< double >::real_type >::time_type
 
- Public Types inherited from FunctionTime< numbers::NumberTraits< double >::real_type >
using time_type = numbers::NumberTraits< double >::real_type
 
- Static Public Member Functions inherited from Subscriptor
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 
- Public Attributes inherited from Function< dim >
const unsigned int n_components
 

Detailed Description

template<int dim>
class Functions::CutOffFunctionBase< dim >

Base function for cut-off function. This class stores the center and the radius of the supporting ball of a cut-off function. It also stores the number of the non-zero component, if the function is vector-valued.

This class can also be used for approximated Dirac delta functions. These are special cut-off functions whose integral is always equal to one, independently of the radius of the supporting ball.

Author
Guido Kanschat, 2002, Luca Heltai, 2019.

Definition at line 924 of file function_lib.h.

Constructor & Destructor Documentation

◆ CutOffFunctionBase()

template<int dim>
Functions::CutOffFunctionBase< dim >::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 
)

Constructor.

Parameters
[in]radiusRadius of the ball
[in]centerCenter of the ball
[in]n_componentsNumber of components of this function object
[in]selectIf this is different from CutOffFunctionBase<dim>::no_component, then the function will be non-zero for this component only
[in]integrate_to_oneRescale the value of the function whenever a new radius is set, to guarantee that the integral is equal to one
[in]unitary_integral_valueValue of the integral when the radius is equal to 1.0. Derived classes will need to supply this value, to guarantee that the rescaling is performed correctly.

Definition at line 30 of file function_lib_cutoff.cc.

◆ ~CutOffFunctionBase()

template<int dim>
virtual Functions::CutOffFunctionBase< dim >::~CutOffFunctionBase ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ new_center()

template<int dim>
void Functions::CutOffFunctionBase< dim >::new_center ( const Point< dim > &  p)

Move the center of the ball to new point p.

Definition at line 53 of file function_lib_cutoff.cc.

◆ new_radius()

template<int dim>
void Functions::CutOffFunctionBase< dim >::new_radius ( const double  r)

Set the radius of the ball to r.

Definition at line 80 of file function_lib_cutoff.cc.

◆ set_center()

template<int dim>
void Functions::CutOffFunctionBase< dim >::set_center ( const Point< dim > &  p)
virtual

Set the center of the ball to the point p.

Reimplemented in Functions::CutOffFunctionTensorProduct< dim >.

Definition at line 62 of file function_lib_cutoff.cc.

◆ set_radius()

template<int dim>
void Functions::CutOffFunctionBase< dim >::set_radius ( const double  r)
virtual

Set the radius of the ball to r

Reimplemented in Functions::CutOffFunctionTensorProduct< dim >.

Definition at line 89 of file function_lib_cutoff.cc.

◆ get_center()

template<int dim>
const Point< dim > & Functions::CutOffFunctionBase< dim >::get_center

Return the center stored in this object.

Definition at line 71 of file function_lib_cutoff.cc.

◆ get_radius()

template<int dim>
double Functions::CutOffFunctionBase< dim >::get_radius

Return the radius stored in this object.

Definition at line 104 of file function_lib_cutoff.cc.

◆ integrates_to_one()

template<int dim>
bool Functions::CutOffFunctionBase< dim >::integrates_to_one

Return a boolean indicating whether this function integrates to one.

Definition at line 113 of file function_lib_cutoff.cc.

Member Data Documentation

◆ no_component

template<int dim>
const unsigned int Functions::CutOffFunctionBase< dim >::no_component = numbers::invalid_unsigned_int
static

Value used in the constructor of this and derived classes to denote that no component is selected.

Definition at line 931 of file function_lib.h.

◆ center

template<int dim>
Point<dim> Functions::CutOffFunctionBase< dim >::center
protected

Center of the integration ball.

Definition at line 1011 of file function_lib.h.

◆ radius

template<int dim>
double Functions::CutOffFunctionBase< dim >::radius
protected

Radius of the ball.

Definition at line 1016 of file function_lib.h.

◆ selected

template<int dim>
const unsigned int Functions::CutOffFunctionBase< dim >::selected
protected

Component selected. If no_component, the function is the same in all components.

Definition at line 1022 of file function_lib.h.

◆ integrate_to_one

template<int dim>
bool Functions::CutOffFunctionBase< dim >::integrate_to_one
protected

Flag that controls whether we rescale the value when the radius changes.

Definition at line 1027 of file function_lib.h.

◆ unitary_integral_value

template<int dim>
const double Functions::CutOffFunctionBase< dim >::unitary_integral_value
protected

The reference integral value. Derived classes should specify what their integral is when radius = 1.0.

Definition at line 1033 of file function_lib.h.

◆ rescaling

template<int dim>
double Functions::CutOffFunctionBase< dim >::rescaling
protected

Current rescaling to apply the cut-off function.

Definition at line 1038 of file function_lib.h.


The documentation for this class was generated from the following files: