Loading...
Searching...
No Matches
SphericalTensor2D< Cmpt > Class Template Reference

A templated (2 x 2) diagonal tensor of objects of <T>, effectively containing 1 element, derived from VectorSpace. More...

#include <SphericalTensor2D.H>

Inheritance diagram for SphericalTensor2D< Cmpt >:
Collaboration diagram for SphericalTensor2D< Cmpt >:

Public Types

enum  components { II }
 Component labeling enumeration. More...
typedef SphericalTensor2D< label > labelType
 Equivalent type of labels used for valid component indexing.
Public Types inherited from VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, 1 >
typedef VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, Ncmpts > vsType
 VectorSpace type.
typedef Cmpt cmptType
 Component type.
typedef Cmpt magType
 Magnitude type.
typedef direction size_type
 The type to represent the size of a VectorSpace.
typedef Cmpt * iterator
 Random access iterator for traversing VectorSpace.
typedef const Cmpt * const_iterator
 Random access iterator for traversing VectorSpace.

Public Member Functions

 SphericalTensor2D ()=default
 Default construct.
 SphericalTensor2D (const SphericalTensor2D &)=default
 Copy construct.
SphericalTensor2Doperator= (const SphericalTensor2D &)=default
 Copy assignment.
 SphericalTensor2D (Foam::zero)
 Construct initialized to zero.
 SphericalTensor2D (const VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, 1 > &)
 Construct given VectorSpace.
 SphericalTensor2D (const Cmpt &tii)
 Construct given the component.
 SphericalTensor2D (Istream &is)
 Construct from Istream.
const Cmpt & ii () const noexcept
Cmpt & ii () noexcept
scalar diagSqr () const
 The L2-norm squared of the diagonal.
const SphericalTensor2D< Cmpt > & T () const noexcept
 Return non-Hermitian transpose (no-op).
Public Member Functions inherited from VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, 1 >
const Foam::VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > block () const
 VectorSpace ()=default
 Default construct.
const Cmpt & component (const direction) const
void replace (const direction, const Cmpt &)
const Cmpt * cdata () const noexcept
 Return const pointer to the first data element.
Cmpt * data () noexcept
 Return pointer to the first data element.
void fill (const Cmpt &s)
 Assign all components to given value.
const Cmpt & operator[] (const direction) const
void operator= (const VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, Ncmpts > &)
void operator+= (const VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, Ncmpts > &)
void operator-= (const VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, Ncmpts > &)
void operator*= (const scalar)
void operator/= (const scalar)
iterator begin () noexcept
 Return an iterator (pointer) to begin of VectorSpace.
const_iterator cbegin () const noexcept
 Return const_iterator (const pointer) to begin of VectorSpace.
iterator end () noexcept
 Return an iterator (pointer) to end of VectorSpace.
const_iterator cend () const noexcept
 Return const_iterator (const pointer) to end of VectorSpace.

Static Public Attributes

static constexpr direction rank = 2
 Rank of SphericalTensor2D is 2.
static const SphericalTensor2D I
static const SphericalTensor2D oneThirdI
static const SphericalTensor2D twoThirdsI
Static Public Attributes inherited from VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, 1 >
static constexpr direction dim
 Dimensionality of space.
static constexpr direction nComponents
 Number of components in this vector space.
static constexpr direction mRows
static constexpr direction nCols
static const char *const typeName
static const char *const componentNames []
static const SphericalTensor2D< Cmpt > zero
static const SphericalTensor2D< Cmpt > one
static const SphericalTensor2D< Cmpt > max
static const SphericalTensor2D< Cmpt > min
static const SphericalTensor2D< Cmpt > rootMax
static const SphericalTensor2D< Cmpt > rootMin

Additional Inherited Members

Static Public Member Functions inherited from VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, 1 >
static constexpr direction size () noexcept
 The number of elements in the VectorSpace = Ncmpts.
static SphericalTensor2D< Cmpt > uniform (const Cmpt &s)
 Return a VectorSpace with all elements = s.
