Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doxygen: fix SymmetricTensor friends #14086

Merged
merged 1 commit into from
Jul 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
67 changes: 35 additions & 32 deletions include/deal.II/base/symmetric_tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,46 @@ template <int dim, typename Number>
constexpr DEAL_II_ALWAYS_INLINE SymmetricTensor<4, dim, Number>
invert(const SymmetricTensor<4, dim, Number> &);

/**
* 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.
* \f[
* \text{tr} \mathbf A = \sum_i A_{ii}
* \f]
*
* @relatesalso SymmetricTensor
*/
template <int dim2, typename Number>
constexpr inline DEAL_II_ALWAYS_INLINE Number
trace(const SymmetricTensor<2, dim2, Number> &);

/**
* Compute the deviator of a symmetric tensor, which is defined as
* $\text{dev} \mathbf T = \mathbf T -
* \frac{1}{\text{dim}} \text{tr}\mathbf T \; \mathbf I$, where $\mathbf I$
* is the identity operator. This
* quantity equals the original tensor minus its contractive or dilative
* component and refers to the shear in, for example, elasticity.
*
* @relatesalso SymmetricTensor
*/
template <int dim, typename Number>
constexpr inline DEAL_II_ALWAYS_INLINE SymmetricTensor<2, dim, Number>
deviator(const SymmetricTensor<2, dim, Number> &);

/**
* 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
* <tt>third_invariant()</tt>
* function that returns the determinant of a tensor.
*
* @relatesalso SymmetricTensor
*/
template <int dim, typename Number>
DEAL_II_CONSTEXPR inline DEAL_II_ALWAYS_INLINE Number
determinant(const SymmetricTensor<2, dim, Number> &);
Expand Down Expand Up @@ -1069,6 +1101,8 @@ class SymmetricTensor
*/
base_tensor_type data;

#ifndef DOXYGEN

// Make all other symmetric tensors friends.
template <int, int, typename>
friend class SymmetricTensor;
Expand Down Expand Up @@ -1105,6 +1139,7 @@ class SymmetricTensor

friend struct internal::SymmetricTensorImplementation::
Inverse<4, dim, Number>;
#endif
};


Expand Down Expand Up @@ -2727,19 +2762,6 @@ constexpr DEAL_II_ALWAYS_INLINE



/**
* 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
* <tt>third_invariant()</tt>
* function that returns the determinant of a tensor.
*
* @relatesalso SymmetricTensor
*/
template <int dim, typename Number>
DEAL_II_CONSTEXPR inline DEAL_II_ALWAYS_INLINE Number
determinant(const SymmetricTensor<2, dim, Number> &t)
Expand Down Expand Up @@ -2789,15 +2811,6 @@ third_invariant(const SymmetricTensor<2, dim, Number> &t)



/**
* 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.
* \f[
* \text{tr} \mathbf A = \sum_i A_{ii}
* \f]
*
* @relatesalso SymmetricTensor
*/
template <int dim, typename Number>
constexpr inline DEAL_II_ALWAYS_INLINE Number
trace(const SymmetricTensor<2, dim, Number> &d)
Expand Down Expand Up @@ -3297,16 +3310,6 @@ transpose(const SymmetricTensor<rank_, dim, Number> &t)



/**
* Compute the deviator of a symmetric tensor, which is defined as
* $\text{dev} \mathbf T = \mathbf T -
* \frac{1}{\text{dim}} \text{tr}\mathbf T \; \mathbf I$, where $\mathbf I$
* is the identity operator. This
* quantity equals the original tensor minus its contractive or dilative
* component and refers to the shear in, for example, elasticity.
*
* @relatesalso SymmetricTensor
*/
template <int dim, typename Number>
constexpr inline DEAL_II_ALWAYS_INLINE SymmetricTensor<2, dim, Number>
deviator(const SymmetricTensor<2, dim, Number> &t)
Expand Down