Classes | Public Types | Public Member Functions | Private Attributes
FEValuesViews::Vector< dim, spacedim > Class Template Reference

List of all members.

Classes

struct  ShapeFunctionData

Public Types

typedef Tensor< 1, spacedim > value_type
typedef Tensor< 2, spacedim > gradient_type
typedef ::SymmetricTensor
< 2, spacedim > 
symmetric_gradient_type
typedef double divergence_type
typedef internal::CurlType
< spacedim >::type 
curl_type
typedef Tensor< 3, spacedim > hessian_type

Public Member Functions

 Vector ()
 Vector (const FEValuesBase< dim, spacedim > &fe_values_base, const unsigned int first_vector_component)
Vector & operator= (const Vector< 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
symmetric_gradient_type symmetric_gradient (const unsigned int shape_function, const unsigned int q_point) const
divergence_type divergence (const unsigned int shape_function, const unsigned int q_point) const
curl_type curl (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_symmetric_gradients (const InputVector &fe_function, std::vector< symmetric_gradient_type > &symmetric_gradients) const
template<class InputVector >
void get_function_divergences (const InputVector &fe_function, std::vector< divergence_type > &divergences) const
template<class InputVector >
void get_function_curls (const InputVector &fe_function, std::vector< curl_type > &curls) 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 first_vector_component
std::vector< ShapeFunctionData > shape_function_data

Detailed Description

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

A class representing a view to a set of dim components forming a vector part of a vector-valued finite element. Views are discussed in the Handling vector valued problems module.


Member Typedef Documentation

template<int dim, int spacedim = dim>
typedef Tensor<1,spacedim> FEValuesViews::Vector< dim, spacedim >::value_type

A typedef for the data type of values of the view this class represents. Since we deal with a set of dim components, the value type is a Tensor<1,spacedim>.

template<int dim, int spacedim = dim>
typedef Tensor<2,spacedim> FEValuesViews::Vector< dim, spacedim >::gradient_type

A typedef for the type of gradients of the view this class represents. Here, for a set of dim components of the finite element, the gradient is a Tensor<2,spacedim>.

template<int dim, int spacedim = dim>
typedef ::SymmetricTensor<2,spacedim> FEValuesViews::Vector< dim, spacedim >::symmetric_gradient_type

A typedef for the type of symmetrized gradients of the view this class represents. Here, for a set of dim components of the finite element, the symmetrized gradient is a SymmetricTensor<2,spacedim>.

template<int dim, int spacedim = dim>
typedef double FEValuesViews::Vector< dim, spacedim >::divergence_type

A typedef for the type of the divergence of the view this class represents. Here, for a set of dim components of the finite element, the divergence of course is a scalar.

template<int dim, int spacedim = dim>
typedef internal::CurlType<spacedim>::type FEValuesViews::Vector< dim, spacedim >::curl_type

A typedef for the type of the curl of the view this class represents. Here, for a set of spacedim=2 components of the finite element, the curl is a Tensor<1, 1>. For spacedim=3 it is a Tensor<1, dim>.

template<int dim, int spacedim = dim>
typedef Tensor<3,spacedim> FEValuesViews::Vector< dim, spacedim >::hessian_type

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


Constructor & Destructor Documentation

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

Default constructor. Creates an invalid object.

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

Constructor for an object that represents dim components of a FEValuesBase object (or of one of the classes derived from FEValuesBase), representing a vector-valued variable.

The second argument denotes the index of the first component of the selected vector.


Member Function Documentation

template<int dim, int spacedim = dim>
Vector& FEValuesViews::Vector< dim, spacedim >::operator= ( const Vector< 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::Vector< dim, spacedim >::value ( const unsigned int  shape_function,
const unsigned int  q_point 
) const

Return the value of the vector components selected by this view, for the shape function and quadrature point selected by the arguments. Here, since the view represents a vector-valued part of the FEValues object with dim components, the return type is a tensor of rank 1 with dim components.

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

Return the gradient (a tensor of rank 2) 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>
symmetric_gradient_type FEValuesViews::Vector< dim, spacedim >::symmetric_gradient ( const unsigned int  shape_function,
const unsigned int  q_point 
) const

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

The symmetric gradient is defined as $\frac 12 [(\nabla \phi_i(x_q)) + (\nabla \phi_i(x_q))^T]$, where $\phi_i$ represents the dim components selected from the FEValuesBase object, and $x_q$ is the location of the $q$-th quadrature point.

template<int dim, int spacedim = dim>
divergence_type FEValuesViews::Vector< dim, spacedim >::divergence ( const unsigned int  shape_function,
const unsigned int  q_point 
) const

Return the scalar divergence of the vector components selected by this view, for the shape function and quadrature point selected by the arguments.

template<int dim, int spacedim = dim>
curl_type FEValuesViews::Vector< dim, spacedim >::curl ( const unsigned int  shape_function,
const unsigned int  q_point 
) const

Return the vector curl of the vector components selected by this view, for the shape function and quadrature point selected by the arguments. For 1d this function does not make any sense. Thus it is not implemented for spacedim=1. In 2d the curl is defined as

\begin{equation*} \operatorname{curl}(u):=\frac{du_2}{dx} -\frac{du_1}{dy}, \end{equation*}

whereas in 3d it is given by

\begin{equation*} \operatorname{curl}(u):=\left( \begin{array}{c} \frac{du_3}{dy}-\frac{du_2}{dz}\\ \frac{du_1}{dz}-\frac{du_3}{dx}\\ \frac{du_2}{dx}-\frac{du_1}{dy} \end{array} \right). \end{equation*}

template<int dim, int spacedim = dim>
hessian_type FEValuesViews::Vector< 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 components 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::Vector< dim, spacedim >::get_function_values ( const InputVector< dim, spacedim > &  fe_function,
std::vector< value_type > &  values 
) const

Return the values of the selected vector components 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 vector components.

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

Return the gradients of the selected vector components 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 vector components.

template<int dim, int spacedim = dim>
template<class InputVector >
void FEValuesViews::Vector< dim, spacedim >::get_function_symmetric_gradients ( const InputVector< dim, spacedim > &  fe_function,
std::vector< symmetric_gradient_type > &  symmetric_gradients 
) const

Return the symmetrized gradients of the selected vector components 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.

There is no equivalent function such as FEValuesBase::get_function_gradients in the FEValues classes but the information can be obtained from FEValuesBase::get_function_gradients, of course.

template<int dim, int spacedim = dim>
template<class InputVector >
void FEValuesViews::Vector< dim, spacedim >::get_function_divergences ( const InputVector< dim, spacedim > &  fe_function,
std::vector< divergence_type > &  divergences 
) const

Return the divergence of the selected vector components 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.

There is no equivalent function such as FEValuesBase::get_function_gradients in the FEValues classes but the information can be obtained from FEValuesBase::get_function_gradients, of course.

template<int dim, int spacedim = dim>
template<class InputVector >
void FEValuesViews::Vector< dim, spacedim >::get_function_curls ( const InputVector< dim, spacedim > &  fe_function,
std::vector< curl_type > &  curls 
) const

Return the curl of the selected vector components 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.

There is no equivalent function such as FEValuesBase::get_function_gradients in the FEValues classes but the information can be obtained from FEValuesBase::get_function_gradients, of course.

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

Return the Hessians of the selected vector components 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 vector components.

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

Return the Laplacians of the selected vector components 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 vector components.


Member Data Documentation

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

A reference to the FEValuesBase object we operate on.

template<int dim, int spacedim = dim>
const unsigned int FEValuesViews::Vector< dim, spacedim >::first_vector_component [private]

The first component of the vector this view represents of the FEValuesBase object.

template<int dim, int spacedim = dim>
std::vector<ShapeFunctionData> FEValuesViews::Vector< 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 Fri Aug 12 2011 15:01:08 by doxygen 1.7.4