Functions::FlowFunction< dim > Class Template Reference
[Functions]

Inheritance diagram for Functions::FlowFunction< dim >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FlowFunction ()
virtual ~FlowFunction ()
void pressure_adjustment (double p)
virtual void vector_values (const std::vector< Point< dim > > &points, std::vector< std::vector< double > > &values) const =0
virtual void vector_gradients (const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim > > > &gradients) const =0
virtual void vector_laplacians (const std::vector< Point< dim > > &points, std::vector< std::vector< double > > &values) const =0
virtual void vector_value (const Point< dim > &points, Vector< double > &value) const
virtual double value (const Point< dim > &points, const unsigned int component) const
virtual void vector_value_list (const std::vector< Point< dim > > &points, std::vector< Vector< double > > &values) const
virtual void vector_gradient_list (const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim > > > &gradients) const
virtual void vector_laplacian_list (const std::vector< Point< dim > > &points, std::vector< Vector< double > > &values) const
unsigned int memory_consumption () const

Protected Attributes

double mean_pressure

Private Attributes

std::vector< std::vector
< double > > 
aux_values
std::vector< std::vector
< Tensor< 1, dim > > > 
aux_gradients

Detailed Description

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

Base class for analytic solutions to incompressible flow problems.

Additional to the Function interface, this function provides for an offset of the pressure: if the pressure of the computed solution has an integral mean value different from zero, this value can be given to pressure_adjustment() in order to compute correct pressure errors.

Note:
Derived classes should implement pressures with integral mean value zero always.
Thread safety: Some of the functions make use of internal data to compute values. Therefore, every thread should obtain its own object of derived classes.
Author:
Guido Kanschat, 2007

Constructor & Destructor Documentation

template<int dim>
Functions::FlowFunction< dim >::FlowFunction (  ) 

Constructor, setting up some internal data structures.

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

Virtual destructor.


Member Function Documentation

template<int dim>
void Functions::FlowFunction< dim >::pressure_adjustment ( double  p  ) 

Store an adjustment for the pressure function, such that its mean value is p.

template<int dim>
virtual void Functions::FlowFunction< dim >::vector_values ( const std::vector< Point< dim > > &  points,
std::vector< std::vector< double > > &  values 
) const [pure virtual]

Values in a structure more suitable for vector valued functions. The outer vector is indexed by solution component, the inner by quadrature point.

Implemented in Functions::PoisseuilleFlow< dim >, and Functions::StokesCosine< dim >.

template<int dim>
virtual void Functions::FlowFunction< dim >::vector_gradients ( const std::vector< Point< dim > > &  points,
std::vector< std::vector< Tensor< 1, dim > > > &  gradients 
) const [pure virtual]

Gradients in a structure more suitable for vector valued functions. The outer vector is indexed by solution component, the inner by quadrature point.

Implemented in Functions::PoisseuilleFlow< dim >, and Functions::StokesCosine< dim >.

template<int dim>
virtual void Functions::FlowFunction< dim >::vector_laplacians ( const std::vector< Point< dim > > &  points,
std::vector< std::vector< double > > &  values 
) const [pure virtual]

Force terms in a structure more suitable for vector valued functions. The outer vector is indexed by solution component, the inner by quadrature point.

Warning:
This is not the true Laplacian, but the force term to be used as right hand side in Stokes' equations

Implemented in Functions::PoisseuilleFlow< dim >, and Functions::StokesCosine< dim >.

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

Return all components of a vector-valued function at a given point.

values shall have the right size beforehand, i.e. n_components.

Reimplemented from Function< dim >.

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

Return the value of the function at the given point. Unless there is only one component (i.e. the function is scalar), you should state the component you want to have evaluated; it defaults to zero, i.e. the first component.

Reimplemented from Function< dim >.

template<int dim>
virtual void Functions::FlowFunction< 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. It is assumed that values already has the right size, i.e. the same size as the points array, and that all elements be vectors with the same number of components as this function has.

Be default, this function repeatedly calls vector_value() for each point separately, to fill the output array.

Reimplemented from Function< dim >.

template<int dim>
virtual void Functions::FlowFunction< 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 >.

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

The force term in the momentum equation.

Reimplemented from Function< dim >.

template<int dim>
unsigned int Functions::FlowFunction< dim >::memory_consumption (  )  const

Determine an estimate for the memory consumption (in bytes) of this object. Since sometimes the size of objects can not be determined exactly (for example: what is the memory consumption of an STL std::map type with a certain number of elements?), this is only an estimate. however often quite close to the true value.

Reimplemented from Function< dim >.


Member Data Documentation

template<int dim>
double Functions::FlowFunction< dim >::mean_pressure [protected]

Mean value of the pressure to be added by derived classes.

template<int dim>
std::vector<std::vector<double> > Functions::FlowFunction< dim >::aux_values [mutable, private]

Auxiliary values for the usual Function interface.

template<int dim>
std::vector<std::vector<Tensor<1,dim> > > Functions::FlowFunction< dim >::aux_gradients [mutable, private]

Auxiliary values for the usual Function interface.


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

deal.II documentation generated on Mon Nov 23 22:58:18 2009 by doxygen 1.6.1