Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
FEValuesViews::Tensor< 2, dim, spacedim > Class Template Reference

#include <fe_values.h>

Classes

struct  ShapeFunctionData
 

Public Types

typedef ::Tensor< 2, spacedim > value_type
 
typedef ::Tensor< 1, spacedim > divergence_type
 

Public Member Functions

 Tensor ()
 
 Tensor (const FEValuesBase< dim, spacedim > &fe_values_base, const unsigned int first_tensor_component)
 
Tensoroperator= (const Tensor< 2, dim, spacedim > &)
 
value_type value (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
 
template<class InputVector >
void get_function_values (const InputVector &fe_function, std::vector< value_type > &values) const
 
template<class InputVector >
void get_function_divergences (const InputVector &fe_function, std::vector< divergence_type > &divergences) const
 

Private Attributes

const FEValuesBase< dim,
spacedim > & 
fe_values
 
const unsigned int first_tensor_component
 
std::vector< ShapeFunctionData > shape_function_data
 

Detailed Description

template<int dim, int spacedim>
class FEValuesViews::Tensor< 2, dim, spacedim >

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

This class allows to query the value and divergence of (components of) shape functions and solutions representing tensors. The divergence of a tensor $T_{ij}, 0\le i,j<\text{dim}$ is defined as $d_i = \sum_j \frac{\partial T_{ji}}{\partial x_j}, 0\le i<\text{dim}$.

You get an object of this type if you apply a FEValuesExtractors::Tensor to an FEValues, FEFaceValues or FESubfaceValues object.

Author
Denis Davydov, 2013

Definition at line 906 of file fe_values.h.

Member Typedef Documentation

template<int dim, int spacedim>
typedef ::Tensor<2, spacedim> FEValuesViews::Tensor< 2, dim, spacedim >::value_type

Data type for what you get when you apply an extractor of this kind to a vector-valued finite element.

Definition at line 914 of file fe_values.h.

template<int dim, int spacedim>
typedef ::Tensor<1, spacedim> FEValuesViews::Tensor< 2, dim, spacedim >::divergence_type

Data type for taking the divergence of a tensor: a vector.

Definition at line 919 of file fe_values.h.

Constructor & Destructor Documentation

template<int dim, int spacedim>
FEValuesViews::Tensor< 2, dim, spacedim >::Tensor ( )

Default constructor. Creates an invalid object.

template<int dim, int spacedim>
FEValuesViews::Tensor< 2, dim, spacedim >::Tensor ( const FEValuesBase< dim, spacedim > &  fe_values_base,
const unsigned int  first_tensor_component 
)

Constructor for an object that represents (dim*dim) components of a FEValuesBase object (or of one of the classes derived from FEValuesBase), representing the unique components comprising a second-order tensor valued variable.

The second argument denotes the index of the first component of the selected symmetric second order tensor.

Member Function Documentation

template<int dim, int spacedim>
Tensor& FEValuesViews::Tensor< 2, dim, spacedim >::operator= ( const Tensor< 2, 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>
value_type FEValuesViews::Tensor< 2, 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*dim) components (the unique components of a second-order tensor), the return type is a tensor of rank 2.

Parameters
shape_functionNumber of the shape function to be evaluated. Note that this number runs from zero to dofs_per_cell, even in the case of an FEFaceValues or FESubfaceValues object.
q_pointNumber of the quadrature point at which function is to be evaluated
template<int dim, int spacedim>
divergence_type FEValuesViews::Tensor< 2, dim, spacedim >::divergence ( const unsigned int  shape_function,
const unsigned int  q_point 
) const

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

See the general discussion of this class for a definition of the divergence.

Note
The meaning of the arguments is as documented for the value() function.
template<int dim, int spacedim>
template<class InputVector >
void FEValuesViews::Tensor< 2, dim, spacedim >::get_function_values ( const InputVector &  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.

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>
template<class InputVector >
void FEValuesViews::Tensor< 2, dim, spacedim >::get_function_divergences ( const InputVector &  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.

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

See the general discussion of this class for a definition of the divergence.

Member Data Documentation

template<int dim, int spacedim>
const FEValuesBase<dim, spacedim>& FEValuesViews::Tensor< 2, dim, spacedim >::fe_values
private

A reference to the FEValuesBase object we operate on.

Definition at line 1056 of file fe_values.h.

template<int dim, int spacedim>
const unsigned int FEValuesViews::Tensor< 2, dim, spacedim >::first_tensor_component
private

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

Definition at line 1062 of file fe_values.h.

template<int dim, int spacedim>
std::vector<ShapeFunctionData> FEValuesViews::Tensor< 2, dim, spacedim >::shape_function_data
private

Store the data about shape functions.

Definition at line 1067 of file fe_values.h.


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