FEValuesViews::Scalar< dim, spacedim > Class Template Reference
[Finite element access/FEValues classesHandling vector valued problems]

List of all members.

Classes

struct  ShapeFunctionData

Public Types

typedef double value_type
typedef Tensor< 1, spacedim > gradient_type
typedef Tensor< 2, spacedim > hessian_type

Public Member Functions

 Scalar ()
 Scalar (const FEValuesBase< dim, spacedim > &fe_values_base, const unsigned int component)
Scalaroperator= (const Scalar< dim, spacedim > &)
value_type value (const unsigned int shape_function, const unsigned int q_point) const
gradient_type gradient (const unsigned int shape_function, const unsigned int q_point) const
hessian_type hessian (const unsigned int shape_function, const unsigned int q_point) const
template<class InputVector >
void get_function_values (const InputVector &fe_function, std::vector< value_type > &values) const
template<class InputVector >
void get_function_gradients (const InputVector &fe_function, std::vector< gradient_type > &gradients) const
template<class InputVector >
void get_function_hessians (const InputVector &fe_function, std::vector< hessian_type > &hessians) const
template<class InputVector >
void get_function_laplacians (const InputVector &fe_function, std::vector< value_type > &laplacians) const

Private Attributes

const FEValuesBase< dim,
spacedim > & 
fe_values
const unsigned int component
std::vector< ShapeFunctionDatashape_function_data

Detailed Description

template<int dim, int spacedim = dim>
class FEValuesViews::Scalar< dim, spacedim >

A class representing a view to a single scalar component of a possibly vector-valued finite element. Views are discussed in the Handling vector valued problems module.


Member Typedef Documentation

template<int dim, int spacedim = dim>
typedef double FEValuesViews::Scalar< dim, spacedim >::value_type

A typedef for the data type of values of the view this class represents. Since we deal with a single components, the value type is a scalar double.

template<int dim, int spacedim = dim>
typedef Tensor<1,spacedim> FEValuesViews::Scalar< dim, spacedim >::gradient_type

A typedef for the type of gradients of the view this class represents. Here, for a scalar component of the finite element, the gradient is a Tensor<1,dim>.

template<int dim, int spacedim = dim>
typedef Tensor<2,spacedim> FEValuesViews::Scalar< dim, spacedim >::hessian_type

A typedef for the type of second derivatives of the view this class represents. Here, for a scalar component of the finite element, the Hessian is a Tensor<2,dim>.


Constructor & Destructor Documentation

template<int dim, int spacedim = dim>
FEValuesViews::Scalar< dim, spacedim >::Scalar (  ) 

Default constructor. Creates an invalid object.

template<int dim, int spacedim = dim>
FEValuesViews::Scalar< dim, spacedim >::Scalar ( const FEValuesBase< dim, spacedim > &  fe_values_base,
const unsigned int  component 
)

Constructor for an object that represents a single scalar component of a FEValuesBase object (or of one of the classes derived from FEValuesBase).


Member Function Documentation

template<int dim, int spacedim = dim>
Scalar& FEValuesViews::Scalar< dim, spacedim >::operator= ( const Scalar< dim, spacedim > &   ) 

Copy operator. This is not a lightweight object so we don't allow copying and generate an exception if this function is called.

template<int dim, int spacedim = dim>
value_type FEValuesViews::Scalar< dim, spacedim >::value ( const unsigned int  shape_function,
const unsigned int  q_point 
) const

Return the value of the vector component selected by this view, for the shape function and quadrature point selected by the arguments.

template<int dim, int spacedim = dim>
gradient_type FEValuesViews::Scalar< dim, spacedim >::gradient ( const unsigned int  shape_function,
const unsigned int  q_point 
) const

Return the gradient (a tensor of rank 1) of the vector component selected by this view, for the shape function and quadrature point selected by the arguments.

template<int dim, int spacedim = dim>
hessian_type FEValuesViews::Scalar< dim, spacedim >::hessian ( const unsigned int  shape_function,
const unsigned int  q_point 
) const

Return the Hessian (the tensor of rank 2 of all second derivatives) of the vector component selected by this view, for the shape function and quadrature point selected by the arguments.

template<int dim, int spacedim = dim>
template<class InputVector >
void FEValuesViews::Scalar< dim, spacedim >::get_function_values ( const InputVector &  fe_function,
std::vector< value_type > &  values 
) const [inline]

Return the values of the selected scalar component of the finite element function characterized by fe_function at the quadrature points of the cell, face or subface selected the last time the reinit function of the FEValues object was called, at the quadrature points.

This function is the equivalent of the FEValuesBase::get_function_values function but it only works on the selected scalar component.

template<int dim, int spacedim = dim>
template<class InputVector >
void FEValuesViews::Scalar< dim, spacedim >::get_function_gradients ( const InputVector &  fe_function,
std::vector< gradient_type > &  gradients 
) const [inline]

Return the gradients of the selected scalar component of the finite element function characterized by fe_function at the quadrature points of the cell, face or subface selected the last time the reinit function of the FEValues object was called, at the quadrature points.

This function is the equivalent of the FEValuesBase::get_function_gradients function but it only works on the selected scalar component.

template<int dim, int spacedim = dim>
template<class InputVector >
void FEValuesViews::Scalar< dim, spacedim >::get_function_hessians ( const InputVector &  fe_function,
std::vector< hessian_type > &  hessians 
) const [inline]

Return the Hessians of the selected scalar component of the finite element function characterized by fe_function at the quadrature points of the cell, face or subface selected the last time the reinit function of the FEValues object was called, at the quadrature points.

This function is the equivalent of the FEValuesBase::get_function_hessians function but it only works on the selected scalar component.

template<int dim, int spacedim = dim>
template<class InputVector >
void FEValuesViews::Scalar< dim, spacedim >::get_function_laplacians ( const InputVector &  fe_function,
std::vector< value_type > &  laplacians 
) const [inline]

Return the Laplacians of the selected scalar component of the finite element function characterized by fe_function at the quadrature points of the cell, face or subface selected the last time the reinit function of the FEValues object was called, at the quadrature points. The Laplacians are the trace of the Hessians.

This function is the equivalent of the FEValuesBase::get_function_laplacians function but it only works on the selected scalar component.


Member Data Documentation

template<int dim, int spacedim = dim>
const FEValuesBase<dim,spacedim>& FEValuesViews::Scalar< dim, spacedim >::fe_values [private]

A reference to the FEValuesBase object we operator on.

template<int dim, int spacedim = dim>
const unsigned int FEValuesViews::Scalar< dim, spacedim >::component [private]

The single scalar component this view represents of the FEValuesBase object.

template<int dim, int spacedim = dim>
std::vector<ShapeFunctionData> FEValuesViews::Scalar< dim, spacedim >::shape_function_data [private]

Store the data about shape functions.


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