![]() |
Reference documentation for deal.II version 9.5.1
|
#include <deal.II/base/config.h>
#include <deal.II/base/numbers.h>
#include <deal.II/base/table_indices.h>
#include <deal.II/base/template_constraints.h>
#include <deal.II/base/tensor.h>
#include <array>
Go to the source code of this file.
Namespaces | |
namespace | internal |
namespace | internal::SymmetricTensorImplementation |
namespace | internal::SymmetricTensorAccessors |
Enumerations | |
enum struct | SymmetricTensorEigenvectorMethod { hybrid , ql_implicit_shifts , jacobi } |
Functions | |
template<int dim, typename Number = double> | |
DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > | unit_symmetric_tensor () |
template<int dim, typename Number = double> | |
DEAL_II_HOST constexpr SymmetricTensor< 4, dim, Number > | deviator_tensor () |
template<int dim, typename Number = double> | |
DEAL_II_HOST constexpr SymmetricTensor< 4, dim, Number > | identity_tensor () |
template<int dim, typename Number > | |
DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > | invert (const SymmetricTensor< 2, dim, Number > &) |
template<int dim, typename Number > | |
DEAL_II_HOST constexpr SymmetricTensor< 4, dim, Number > | invert (const SymmetricTensor< 4, dim, Number > &) |
template<int dim2, typename Number > | |
DEAL_II_HOST constexpr Number | trace (const SymmetricTensor< 2, dim2, Number > &) |
template<int dim, typename Number > | |
DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > | deviator (const SymmetricTensor< 2, dim, Number > &) |
template<int dim, typename Number > | |
DEAL_II_HOST constexpr Number | determinant (const SymmetricTensor< 2, dim, Number > &) |
DEAL_II_HOST constexpr TableIndices< 2 > | internal::SymmetricTensorAccessors::merge (const TableIndices< 2 > &previous_indices, const unsigned int new_index, const unsigned int position) |
DEAL_II_HOST constexpr TableIndices< 4 > | internal::SymmetricTensorAccessors::merge (const TableIndices< 4 > &previous_indices, const unsigned int new_index, const unsigned int position) |
template<int rank_, int dim, typename Number , typename OtherNumber > | |
DEAL_II_HOST constexpr SymmetricTensor< rank_, dim, typename ProductType< Number, OtherNumber >::type > | operator+ (const SymmetricTensor< rank_, dim, Number > &left, const SymmetricTensor< rank_, dim, OtherNumber > &right) |
template<int rank_, int dim, typename Number , typename OtherNumber > | |
DEAL_II_HOST constexpr SymmetricTensor< rank_, dim, typename ProductType< Number, OtherNumber >::type > | operator- (const SymmetricTensor< rank_, dim, Number > &left, const SymmetricTensor< rank_, dim, OtherNumber > &right) |
template<int rank_, int dim, typename Number , typename OtherNumber > | |
DEAL_II_HOST constexpr Tensor< rank_, dim, typename ProductType< Number, OtherNumber >::type > | operator+ (const SymmetricTensor< rank_, dim, Number > &left, const Tensor< rank_, dim, OtherNumber > &right) |
template<int rank_, int dim, typename Number , typename OtherNumber > | |
DEAL_II_HOST constexpr Tensor< rank_, dim, typename ProductType< Number, OtherNumber >::type > | operator+ (const Tensor< rank_, dim, Number > &left, const SymmetricTensor< rank_, dim, OtherNumber > &right) |
template<int rank_, int dim, typename Number , typename OtherNumber > | |
DEAL_II_HOST constexpr Tensor< rank_, dim, typename ProductType< Number, OtherNumber >::type > | operator- (const SymmetricTensor< rank_, dim, Number > &left, const Tensor< rank_, dim, OtherNumber > &right) |
template<int rank_, int dim, typename Number , typename OtherNumber > | |
DEAL_II_HOST constexpr Tensor< rank_, dim, typename ProductType< Number, OtherNumber >::type > | operator- (const Tensor< rank_, dim, Number > &left, const SymmetricTensor< rank_, dim, OtherNumber > &right) |
template<int dim, typename Number > | |
DEAL_II_HOST constexpr Number | third_invariant (const SymmetricTensor< 2, dim, Number > &t) |
template<int dim, typename Number > | |
DEAL_II_HOST constexpr Number | trace (const SymmetricTensor< 2, dim, Number > &d) |
template<int dim, typename Number > | |
DEAL_II_HOST constexpr Number | first_invariant (const SymmetricTensor< 2, dim, Number > &t) |
template<typename Number > | |
DEAL_II_HOST constexpr Number | second_invariant (const SymmetricTensor< 2, 1, Number > &) |
template<typename Number > | |
DEAL_II_HOST constexpr Number | second_invariant (const SymmetricTensor< 2, 2, Number > &t) |
template<typename Number > | |
DEAL_II_HOST constexpr Number | second_invariant (const SymmetricTensor< 2, 3, Number > &t) |
template<typename Number > | |
std::array< Number, 1 > | eigenvalues (const SymmetricTensor< 2, 1, Number > &T) |
template<typename Number > | |
std::array< Number, 2 > | eigenvalues (const SymmetricTensor< 2, 2, Number > &T) |
template<typename Number > | |
std::array< Number, 3 > | eigenvalues (const SymmetricTensor< 2, 3, Number > &T) |
template<int dim, typename Number > | |
void | internal::SymmetricTensorImplementation::tridiagonalize (const ::SymmetricTensor< 2, dim, Number > &A, ::Tensor< 2, dim, Number > &Q, std::array< Number, dim > &d, std::array< Number, dim - 1 > &e) |
template<int dim, typename Number > | |
std::array< std::pair< Number, Tensor< 1, dim, Number > >, dim > | internal::SymmetricTensorImplementation::ql_implicit_shifts (const ::SymmetricTensor< 2, dim, Number > &A) |
template<int dim, typename Number > | |
std::array< std::pair< Number, Tensor< 1, dim, Number > >, dim > | internal::SymmetricTensorImplementation::jacobi (::SymmetricTensor< 2, dim, Number > A) |
template<typename Number > | |
std::array< std::pair< Number, Tensor< 1, 2, Number > >, 2 > | internal::SymmetricTensorImplementation::hybrid (const ::SymmetricTensor< 2, 2, Number > &A) |
template<typename Number > | |
std::array< std::pair< Number, Tensor< 1, 3, Number > >, 3 > | internal::SymmetricTensorImplementation::hybrid (const ::SymmetricTensor< 2, 3, Number > &A) |
template<int dim, typename Number > | |
std::array< std::pair< Number, Tensor< 1, dim, Number > >, std::integral_constant< int, dim >::value > | eigenvectors (const SymmetricTensor< 2, dim, Number > &T, const SymmetricTensorEigenvectorMethod method=SymmetricTensorEigenvectorMethod::ql_implicit_shifts) |
template<int rank_, int dim, typename Number > | |
DEAL_II_HOST constexpr SymmetricTensor< rank_, dim, Number > | transpose (const SymmetricTensor< rank_, dim, Number > &t) |
template<int dim, typename Number > | |
DEAL_II_HOST constexpr SymmetricTensor< 4, dim, Number > | outer_product (const SymmetricTensor< 2, dim, Number > &t1, const SymmetricTensor< 2, dim, Number > &t2) |
template<int dim, typename Number > | |
DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > | symmetrize (const Tensor< 2, dim, Number > &t) |
template<int rank_, int dim, typename Number > | |
DEAL_II_HOST constexpr SymmetricTensor< rank_, dim, Number > | operator* (const SymmetricTensor< rank_, dim, Number > &t, const Number &factor) |
template<int rank_, int dim, typename Number > | |
DEAL_II_HOST constexpr SymmetricTensor< rank_, dim, Number > | operator* (const Number &factor, const SymmetricTensor< rank_, dim, Number > &t) |
|
strong |
An enumeration for the algorithm to be employed when performing the computation of normalized eigenvectors and their corresponding eigenvalues by the eigenvalues() and eigenvectors() methods operating on SymmetricTensor objects.
The specialized algorithms utilized in computing the eigenvectors are presented in
Definition at line 3258 of file symmetric_tensor.h.
|
inlineconstexpr |
Return a unit symmetric tensor of rank 2, i.e., the dim==2
, then this matrix has the form
Definition at line 3366 of file symmetric_tensor.h.
|
inlineconstexpr |
Return the tensor of rank 4 that, when multiplied by a symmetric rank 2 tensor
For every tensor T
, there holds the identity deviator<dim,Number>(T) == deviator_tensor<dim,Number>() * T
, up to numerical round-off.
Definition at line 3394 of file symmetric_tensor.h.
|
inlineconstexpr |
Return the fourth-order symmetric identity tensor
Note that this tensor, even though it is the identity, has a somewhat funny form, and in particular does not only consist of zeros and ones. For example, for dim=2
, the identity tensor has all zero entries except for
In index notation, we can write the general form
To see why this factor of
This issue is also explained in the introduction to step-44.
Definition at line 3423 of file symmetric_tensor.h.
|
constexpr |
Invert a symmetric rank-2 tensor.
Definition at line 3458 of file symmetric_tensor.h.
|
constexpr |
Invert a symmetric rank-4 tensor. Since symmetric rank-4 tensors are mappings from and to symmetric rank-2 tensors, they can have an inverse.
If a tensor is not invertible, then the result is unspecified, but will likely contain the results of a division by zero or a very small number at the very least.
Definition at line 3478 of file symmetric_tensor.h.
|
inlineconstexpr |
Compute and return the trace of a tensor of rank 2, i.e. the sum of its diagonal entries. The trace is the first invariant of a rank-2 tensor.
|
inlineconstexpr |
Compute the deviator of a symmetric tensor, which is defined as
Definition at line 3349 of file symmetric_tensor.h.
|
inlineconstexpr |
Compute the determinant of a rank 2 symmetric tensor. The determinant is also commonly referred to as the third invariant of rank-2 tensors.
For a one-dimensional tensor, the determinant equals the only element and is therefore equivalent to the trace.
For greater notational simplicity, there is also a third_invariant()
function that returns the determinant of a tensor.
Definition at line 2800 of file symmetric_tensor.h.
|
inlineconstexpr |
Addition of two symmetric tensors of equal rank. The result is another SymmetricTensor that has a number type that is compatible with the operation.
If possible (e.g. when Number
and OtherNumber
are of the same type, or if the result of Number() + OtherNumber()
is another Number
), you should use operator+=
instead since this does not require the creation of a temporary variable.
Definition at line 2694 of file symmetric_tensor.h.
|
inlineconstexpr |
Subtraction of two symmetric tensors of equal rank. The result is another SymmetricTensor that has a number type that is compatible with the operation.
If possible (e.g. when Number
and OtherNumber
are of the same type, or if the result of Number() - OtherNumber()
is another Number
), you should use operator-=
instead since this does not require the creation of a temporary variable.
Definition at line 2719 of file symmetric_tensor.h.
|
constexpr |
Addition of a SymmetricTensor and a general Tensor of equal rank. The result is a general Tensor that has a number type that is compatible with the operation.
Definition at line 2739 of file symmetric_tensor.h.
|
constexpr |
Addition of a general Tensor with a SymmetricTensor of equal rank. The result is a general Tensor that has a number type that is compatible with the operation.
Definition at line 2756 of file symmetric_tensor.h.
|
constexpr |
Subtraction of a general Tensor from a SymmetricTensor of equal rank. The result is a general Tensor that has a number type that is compatible with the operation.
Definition at line 2773 of file symmetric_tensor.h.
|
constexpr |
Subtraction of a SymmetricTensor from a general Tensor of equal rank. The result is a general Tensor that has a number type that is compatible with the operation.
Definition at line 2790 of file symmetric_tensor.h.
|
constexpr |
Compute the determinant of a rank 2 symmetric tensor. This function therefore computes the same value as the determinant()
functions and is only provided for greater notational simplicity (since there are also functions first_invariant() and second_invariant()).
Definition at line 2840 of file symmetric_tensor.h.
|
inlineconstexpr |
Definition at line 2849 of file symmetric_tensor.h.
|
constexpr |
Compute the trace of a rank 2 symmetric tensor. This function therefore computes the same value as the trace()
functions and is only provided for greater notational simplicity (since there are also functions second_invariant() and third_invariant()).
Definition at line 2871 of file symmetric_tensor.h.
|
constexpr |
Compute the second invariant of a tensor of rank 2. The second invariant of a tensor
For the kind of arguments to this function, i.e., a rank-2 tensor of size 1, the result is simply zero.
Definition at line 2890 of file symmetric_tensor.h.
|
constexpr |
Compute the second invariant of a tensor of rank 2. The second invariant of a tensor
For the kind of arguments to this function, i.e., a symmetric rank-2 tensor of size 2, the result is (counting indices starting at one)
Definition at line 2917 of file symmetric_tensor.h.
|
constexpr |
Compute the second invariant of a tensor of rank 2. The second invariant of a tensor
Definition at line 2934 of file symmetric_tensor.h.
std::array< Number, 1 > eigenvalues | ( | const SymmetricTensor< 2, 1, Number > & | T | ) |
Return the eigenvalues of a symmetric
std::array< Number, 2 > eigenvalues | ( | const SymmetricTensor< 2, 2, Number > & | T | ) |
Return the eigenvalues of a symmetric
For
std::array< Number, 3 > eigenvalues | ( | const SymmetricTensor< 2, 3, Number > & | T | ) |
Return the eigenvalues of a symmetric
For
std::array< std::pair< Number, Tensor< 1, dim, Number > >, std::integral_constant< int, dim >::value > eigenvectors | ( | const SymmetricTensor< 2, dim, Number > & | T, |
const SymmetricTensorEigenvectorMethod | method = SymmetricTensorEigenvectorMethod::ql_implicit_shifts ) |
Return the eigenvalues and eigenvectors of a real-valued rank-2 symmetric tensor
The specialized algorithms utilized in computing the eigenvectors are presented in
|
constexpr |
Return the transpose of the given symmetric tensor. Since we are working with symmetric objects, the transpose is of course the same as the original tensor. This function mainly exists for compatibility with the Tensor class.
Definition at line 3339 of file symmetric_tensor.h.
|
inlineconstexpr |
Return the tensor of rank 4 that is the outer product of the two tensors given as arguments, i.e. the result
For example, the deviator tensor identity_tensor<dim>() - 1/d * outer_product (unit_symmetric_tensor<dim>(), unit_symmetric_tensor<dim>())
, since the (double) contraction with the unit tensor yields the trace of a symmetric tensor (
Definition at line 3509 of file symmetric_tensor.h.
|
inlineconstexpr |
Return the symmetrized version of a full rank-2 tensor, i.e.
Definition at line 3536 of file symmetric_tensor.h.
|
inlineconstexpr |
Multiplication of a symmetric tensor of general rank with a scalar from the right. This version of the operator is used if the scalar has the same data type as is used to store the elements of the symmetric tensor.
Definition at line 3561 of file symmetric_tensor.h.
|
constexpr |
Multiplication of a symmetric tensor of general rank with a scalar from the left. This version of the operator is used if the scalar has the same data type as is used to store the elements of the symmetric tensor.
Definition at line 3579 of file symmetric_tensor.h.