SphericalTensor2D< Cmpt > Class Template Reference

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

Inheritance diagram for SphericalTensor2D< Cmpt >:
[legend]
Collaboration diagram for SphericalTensor2D< Cmpt >:
[legend]

Public Types

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

Public Member Functions

 SphericalTensor2D ()=default
 Default construct. More...
 
 SphericalTensor2D (const SphericalTensor2D &)=default
 Copy construct. More...
 
SphericalTensor2Doperator= (const SphericalTensor2D &)=default
 Copy assignment. More...
 
 SphericalTensor2D (const Foam::zero)
 Construct initialized to zero. More...
 
 SphericalTensor2D (const VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, 1 > &)
 Construct given VectorSpace. More...
 
 SphericalTensor2D (const Cmpt &tii)
 Construct given the component. More...
 
 SphericalTensor2D (Istream &is)
 Construct from Istream. More...
 
const Cmpt & ii () const
 
Cmpt & ii ()
 
- Public Member Functions inherited from VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, 1 >
 VectorSpace ()=default
 Default construct. More...
 
 VectorSpace (const Foam::zero)
 Construct initialized to zero. More...
 
 VectorSpace (const VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, Ncmpts > &vs)
 Copy construct. More...
 
 VectorSpace (const VectorSpace< Form2, Cmpt2, Ncmpts > &)
 Copy construct of a VectorSpace with the same size. More...
 
 VectorSpace (Istream &is)
 Construct from Istream. More...
 
const Cmpt & component (const direction) const
 
Cmpt & component (const direction)
 
void component (Cmpt &, const direction) const
 
void replace (const direction, const Cmpt &)
 
const Cmpt * cdata () const noexcept
 Return const pointer to the first data element. More...
 
Cmpt * data () noexcept
 Return pointer to the first data element. More...
 
const ConstBlock< SubVector, BStart > block () const
 
const Foam::VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > block () const
 
const Cmpt & operator[] (const direction) const
 
Cmpt & operator[] (const direction)
 
void operator= (const VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, Ncmpts > &)
 
void operator= (const Foam::zero)
 
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 to begin of VectorSpace. More...
 
const_iterator begin () const noexcept
 Return const_iterator to begin of VectorSpace. More...
 
iterator end () noexcept
 Return an iterator to end of VectorSpace. More...
 
const_iterator end () const noexcept
 Return const_iterator to end of VectorSpace. More...
 
const_iterator cbegin () const noexcept
 Return const_iterator to begin of VectorSpace. More...
 
const_iterator cend () const noexcept
 Return const_iterator to end of VectorSpace. More...
 

Static Public Attributes

static constexpr direction rank = 2
 Rank of SphericalTensor2D is 2. More...
 
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. More...
 
static constexpr direction nComponents
 Number of components in this vector space. More...
 
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. More...
 
static SphericalTensor2D< Cmpt > uniform (const Cmpt &s)
 Return a VectorSpace with all elements = s. More...
 
- Public Attributes inherited from VectorSpace< SphericalTensor2D< Cmpt >, Cmpt, 1 >
Cmpt v_ [Ncmpts]
 The components of this vector space. More...
 

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 57 of file SphericalTensor2D.H.

Member Typedef Documentation

◆ labelType

typedef SphericalTensor2D<label> labelType

Equivalent type of labels used for valid component indexing.

Definition at line 66 of file SphericalTensor2D.H.

Member Enumeration Documentation

◆ components

enum components

Component labeling enumeration.

Enumerator
II 

Definition at line 83 of file SphericalTensor2D.H.

Constructor & Destructor Documentation

◆ SphericalTensor2D() [1/6]

SphericalTensor2D ( )
default

Default construct.

◆ SphericalTensor2D() [2/6]

SphericalTensor2D ( const SphericalTensor2D< Cmpt > &  )
default

Copy construct.

◆ SphericalTensor2D() [3/6]

SphericalTensor2D ( const Foam::zero  )
inline

Construct initialized to zero.

Definition at line 34 of file SphericalTensor2DI.H.

◆ SphericalTensor2D() [4/6]

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

Construct given VectorSpace.

Definition at line 41 of file SphericalTensor2DI.H.

◆ SphericalTensor2D() [5/6]

SphericalTensor2D ( const Cmpt &  tii)
inlineexplicit

Construct given the component.

Definition at line 51 of file SphericalTensor2DI.H.

◆ SphericalTensor2D() [6/6]

SphericalTensor2D ( Istream is)
inlineexplicit

Construct from Istream.

Definition at line 58 of file SphericalTensor2DI.H.

Member Function Documentation

◆ operator=()

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

Copy assignment.

◆ ii() [1/2]

const Cmpt & ii
inline

Definition at line 67 of file SphericalTensor2DI.H.

Referenced by Foam::det(), Foam::inv(), Foam::operator&(), Foam::operator&&(), Foam::operator+(), Foam::operator-(), Foam::operator/(), Tensor2D< Cmpt >::operator=(), SymmTensor2D< Cmpt >::SymmTensor2D(), Tensor2D< Cmpt >::Tensor2D(), and Foam::tr().

Here is the caller graph for this function:

◆ ii() [2/2]

Cmpt & ii
inline

Definition at line 74 of file SphericalTensor2DI.H.

Member Data Documentation

◆ rank

constexpr direction rank = 2
staticconstexpr

Rank of SphericalTensor2D is 2.

Definition at line 72 of file SphericalTensor2D.H.

◆ I

const Foam::sphericalTensor2D I
static

Definition at line 77 of file SphericalTensor2D.H.

◆ oneThirdI

const Foam::sphericalTensor2D oneThirdI
static

Definition at line 78 of file SphericalTensor2D.H.

◆ twoThirdsI

const Foam::sphericalTensor2D twoThirdsI
static

Definition at line 79 of file SphericalTensor2D.H.


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