Barycentric2D< Cmpt > Class Template Reference

Templated 2D Barycentric derived from VectorSpace. Has 3 components, one of which is redundant. More...

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

Public Types

enum  components { A , B , C }
 Component labeling enumeration. More...
 
typedef Barycentric2D< label > labelType
 Equivalent type of labels used for valid component indexing. More...
 
- Public Types inherited from VectorSpace< Barycentric2D< Cmpt >, Cmpt, 3 >
typedef VectorSpace< Barycentric2D< 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

 Barycentric2D ()=default
 Default construct. More...
 
 Barycentric2D (const Foam::zero)
 Construct initialized to zero. More...
 
 Barycentric2D (const Cmpt &va, const Cmpt &vb, const Cmpt &vc)
 Construct from components. More...
 
const Cmpt & a () const
 
const Cmpt & b () const
 
const Cmpt & c () const
 
Cmpt & a ()
 
Cmpt & b ()
 
Cmpt & c ()
 
bool outside () const
 True if any coordinates are negative. More...
 
- Public Member Functions inherited from VectorSpace< Barycentric2D< Cmpt >, Cmpt, 3 >
 VectorSpace ()=default
 Default construct. More...
 
 VectorSpace (const Foam::zero)
 Construct initialized to zero. More...
 
 VectorSpace (const VectorSpace< Barycentric2D< 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< Barycentric2D< Cmpt >, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > block () const
 
const Cmpt & operator[] (const direction) const
 
Cmpt & operator[] (const direction)
 
void operator= (const VectorSpace< Barycentric2D< Cmpt >, Cmpt, Ncmpts > &)
 
void operator= (const Foam::zero)
 
void operator+= (const VectorSpace< Barycentric2D< Cmpt >, Cmpt, Ncmpts > &)
 
void operator-= (const VectorSpace< Barycentric2D< 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 = 1
 Rank of Barycentric2D is 1. More...
 
- Static Public Attributes inherited from VectorSpace< Barycentric2D< Cmpt >, Cmpt, 3 >
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 Barycentric2D< Cmpt > zero
 
static const Barycentric2D< Cmpt > one
 
static const Barycentric2D< Cmpt > max
 
static const Barycentric2D< Cmpt > min
 
static const Barycentric2D< Cmpt > rootMax
 
static const Barycentric2D< Cmpt > rootMin
 

Additional Inherited Members

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

Detailed Description

template<class Cmpt>
class Foam::Barycentric2D< Cmpt >

Templated 2D Barycentric derived from VectorSpace. Has 3 components, one of which is redundant.

Source files

Definition at line 54 of file Barycentric2D.H.

Member Typedef Documentation

◆ labelType

typedef Barycentric2D<label> labelType

Equivalent type of labels used for valid component indexing.

Definition at line 63 of file Barycentric2D.H.

Member Enumeration Documentation

◆ components

enum components

Component labeling enumeration.

Enumerator

Definition at line 73 of file Barycentric2D.H.

Constructor & Destructor Documentation

◆ Barycentric2D() [1/3]

Barycentric2D ( )
default

Default construct.

◆ Barycentric2D() [2/3]

Barycentric2D ( const Foam::zero  )
inline

Construct initialized to zero.

Definition at line 32 of file Barycentric2DI.H.

◆ Barycentric2D() [3/3]

Barycentric2D ( const Cmpt &  va,
const Cmpt &  vb,
const Cmpt &  vc 
)
inline

Construct from components.

Definition at line 39 of file Barycentric2DI.H.

References A, and B.

Member Function Documentation

◆ a() [1/2]

const Cmpt & a
inline

Definition at line 55 of file Barycentric2DI.H.

References A.

◆ b() [1/2]

const Cmpt & b
inline

Definition at line 62 of file Barycentric2DI.H.

References B.

◆ c() [1/2]

const Cmpt & c
inline

Definition at line 69 of file Barycentric2DI.H.

◆ a() [2/2]

Cmpt & a
inline

Definition at line 76 of file Barycentric2DI.H.

References A.

◆ b() [2/2]

Cmpt & b
inline

Definition at line 83 of file Barycentric2DI.H.

References B.

◆ c() [2/2]

Cmpt & c
inline

Definition at line 90 of file Barycentric2DI.H.

◆ outside()

bool outside
inline

True if any coordinates are negative.

Definition at line 97 of file Barycentric2DI.H.

References A, and B.

Member Data Documentation

◆ rank

constexpr direction rank = 1
staticconstexpr

Rank of Barycentric2D is 1.

Definition at line 69 of file Barycentric2D.H.


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