Reference documentation for deal.II version Git c064f80013 2020-07-04 08:24:28 -0400
\(\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
ConstantTensorFunction< rank, dim, Number > Class Template Reference

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

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

Public Types

using time_type = typename TensorFunction< rank, dim, Number >::time_type
 
- Public Types inherited from TensorFunction< rank, dim, Number >
using value_type = Tensor< rank, dim, Number >
 
using gradient_type = Tensor< rank+1, dim, Number >
 
using time_type = typename FunctionTime< typename numbers::NumberTraits< Number >::real_type >::time_type
 
- Public Types inherited from FunctionTime< numbers::NumberTraits< Number >::real_type >
using time_type = numbers::NumberTraits< Number >::real_type
 

Public Member Functions

 ConstantTensorFunction (const ::Tensor< rank, dim, Number > &value, const time_type initial_time=0.0)
 
virtual ~ConstantTensorFunction () override=default
 
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 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
 
- Public Member Functions inherited from TensorFunction< rank, dim, Number >
 TensorFunction (const time_type initial_time=time_type(0.0))
 
virtual ~TensorFunction () override=default
 
virtual void value_list (const std::vector< Point< dim >> &points, std::vector< value_type > &values) const
 
virtual void gradient_list (const std::vector< Point< dim >> &points, std::vector< gradient_type > &gradients) const
 
- Public Member Functions inherited from FunctionTime< numbers::NumberTraits< Number >::real_type >
 FunctionTime (const numbers::NumberTraits< Number >::real_type initial_time=numbers::NumberTraits< Number >::real_type(0.0))
 
virtual ~FunctionTime ()=default
 
numbers::NumberTraits< Number >::real_type get_time () const
 
virtual void set_time (const numbers::NumberTraits< Number >::real_type new_time)
 
virtual void advance_time (const numbers::NumberTraits< Number >::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)
 

Private Attributes

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

Additional Inherited Members

- 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)
 

Detailed Description

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

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

Definition at line 130 of file tensor_function.h.

Member Typedef Documentation

◆ time_type

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

The scalar-valued real type used for representing time.

Definition at line 136 of file tensor_function.h.

Constructor & Destructor Documentation

◆ ConstantTensorFunction()

template<int rank, int dim, typename Number = double>
ConstantTensorFunction< rank, dim, Number >::ConstantTensorFunction ( const ::Tensor< rank, dim, Number > &  value,
const time_type  initial_time = 0.0 
)

Constructor; takes the constant tensor value as an argument. The reference value is copied internally.

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

◆ ~ConstantTensorFunction()

template<int rank, int dim, typename Number = double>
virtual ConstantTensorFunction< rank, dim, Number >::~ConstantTensorFunction ( )
overridevirtualdefault

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
overridevirtual

Return the value of the function at the given point.

Reimplemented from TensorFunction< rank, dim, Number >.

◆ value_list()

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
overridevirtual

◆ 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
overridevirtual

Return the gradient of the function at the given point.

Reimplemented from TensorFunction< rank, dim, Number >.

◆ gradient_list()

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
overridevirtual

Member Data Documentation

◆ _value

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

Definition at line 170 of file tensor_function.h.


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