Reference documentation for deal.II version 9.4.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 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, double >
 
using gradient_type = Tensor< rank+1, dim, double >
 

Public Member Functions

 ZeroTensorFunction (const time_type initial_time=0.0)
 
virtual typename::TensorFunction< rank, dim, double >::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, double >::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, double >::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, double >::gradient_type > &gradients) const override
 
virtual void gradient_list (const std::vector< Point< dim > > &points, std::vector< gradient_type > &gradients) const
 
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)
 

Private Attributes

const ::Tensor< rank, dim, double > _value
 
numbers::NumberTraits< double >::real_type 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

using TensorFunction< rank, dim, double >::value_type = Tensor<rank, dim, double >
inherited

Alias for the return types of the value function.

Definition at line 64 of file tensor_function.h.

◆ gradient_type

using TensorFunction< rank, dim, double >::gradient_type = Tensor<rank + 1, dim, double >
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()

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

Return the value of the function at the given point.

Reimplemented from TensorFunction< rank, dim, double >.

◆ value_list() [1/2]

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

◆ value_list() [2/2]

virtual void TensorFunction< rank, dim, double >::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.

◆ gradient()

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

Return the gradient of the function at the given point.

Reimplemented from TensorFunction< rank, dim, double >.

◆ gradient_list() [1/2]

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

◆ gradient_list() [2/2]

virtual void TensorFunction< rank, dim, double >::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()

numbers::NumberTraits< double >::real_type FunctionTime< numbers::NumberTraits< double >::real_type >::get_time ( ) const
inherited

Return the value of the time variable.

◆ set_time()

virtual void FunctionTime< numbers::NumberTraits< double >::real_type >::set_time ( const numbers::NumberTraits< double >::real_type  new_time)
virtualinherited

Set the time to new_time, overwriting the old value.

◆ advance_time()

virtual void FunctionTime< numbers::NumberTraits< double >::real_type >::advance_time ( const numbers::NumberTraits< double >::real_type  delta_t)
virtualinherited

Advance the time by the given time step delta_t.

Member Data Documentation

◆ _value

const ::Tensor<rank, dim, double > ConstantTensorFunction< rank, dim, double >::_value
privateinherited

Definition at line 170 of file tensor_function.h.

◆ time

numbers::NumberTraits< double >::real_type FunctionTime< numbers::NumberTraits< double >::real_type >::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: