SPH
Classes | Functions | Variables
AntisymmetricTensor.h File Reference

Basic algebra for antisymmetric 2nd order tensors. More...

#include "objects/geometry/SymmetricTensor.h"
#include "objects/containers/StaticArray.h"

Go to the source code of this file.

Classes

struct  PseudoVectorTag
 
class  AntisymmetricTensor
 

Functions

INLINE AntisymmetricTensor antisymmetricOuter (const Vector &v1, const Vector &v2)
 
INLINE bool almostEqual (const AntisymmetricTensor &t1, const AntisymmetricTensor &t2, const Float eps=EPS)
 Checks if two tensors are equal to some given accuracy. More...
 
template<>
INLINE Float norm (const AntisymmetricTensor &t)
 
template<>
INLINE Float normSqr (const AntisymmetricTensor &t)
 Arbitrary squared norm of the tensor. More...
 
template<>
INLINE auto abs (const AntisymmetricTensor &t)
 Returns the tensor of absolute values. Resulting tensor is necessarily symmetric. More...
 
template<>
INLINE Float minElement (const AntisymmetricTensor &t)
 Returns the minimal element of the tensor. More...
 
template<>
INLINE AntisymmetricTensor min (const AntisymmetricTensor &t1, const AntisymmetricTensor &t2)
 Component-wise minimum of two tensors. More...
 
template<>
INLINE AntisymmetricTensor max (const AntisymmetricTensor &t1, const AntisymmetricTensor &t2)
 Component-wise maximum of two tensors. More...
 
template<>
INLINE AntisymmetricTensor clamp (const AntisymmetricTensor &t, const Interval &range)
 Clamping all components by range. More...
 
template<>
INLINE bool isReal (const AntisymmetricTensor &t)
 
template<>
INLINE auto less (const AntisymmetricTensor &t1, const AntisymmetricTensor &t2)
 
INLINE Float ddot (const AntisymmetricTensor &t1, const AntisymmetricTensor &t2)
 Double-dot product t1 : t2 = sum_ij t1_ij t2_ij. More...
 

Variables

const PseudoVectorTag PSEUDOVECTOR
 

Detailed Description

Basic algebra for antisymmetric 2nd order tensors.

Author
Pavel Sevecek (sevecek at sirrah.troja.mff.cuni.cz)
Date
2016-2021

Definition in file AntisymmetricTensor.h.

Function Documentation

◆ abs()

template<>
INLINE auto abs ( const AntisymmetricTensor t)

Returns the tensor of absolute values. Resulting tensor is necessarily symmetric.

Definition at line 158 of file AntisymmetricTensor.h.

◆ almostEqual()

INLINE bool almostEqual ( const AntisymmetricTensor t1,
const AntisymmetricTensor t2,
const Float  eps = EPS 
)

Checks if two tensors are equal to some given accuracy.

Definition at line 139 of file AntisymmetricTensor.h.

◆ antisymmetricOuter()

INLINE AntisymmetricTensor antisymmetricOuter ( const Vector v1,
const Vector v2 
)

ANTISYMMETRIZED outer product of two vectors (simple outer product is not necessarily antisymmetric matrix).

Todo:
optimize

Definition at line 130 of file AntisymmetricTensor.h.

◆ clamp()

template<>
INLINE AntisymmetricTensor clamp ( const AntisymmetricTensor t,
const Interval range 
)

Clamping all components by range.

Definition at line 182 of file AntisymmetricTensor.h.

◆ ddot()

INLINE Float ddot ( const AntisymmetricTensor t1,
const AntisymmetricTensor t2 
)

Double-dot product t1 : t2 = sum_ij t1_ij t2_ij.

Definition at line 199 of file AntisymmetricTensor.h.

◆ isReal()

template<>
INLINE bool isReal ( const AntisymmetricTensor t)

Definition at line 189 of file AntisymmetricTensor.h.

◆ less()

template<>
INLINE auto less ( const AntisymmetricTensor t1,
const AntisymmetricTensor t2 
)

Definition at line 194 of file AntisymmetricTensor.h.

◆ max()

template<>
INLINE AntisymmetricTensor max ( const AntisymmetricTensor t1,
const AntisymmetricTensor t2 
)

Component-wise maximum of two tensors.

Definition at line 176 of file AntisymmetricTensor.h.

◆ min()

template<>
INLINE AntisymmetricTensor min ( const AntisymmetricTensor t1,
const AntisymmetricTensor t2 
)

Component-wise minimum of two tensors.

Definition at line 170 of file AntisymmetricTensor.h.

◆ minElement()

template<>
INLINE Float minElement ( const AntisymmetricTensor t)

Returns the minimal element of the tensor.

Definition at line 164 of file AntisymmetricTensor.h.

◆ norm()

template<>
INLINE Float norm ( const AntisymmetricTensor t)

Arbitrary norm of the tensor.

Todo:
Use some well-defined norm instead? (spectral norm, L1 or L2 norm, ...)

Definition at line 146 of file AntisymmetricTensor.h.

◆ normSqr()

template<>
INLINE Float normSqr ( const AntisymmetricTensor t)

Arbitrary squared norm of the tensor.

Definition at line 152 of file AntisymmetricTensor.h.

Variable Documentation

◆ PSEUDOVECTOR

const PseudoVectorTag PSEUDOVECTOR

Definition at line 16 of file AntisymmetricTensor.h.