![]() |
Reference documentation for deal.II version 9.1.0-pre
|
#include <deal.II/fe/fe_values.h>
Classes | |
struct | OutputType |
struct | ShapeFunctionData |
Public Types | |
using | value_type = ::Tensor< 2, spacedim > |
using | divergence_type = ::Tensor< 1, spacedim > |
using | gradient_type = ::Tensor< 3, spacedim > |
Public Member Functions | |
Tensor () | |
Tensor (const FEValuesBase< dim, spacedim > &fe_values_base, const unsigned int first_tensor_component) | |
Tensor & | operator= (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 |
gradient_type | gradient (const unsigned int shape_function, const unsigned int q_point) const |
template<class InputVector > | |
void | get_function_values (const InputVector &fe_function, std::vector< typename ProductType< value_type, typename InputVector::value_type >::type > &values) const |
template<class InputVector > | |
void | get_function_values_from_local_dof_values (const InputVector &dof_values, std::vector< typename OutputType< typename InputVector::value_type >::value_type > &values) const |
template<class InputVector > | |
void | get_function_divergences (const InputVector &fe_function, std::vector< typename ProductType< divergence_type, typename InputVector::value_type >::type > &divergences) const |
template<class InputVector > | |
void | get_function_divergences_from_local_dof_values (const InputVector &dof_values, std::vector< typename OutputType< typename InputVector::value_type >::divergence_type > &divergences) const |
template<class InputVector > | |
void | get_function_gradients (const InputVector &fe_function, std::vector< typename ProductType< gradient_type, typename InputVector::value_type >::type > &gradients) const |
template<class InputVector > | |
void | get_function_gradients_from_local_dof_values (const InputVector &dof_values, std::vector< typename OutputType< typename InputVector::value_type >::gradient_type > &gradients) const |
Private Attributes | |
const SmartPointer< const FEValuesBase< dim, spacedim > > | fe_values |
const unsigned int | first_tensor_component |
std::vector< ShapeFunctionData > | shape_function_data |
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, gradient 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_{ij}}{\partial x_j}, \, 0\le i<\text{dim}\), whereas its gradient is \(G_{ijk} = \frac{\partial T_{ij}}{\partial x_k}\).
You get an object of this type if you apply a FEValuesExtractors::Tensor to an FEValues, FEFaceValues or FESubfaceValues object.
Definition at line 1547 of file fe_values.h.
using FEValuesViews::Tensor< 2, dim, spacedim >::value_type = ::Tensor<2, spacedim> |
Data type for what you get when you apply an extractor of this kind to a vector-valued finite element.
Definition at line 1554 of file fe_values.h.
using FEValuesViews::Tensor< 2, dim, spacedim >::divergence_type = ::Tensor<1, spacedim> |
Data type for taking the divergence of a tensor: a vector.
Definition at line 1559 of file fe_values.h.
using FEValuesViews::Tensor< 2, dim, spacedim >::gradient_type = ::Tensor<3, spacedim> |
Data type for taking the gradient of a second order tensor: a third order tensor.
Definition at line 1565 of file fe_values.h.
FEValuesViews::Tensor< 2, dim, spacedim >::Tensor | ( | ) |
Default constructor. Creates an invalid object.
Definition at line 464 of file fe_values.cc.
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.
Definition at line 392 of file fe_values.cc.
Tensor< 2, dim, spacedim > & 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.
Definition at line 473 of file fe_values.cc.
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.
shape_function | Number 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_point | Number of the quadrature point at which function is to be evaluated. |
update_values
flag must be an element of the list of UpdateFlags that you passed to the constructor of this object. See The interplay of UpdateFlags, Mapping, and FiniteElement in FEValues for more information. 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.
update_gradients
flag must be an element of the list of UpdateFlags that you passed to the constructor of this object. See The interplay of UpdateFlags, Mapping, and FiniteElement in FEValues for more information. gradient_type FEValuesViews::Tensor< 2, dim, spacedim >::gradient | ( | const unsigned int | shape_function, |
const unsigned int | q_point | ||
) | const |
Return the gradient (3-rd order tensor) 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 gradient.
update_gradients
flag must be an element of the list of UpdateFlags that you passed to the constructor of this object. See The interplay of UpdateFlags, Mapping, and FiniteElement in FEValues for more information. void FEValuesViews::Tensor< 2, dim, spacedim >::get_function_values | ( | const InputVector & | fe_function, |
std::vector< typename ProductType< value_type, typename InputVector::value_type >::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.
The data type stored by the output vector must be what you get when you multiply the values of shape functions (i.e., value_type
) times the type used to store the values of the unknowns \(U_j\) of your finite element vector \(U\) (represented by the fe_function
argument).
update_values
flag must be an element of the list of UpdateFlags that you passed to the constructor of this object. See The interplay of UpdateFlags, Mapping, and FiniteElement in FEValues for more information. Definition at line 2468 of file fe_values.cc.
void FEValuesViews::Tensor< 2, dim, spacedim >::get_function_values_from_local_dof_values | ( | const InputVector & | dof_values, |
std::vector< typename OutputType< typename InputVector::value_type >::value_type > & | values | ||
) | const |
Same as above, but using a vector of local degree-of-freedom values.
The dof_values
vector must have a length equal to number of DoFs on a cell, and each entry dof_values
[i] is the value of the local DoF i
. The fundamental prerequisite for the InputVector
is that it must be possible to create an ArrayView from it; this is satisfied by the std::vector
class.
The DoF values typically would be obtained in the following way:
or, for a generic Number
type,
Definition at line 2499 of file fe_values.cc.
void FEValuesViews::Tensor< 2, dim, spacedim >::get_function_divergences | ( | const InputVector & | fe_function, |
std::vector< typename ProductType< divergence_type, typename InputVector::value_type >::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.
The data type stored by the output vector must be what you get when you multiply the divergences of shape functions (i.e., divergence_type
) times the type used to store the values of the unknowns \(U_j\) of your finite element vector \(U\) (represented by the fe_function
argument).
update_gradients
flag must be an element of the list of UpdateFlags that you passed to the constructor of this object. See The interplay of UpdateFlags, Mapping, and FiniteElement in FEValues for more information. Definition at line 2524 of file fe_values.cc.
void FEValuesViews::Tensor< 2, dim, spacedim >::get_function_divergences_from_local_dof_values | ( | const InputVector & | dof_values, |
std::vector< typename OutputType< typename InputVector::value_type >::divergence_type > & | divergences | ||
) | const |
Same as above, but using a vector of local degree-of-freedom values.
The dof_values
vector must have a length equal to number of DoFs on a cell, and each entry dof_values
[i] is the value of the local DoF i
. The fundamental prerequisite for the InputVector
is that it must be possible to create an ArrayView from it; this is satisfied by the std::vector
class.
The DoF values typically would be obtained in the following way:
or, for a generic Number
type,
Definition at line 2556 of file fe_values.cc.
void FEValuesViews::Tensor< 2, dim, spacedim >::get_function_gradients | ( | const InputVector & | fe_function, |
std::vector< typename ProductType< gradient_type, typename InputVector::value_type >::type > & | gradients | ||
) | const |
Return the gradient 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.
See the general discussion of this class for a definition of the gradient.
The data type stored by the output vector must be what you get when you multiply the gradients of shape functions (i.e., gradient_type
) times the type used to store the values of the unknowns \(U_j\) of your finite element vector \(U\) (represented by the fe_function
argument).
update_gradients
flag must be an element of the list of UpdateFlags that you passed to the constructor of this object. See The interplay of UpdateFlags, Mapping, and FiniteElement in FEValues for more information. Definition at line 2581 of file fe_values.cc.
void FEValuesViews::Tensor< 2, dim, spacedim >::get_function_gradients_from_local_dof_values | ( | const InputVector & | dof_values, |
std::vector< typename OutputType< typename InputVector::value_type >::gradient_type > & | gradients | ||
) | const |
Same as above, but using a vector of local degree-of-freedom values.
The dof_values
vector must have a length equal to number of DoFs on a cell, and each entry dof_values
[i] is the value of the local DoF i
. The fundamental prerequisite for the InputVector
is that it must be possible to create an ArrayView from it; this is satisfied by the std::vector
class.
The DoF values typically would be obtained in the following way:
or, for a generic Number
type,
Definition at line 2613 of file fe_values.cc.
|
private |
A pointer to the FEValuesBase object we operate on.
Definition at line 1855 of file fe_values.h.
|
private |
The first component of the vector this view represents of the FEValuesBase object.
Definition at line 1861 of file fe_values.h.
|
private |
Store the data about shape functions.
Definition at line 1866 of file fe_values.h.