Reference documentation for deal.II version 9.4.1
\(\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
Public Types | Public Member Functions | Private Attributes | List of all members
ZeroTensorFunction< rank, dim, Number > Class Template Reference

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

Inheritance diagram for ZeroTensorFunction< rank, dim, Number >:
[legend]

Public Types

using time_type = typename ConstantTensorFunction< rank, dim, Number >::time_type
 
using value_type = Tensor< rank, dim, Number >
 
using gradient_type = Tensor< rank+1, dim, Number >
 

Public Member Functions

 ZeroTensorFunction (const time_type initial_time=0.0)
 
virtual typename::TensorFunction< rank, dim, Number >::value_type value (const Point< dim > &p) const override
 
virtual void value_list (const std::vector< Point< dim > > &points, std::vector< typename ::TensorFunction< rank, dim, Number >::value_type > &values) const override
 
virtual void value_list (const std::vector< Point< dim > > &points, std::vector< value_type > &values) const
 
virtual typename::TensorFunction< rank, dim, Number >::gradient_type gradient (const Point< dim > &p) const override
 
virtual void gradient_list (const std::vector< Point< dim > > &points, std::vector< typename ::TensorFunction< rank, dim, Number >::gradient_type > &gradients) const override
 
virtual void gradient_list (const std::vector< Point< dim > > &points, std::vector< gradient_type > &gradients) const
 
Number get_time () const
 
virtual void set_time (const Number new_time)
 
virtual void advance_time (const Number delta_t)
 

Private Attributes

const ::Tensor< rank, dim, Number > _value
 
Number time
 

Subscriptor functionality

Classes derived from Subscriptor provide a facility to subscribe to this object. This is mostly used by the SmartPointer class.

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)
 
std::atomic< unsigned intcounter
 
std::map< std::string, unsigned intcounter_map
 
std::vector< std::atomic< bool > * > validity_pointers
 
const std::type_info * object_info
 
using map_value_type = decltype(counter_map)::value_type
 
using map_iterator = decltype(counter_map)::iterator
 
static std::mutex mutex
 
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 
void check_no_subscribers () const noexcept
 

Detailed Description

template<int rank, int dim, typename Number = double>
class ZeroTensorFunction< rank, dim, Number >

Provide a tensor valued function which always returns zero. Obviously, all derivates of this function are zero.

Definition at line 182 of file tensor_function.h.

Member Typedef Documentation

◆ time_type

template<int rank, int dim, typename Number = double>
using ZeroTensorFunction< rank, dim, Number >::time_type = typename ConstantTensorFunction<rank, dim, Number>::time_type

The scalar-valued real type used for representing time.

Definition at line 188 of file tensor_function.h.

◆ value_type

template<int rank, int dim, typename Number = double>
using TensorFunction< rank, dim, Number >::value_type = Tensor<rank, dim, Number>
inherited

Alias for the return types of the value function.

Definition at line 64 of file tensor_function.h.

◆ gradient_type

template<int rank, int dim, typename Number = double>
using TensorFunction< rank, dim, Number >::gradient_type = Tensor<rank + 1, dim, Number>
inherited

Alias for the return types of the gradient functions.

Definition at line 69 of file tensor_function.h.

Constructor & Destructor Documentation

◆ ZeroTensorFunction()

template<int rank, int dim, typename Number = double>
ZeroTensorFunction< rank, dim, Number >::ZeroTensorFunction ( const time_type  initial_time = 0.0)

Constructor.

An initial value for the time variable may be specified, otherwise it defaults to zero.

Member Function Documentation

◆ value()

template<int rank, int dim, typename Number = double>
virtual typename::TensorFunction< rank, dim, Number >::value_type ConstantTensorFunction< rank, dim, Number >::value ( const Point< dim > &  p) const
overridevirtualinherited

Return the value of the function at the given point.

Reimplemented from TensorFunction< rank, dim, Number >.

◆ value_list() [1/2]

template<int rank, int dim, typename Number = double>
virtual void ConstantTensorFunction< rank, dim, Number >::value_list ( const std::vector< Point< dim > > &  points,
std::vector< typename ::TensorFunction< rank, dim, Number >::value_type > &  values 
) const
overridevirtualinherited

◆ value_list() [2/2]

template<int rank, int dim, typename Number = double>
virtual void TensorFunction< rank, dim, Number >::value_list ( const std::vector< Point< dim > > &  points,
std::vector< value_type > &  values 
) const
virtualinherited

Set values to the point values of the function at the points. It is assumed that values already has the right size, i.e. the same size as the points array.

Reimplemented in TensorFunctionParser< rank, dim, Number >.

◆ gradient()

template<int rank, int dim, typename Number = double>
virtual typename::TensorFunction< rank, dim, Number >::gradient_type ConstantTensorFunction< rank, dim, Number >::gradient ( const Point< dim > &  p) const
overridevirtualinherited

Return the gradient of the function at the given point.

Reimplemented from TensorFunction< rank, dim, Number >.

◆ gradient_list() [1/2]

template<int rank, int dim, typename Number = double>
virtual void ConstantTensorFunction< rank, dim, Number >::gradient_list ( const std::vector< Point< dim > > &  points,
std::vector< typename ::TensorFunction< rank, dim, Number >::gradient_type > &  gradients 
) const
overridevirtualinherited

◆ gradient_list() [2/2]

template<int rank, int dim, typename Number = double>
virtual void TensorFunction< rank, dim, Number >::gradient_list ( const std::vector< Point< dim > > &  points,
std::vector< gradient_type > &  gradients 
) const
virtualinherited

Set gradients to the gradients of the function at the points. It is assumed that values already has the right size, i.e. the same size as the points array.

◆ get_time()

template<typename Number = double>
Number FunctionTime< Number >::get_time ( ) const
inherited

Return the value of the time variable.

◆ set_time()

template<typename Number = double>
virtual void FunctionTime< Number >::set_time ( const Number  new_time)
virtualinherited

Set the time to new_time, overwriting the old value.

◆ advance_time()

template<typename Number = double>
virtual void FunctionTime< Number >::advance_time ( const Number  delta_t)
virtualinherited

Advance the time by the given time step delta_t.

Member Data Documentation

◆ _value

template<int rank, int dim, typename Number = double>
const ::Tensor<rank, dim, Number> ConstantTensorFunction< rank, dim, Number >::_value
privateinherited

Definition at line 170 of file tensor_function.h.

◆ time

template<typename Number = double>
Number FunctionTime< Number >::time
privateinherited

Store the present time.

Definition at line 113 of file function_time.h.


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