Public Attributes inherited from VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, 1 >
Cmpt v_ [Ncmpts]
 The components of this vector space.

Detailed Description

template<class Cmpt>
class Foam::SphericalTensor2D< Cmpt >

A templated (2 x 2) diagonal tensor of objects of <T>, effectively containing 1 element, derived from VectorSpace.

See also
Test-SphericalTensor2D.C
Source files

Definition at line 53 of file SphericalTensor2D.H.

Member Typedef Documentation

◆ labelType

template<class Cmpt>
typedef SphericalTensor2D<label> labelType

Equivalent type of labels used for valid component indexing.

Definition at line 64 of file SphericalTensor2D.H.

Member Enumeration Documentation

◆ components

template<class Cmpt>
enum components

Component labeling enumeration.

Enumerator
II 

Definition at line 85 of file SphericalTensor2D.H.

Constructor & Destructor Documentation

◆ SphericalTensor2D() [1/6]

template<class Cmpt>
SphericalTensor2D ( )
default

Default construct.

Referenced by SphericalTensor2D(), SphericalTensor2D(), and SphericalTensor2D().

Here is the caller graph for this function:

◆ SphericalTensor2D() [2/6]

template<class Cmpt>
SphericalTensor2D ( const SphericalTensor2D< Cmpt > & )
default

Copy construct.

◆ SphericalTensor2D() [3/6]

template<class Cmpt>
SphericalTensor2D ( Foam::zero )
inline

Construct initialized to zero.

Definition at line 27 of file SphericalTensor2DI.H.

References SphericalTensor2D(), and VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, 1 >::zero.

Here is the call graph for this function:

◆ SphericalTensor2D() [4/6]

template<class Cmpt>
SphericalTensor2D ( const VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, 1 > & vs)
inline

Construct given VectorSpace.

Definition at line 34 of file SphericalTensor2DI.H.

References SphericalTensor2D(), and VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, 1 >::VectorSpace().

Here is the call graph for this function:

◆ SphericalTensor2D() [5/6]

template<class Cmpt>
SphericalTensor2D ( const Cmpt & tii)
inlineexplicit

Construct given the component.

Definition at line 44 of file SphericalTensor2DI.H.

References II, and VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, 1 >::v_.

◆ SphericalTensor2D() [6/6]

template<class Cmpt>
SphericalTensor2D ( Istream & is)
inlineexplicit

Construct from Istream.

Definition at line 51 of file SphericalTensor2DI.H.

References SphericalTensor2D().

Here is the call graph for this function:

Member Function Documentation

◆ operator=()

template<class Cmpt>
SphericalTensor2D & operator= ( const SphericalTensor2D< Cmpt > & )
default

Copy assignment.

◆ ii() [1/2]

◆ ii() [2/2]

template<class Cmpt>
Cmpt & ii ( )
inlinenoexcept

Definition at line 138 of file SphericalTensor2D.H.

◆ diagSqr()

template<class Cmpt>
Foam::scalar diagSqr ( ) const
inline

The L2-norm squared of the diagonal.

Definition at line 60 of file SphericalTensor2DI.H.

References ii(), and Foam::magSqr().

Here is the call graph for this function:

◆ T()

template<class Cmpt>
const SphericalTensor2D< Cmpt > & T ( ) const
inlinenoexcept

Return non-Hermitian transpose (no-op).

Definition at line 154 of file SphericalTensor2D.H.

Member Data Documentation

◆ rank

template<class Cmpt>
direction rank = 2
staticconstexpr

Rank of SphericalTensor2D is 2.

Definition at line 72 of file SphericalTensor2D.H.

◆ I

template<class Cmpt>
const SphericalTensor2D I
static

Definition at line 77 of file SphericalTensor2D.H.

◆ oneThirdI

template<class Cmpt>
const SphericalTensor2D oneThirdI
static

Definition at line 78 of file SphericalTensor2D.H.

◆ twoThirdsI

template<class Cmpt>
const SphericalTensor2D twoThirdsI
static

Definition at line 79 of file SphericalTensor2D.H.


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