ZeroFunction< dim > Class Template Reference
[Functions]

Inheritance diagram for ZeroFunction< dim >:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 ZeroFunction (const unsigned int n_components=1)
virtual ~ZeroFunction ()
virtual double value (const Point< dim > &p, const unsigned int component) const
virtual void vector_value (const Point< dim > &p, Vector< double > &return_value) 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 Tensor< 1, dim > gradient (const Point< dim > &p, const unsigned int component=0) const
virtual void vector_gradient (const Point< dim > &p, std::vector< Tensor< 1, dim > > &gradients) const
virtual void gradient_list (const std::vector< Point< dim > > &points, std::vector< Tensor< 1, dim > > &gradients, const unsigned int component=0) const
virtual void vector_gradient_list (const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim > > > &gradients) const


Detailed Description

template<int dim>
class ZeroFunction< dim >

Provide a function which always returns zero. Obviously, also the derivates of this function are zero. Also, it returns zero on all components in case the function is not a scalar one, which can be obtained by passing the constructor the appropriate number of components.

This function is of use when you want to implement homogeneous boundary conditions, or zero initial conditions.

Author:
Wolfgang Bangerth, 1998, 1999

Constructor & Destructor Documentation

template<int dim>
ZeroFunction< dim >::ZeroFunction ( const unsigned int  n_components = 1  ) 

Constructor. The number of components is preset to one.

template<int dim>
virtual ZeroFunction< dim >::~ZeroFunction (  )  [virtual]

Virtual destructor; absolutely necessary in this case.


Member Function Documentation

template<int dim>
virtual double ZeroFunction< dim >::value ( const Point< dim > &  p,
const unsigned int  component 
) const [virtual]

Return the value of the function at the given point for one component.

Reimplemented from Function< dim >.

Reimplemented in ConstantFunction< dim >, and ConstantFunction< dim >.

template<int dim>
virtual void ZeroFunction< dim >::vector_value ( const Point< dim > &  p,
Vector< double > &  return_value 
) const [virtual]

Return the value of the function at the given point for all components.

Reimplemented from Function< dim >.

Reimplemented in ConstantFunction< dim >, ComponentSelectFunction< dim >, and ConstantFunction< dim >.

template<int dim>
virtual void ZeroFunction< dim >::value_list ( const std::vector< Point< dim > > &  points,
std::vector< double > &  values,
const unsigned int  component = 0 
) const [virtual]

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

Reimplemented from Function< dim >.

Reimplemented in ConstantFunction< dim >, and ConstantFunction< dim >.

template<int dim>
virtual void ZeroFunction< dim >::vector_value_list ( const std::vector< Point< dim > > &  points,
std::vector< Vector< double > > &  values 
) const [virtual]

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

Reimplemented from Function< dim >.

Reimplemented in ConstantFunction< dim >, ComponentSelectFunction< dim >, and ConstantFunction< dim >.

template<int dim>
virtual Tensor<1,dim> ZeroFunction< dim >::gradient ( const Point< dim > &  p,
const unsigned int  component = 0 
) const [virtual]

Return the gradient of the function at the given point, for the given component.

Reimplemented from Function< dim >.

template<int dim>
virtual void ZeroFunction< dim >::vector_gradient ( const Point< dim > &  p,
std::vector< Tensor< 1, dim > > &  gradients 
) const [virtual]

Return the gradient of the specified component of the function at the given point, for all components.

Reimplemented from Function< dim >.

template<int dim>
virtual void ZeroFunction< dim >::gradient_list ( const std::vector< Point< dim > > &  points,
std::vector< Tensor< 1, dim > > &  gradients,
const unsigned int  component = 0 
) const [virtual]

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

Reimplemented from Function< dim >.

template<int dim>
virtual void ZeroFunction< dim >::vector_gradient_list ( const std::vector< Point< dim > > &  points,
std::vector< std::vector< Tensor< 1, dim > > > &  gradients 
) const [virtual]

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

The outer loop over gradients is over the points in the list, the inner loop over the different components of the function.

Reimplemented from Function< dim >.


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

deal.II documentation generated on Sat Aug 15 16:52:31 2009 by doxygen 1.5.9