FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

BiIndirectList< T > Class Template Reference

Indexes into negList (negative index) or posList (zero or positive index). More...

#include <OpenFOAM/BiIndirectList.H>


Detailed Description

template<class T>
class Foam::BiIndirectList< T >

Indexes into negList (negative index) or posList (zero or positive index).

Source files

Definition at line 50 of file BiIndirectList.H.

Collaboration diagram for BiIndirectList< T >:

List of all members.

Public Member Functions

 BiIndirectList (const UList< T > &posList, const UList< T > &negList, const UList< label > &)
 Construct given the complete lists and the addressing array.
label  size () const
bool  empty () const
const UList< T > &  posList () const
const UList< T > &  negList () const
const List< label > &  addressing () const
List< label > &  addressing ()
List< T >  operator() () const
 Return the addressed elements as a List.
T &  operator[] (const label)
 Return non-const access to an element.
const T &  operator[] (const label) const
 Return const access to an element.
void  operator= (const UList< T > &)
 Assignment from UList of addressed elements.
void  operator= (const T &)
 Assignment of all entries to the given value.

Static Public Member Functions

static label  posIndex (const label)
 Calculate index given whether index is into posList or negList.
static label  negIndex (const label)

Constructor & Destructor Documentation

BiIndirectList ( const UList< T > &   posList,
const UList< T > &   negList,
const UList< label > &   addr  
) [inline]

Construct given the complete lists and the addressing array.

Definition at line 30 of file BiIndirectListI.H.


Member Function Documentation

Foam::label size (  ) const [inline]

Definition at line 45 of file BiIndirectListI.H.

Referenced by List< T >::operator=().

bool empty (  ) const [inline]

Definition at line 52 of file BiIndirectListI.H.

const Foam::UList< T > & posList (  ) const [inline]

Definition at line 59 of file BiIndirectListI.H.

const Foam::UList< T > & negList (  ) const [inline]

Definition at line 66 of file BiIndirectListI.H.

const Foam::List< Foam::label > & addressing (  ) const [inline]

Definition at line 73 of file BiIndirectListI.H.

Foam::List< Foam::label > & addressing (  ) [inline]

Definition at line 81 of file BiIndirectListI.H.

Foam::label posIndex ( const label   i  ) [inline, static]

Calculate index given whether index is into posList or negList.

Definition at line 88 of file BiIndirectListI.H.

Foam::label negIndex ( const label   i  ) [inline, static]

Definition at line 95 of file BiIndirectListI.H.

Foam::List< T > operator() (  ) const [inline]

Return the addressed elements as a List.

Definition at line 104 of file BiIndirectListI.H.

References forAll.

T & operator[] ( const label   i  ) [inline]

Return non-const access to an element.

Definition at line 118 of file BiIndirectListI.H.

const T & operator[] ( const label   i  ) const [inline]

Return const access to an element.

Definition at line 134 of file BiIndirectListI.H.

void operator= ( const UList< T > &   ae  ) [inline]

Assignment from UList of addressed elements.

Definition at line 150 of file BiIndirectListI.H.

References Foam::abort(), Foam::FatalError, FatalErrorIn, forAll, and UList< T >::size().

void operator= ( const T &   t  ) [inline]

Assignment of all entries to the given value.

Definition at line 169 of file BiIndirectListI.H.

References forAll.


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