Reference documentation for deal.II version 8.4.1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Related Functions | List of all members
DerivativeForm< order, dim, spacedim, Number > Class Template Reference

#include <deal.II/base/derivative_form.h>

Inheritance diagram for DerivativeForm< order, dim, spacedim, Number >:
[legend]

Public Member Functions

 DerivativeForm ()
 
 DerivativeForm (const Tensor< order+1, dim, Number > &)
 
Tensor< order, dim, Number > & operator[] (const unsigned int i)
 
const Tensor< order, dim, Number > & operator[] (const unsigned int i) const
 
DerivativeFormoperator= (const DerivativeForm< order, dim, spacedim, Number > &)
 
DerivativeFormoperator= (const Tensor< order+1, dim, Number > &)
 
DerivativeFormoperator= (const Tensor< 1, dim, Number > &)
 
 operator Tensor< order+1, dim, Number > () const
 
 operator Tensor< 1, dim, Number > () const
 
DerivativeForm< 1, spacedim, dim, Number > transpose () const
 
double determinant () const
 
DerivativeForm< 1, dim, spacedim, Number > covariant_form () const
 
 DeclException1 (ExcInvalidTensorIndex, int,<< "Invalid DerivativeForm index "<< arg1)
 

Static Public Member Functions

static std::size_t memory_consumption ()
 

Private Member Functions

DerivativeForm< 1, dim, spacedim, Number > times_T_t (Tensor< 2, dim, Number > T) const
 

Private Attributes

Tensor< order, dim, Number > tensor [spacedim]
 

Related Functions

(Note that these are not member functions.)

template<int spacedim, int dim, typename Number >
Tensor< 1, spacedim, Number > apply_transformation (const DerivativeForm< 1, dim, spacedim, Number > &DF, const Tensor< 1, dim, Number > &T)
 
template<int spacedim, int dim, typename Number >
DerivativeForm< 1, spacedim, dim > apply_transformation (const DerivativeForm< 1, dim, spacedim, Number > &DF, const Tensor< 2, dim, Number > &T)
 
template<int spacedim, int dim, typename Number >
Tensor< 2, spacedim, Number > apply_transformation (const DerivativeForm< 1, dim, spacedim, Number > &DF1, const DerivativeForm< 1, dim, spacedim, Number > &DF2)
 
template<int dim, int spacedim, typename Number >
DerivativeForm< 1, spacedim, dim, Number > transpose (const DerivativeForm< 1, dim, spacedim, Number > &DF)
 

Detailed Description

template<int order, int dim, int spacedim, typename Number = double>
class DerivativeForm< order, dim, spacedim, Number >

This class represents the (tangential) derivatives of a function \( f: {\mathbb R}^{\text{dim}} \rightarrow {\mathbb R}^{\text{spacedim}}\). Such functions are always used to map the reference dim-dimensional cell into spacedim-dimensional space. For such objects, the first derivative of the function is a linear map from \({\mathbb R}^{\text{dim}}\) to \({\mathbb R}^{\text{spacedim}}\), i.e., it can be represented as a matrix in \({\mathbb R}^{\text{spacedim}\times \text{dim}}\). This makes sense since one would represent the first derivative, \(\nabla f(\mathbf x)\) with \(\mathbf x\in {\mathbb R}^{\text{dim}}\), in such a way that the directional derivative in direction \(\mathbf d\in {\mathbb R}^{\text{dim}}\) so that

\begin{align*} \nabla f(\mathbf x) \mathbf d = \lim_{\varepsilon\rightarrow 0} \frac{f(\mathbf x + \varepsilon \mathbf d) - f(\mathbf x)}{\varepsilon}, \end{align*}

i.e., one needs to be able to multiply the matrix \(\nabla f(\mathbf x)\) by a vector in \({\mathbb R}^{\text{dim}}\), and the result is a difference of function values, which are in \({\mathbb R}^{\text{spacedim}}\). Consequently, the matrix must be of size \(\text{spacedim}\times\text{dim}\).

Similarly, the second derivative is a bilinear map from \({\mathbb R}^{\text{dim}} \times {\mathbb R}^{\text{dim}}\) to \({\mathbb R}^{\text{spacedim}}\), which one can think of a rank-3 object of size \(\text{spacedim}\times\text{dim}\times\text{dim}\).

In deal.II we represent these derivatives using objects of type DerivativeForm<1,dim,spacedim,Number>, DerivativeForm<2,dim,spacedim,Number> and so on.

Author
Sebastian Pauletti, 2011, Luca Heltai, 2015

Definition at line 56 of file derivative_form.h.

Constructor & Destructor Documentation

template<int order, int dim, int spacedim, typename Number = double>
DerivativeForm< order, dim, spacedim, Number >::DerivativeForm ( )

Constructor. Initialize all entries to zero.

template<int order, int dim, int spacedim, typename Number = double>
DerivativeForm< order, dim, spacedim, Number >::DerivativeForm ( const Tensor< order+1, dim, Number > &  )

Constructor from a tensor.

Member Function Documentation

template<int order, int dim, int spacedim, typename Number = double>
Tensor<order,dim,Number>& DerivativeForm< order, dim, spacedim, Number >::operator[] ( const unsigned int  i)

Read-Write access operator.

template<int order, int dim, int spacedim, typename Number = double>
const Tensor<order,dim,Number>& DerivativeForm< order, dim, spacedim, Number >::operator[] ( const unsigned int  i) const

Read-only access operator.

template<int order, int dim, int spacedim, typename Number = double>
DerivativeForm& DerivativeForm< order, dim, spacedim, Number >::operator= ( const DerivativeForm< order, dim, spacedim, Number > &  )

Assignment operator.

template<int order, int dim, int spacedim, typename Number = double>
DerivativeForm& DerivativeForm< order, dim, spacedim, Number >::operator= ( const Tensor< order+1, dim, Number > &  )

Assignment operator.

template<int order, int dim, int spacedim, typename Number = double>
DerivativeForm& DerivativeForm< order, dim, spacedim, Number >::operator= ( const Tensor< 1, dim, Number > &  )

Assignment operator.

template<int order, int dim, int spacedim, typename Number = double>
DerivativeForm< order, dim, spacedim, Number >::operator Tensor< order+1, dim, Number > ( ) const

Converts a DerivativeForm <order,dim,dim> to Tensor<order+1,dim,Number>. In particular, if order==1 and the derivative is the Jacobian of F, then Tensor[i] = grad(F^i).

template<int order, int dim, int spacedim, typename Number = double>
DerivativeForm< order, dim, spacedim, Number >::operator Tensor< 1, dim, Number > ( ) const

Converts a DerivativeForm <1, dim, 1> to Tensor<1,dim,Number>.

template<int order, int dim, int spacedim, typename Number = double>
DerivativeForm<1, spacedim, dim, Number> DerivativeForm< order, dim, spacedim, Number >::transpose ( ) const

Return the transpose of a rectangular DerivativeForm, that is to say viewed as a two dimensional matrix.

template<int order, int dim, int spacedim, typename Number = double>
double DerivativeForm< order, dim, spacedim, Number >::determinant ( ) const

Computes the volume element associated with the jacobian of the transformation F. That is to say if \(DF\) is square, it computes \(\det(DF)\), in case DF is not square returns \(\sqrt(\det(DF^{t} * DF))\).

template<int order, int dim, int spacedim, typename Number = double>
DerivativeForm<1, dim, spacedim, Number> DerivativeForm< order, dim, spacedim, Number >::covariant_form ( ) const

Assuming (*this) stores the jacobian of the mapping F, it computes its covariant matrix, namely \(DF*G^{-1}\), where \(G = DF^{t}*DF\). If \(DF\) is square, covariant from gives \(DF^{-t}\).

template<int order, int dim, int spacedim, typename Number = double>
static std::size_t DerivativeForm< order, dim, spacedim, Number >::memory_consumption ( )
static

Determine an estimate for the memory consumption (in bytes) of this object.

template<int order, int dim, int spacedim, typename Number = double>
DerivativeForm< order, dim, spacedim, Number >::DeclException1 ( ExcInvalidTensorIndex  ,
int  ,
<< "Invalid DerivativeForm< order, dim, spacedim, Number > index "<<  arg1 
)

Exception.

template<int order, int dim, int spacedim, typename Number = double>
DerivativeForm<1, dim, spacedim, Number> DerivativeForm< order, dim, spacedim, Number >::times_T_t ( Tensor< 2, dim, Number >  T) const
private

Auxiliary function that computes (*this) * T^{t}

Friends And Related Function Documentation

template<int spacedim, int dim, typename Number >
Tensor< 1, spacedim, Number > apply_transformation ( const DerivativeForm< 1, dim, spacedim, Number > &  DF,
const Tensor< 1, dim, Number > &  T 
)
related

One of the uses of DerivativeForm is to apply it as a transformation. This is what this function does. If T is DerivativeForm<1,dim,1> it computes \(DF * T\), if T is DerivativeForm<1,dim,rank> it computes \(T*DF^{t}\).

Author
Sebastian Pauletti, 2011

Definition at line 411 of file derivative_form.h.

template<int spacedim, int dim, typename Number >
DerivativeForm< 1, spacedim, dim > apply_transformation ( const DerivativeForm< 1, dim, spacedim, Number > &  DF,
const Tensor< 2, dim, Number > &  T 
)
related

Similar to previous apply_transformation. It computes \(T*DF^{t}\).

Author
Sebastian Pauletti, 2011

Definition at line 432 of file derivative_form.h.

template<int spacedim, int dim, typename Number >
Tensor< 2, spacedim, Number > apply_transformation ( const DerivativeForm< 1, dim, spacedim, Number > &  DF1,
const DerivativeForm< 1, dim, spacedim, Number > &  DF2 
)
related

Similar to previous apply_transformation. It computes \(DF2*DF1^{t}\)

Author
Sebastian Pauletti, 2011

Definition at line 452 of file derivative_form.h.

template<int dim, int spacedim, typename Number >
DerivativeForm< 1, spacedim, dim, Number > transpose ( const DerivativeForm< 1, dim, spacedim, Number > &  DF)
related

Transpose of a rectangular DerivativeForm DF, mostly for compatibility reasons.

Author
Sebastian Pauletti, 2011

Definition at line 474 of file derivative_form.h.

Member Data Documentation

template<int order, int dim, int spacedim, typename Number = double>
Tensor<order,dim,Number> DerivativeForm< order, dim, spacedim, Number >::tensor[spacedim]
private

Array of tensors holding the subelements.

Definition at line 157 of file derivative_form.h.


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