Public Member Functions | Static Public Attributes | Friends
cell Class Reference

A cell is defined as a list of faces with extra functionality. More...

Inheritance diagram for cell:
Inheritance graph
[legend]
Collaboration diagram for cell:
Collaboration graph
[legend]

Public Member Functions

 cell ()
 Construct null. More...
 
 cell (label)
 Construct given size. More...
 
 cell (const labelUList &)
 Construct from list of labels. More...
 
 cell (const Xfer< labelList > &)
 Construct by transferring the parameter contents. More...
 
 cell (Istream &)
 Construct from Istream. More...
 
label nFaces () const
 Return number of faces. More...
 
labelList labels (const faceUList &) const
 Return labels of cell vertices. More...
 
pointField points (const faceUList &, const pointField &) const
 Return the cell vertices. More...
 
edgeList edges (const faceUList &) const
 Return cell edges. More...
 
label opposingFaceLabel (const label masterFaceLabel, const faceUList &meshFaces) const
 Return index of opposite face. More...
 
oppositeFace opposingFace (const label masterFaceLabel, const faceUList &meshFaces) const
 Return opposite face oriented the same way as the master face. More...
 
point centre (const pointField &, const faceUList &) const
 Returns cell centre. More...
 
scalar mag (const pointField &, const faceUList &) const
 Returns cell volume. More...
 
- Public Member Functions inherited from List
 List ()
 Null constructor. More...
 
 List (const label)
 Construct with given size. More...
 
 List (const label, const T &)
 Construct with given size and value for all elements. More...
 
 List (const List< T > &)
 Copy constructor. More...
 
 List (const Xfer< List< T > > &)
 Construct by transferring the parameter contents. More...
 
 List (List< T > &, bool reUse)
 Construct as copy or re-use as specified. More...
 
 List (const UList< T > &, const labelUList &mapAddressing)
 Construct as subset. More...
 
template<class InputIterator >
 List (InputIterator first, InputIterator last)
 Construct given start and end iterators. More...
 
template<unsigned Size>
 List (const FixedList< T, Size > &)
 Construct as copy of FixedList<T, Size> More...
 
 List (const PtrList< T > &)
 Construct as copy of PtrList<T> More...
 
 List (const SLList< T > &)
 Construct as copy of SLList<T> More...
 
 List (const UIndirectList< T > &)
 Construct as copy of UIndirectList<T> More...
 
 List (const BiIndirectList< T > &)
 Construct as copy of BiIndirectList<T> More...
 
 List (Istream &)
 Construct from Istream. More...
 
autoPtr< List< T > > clone () const
 Clone. More...
 
 ~List ()
 Destructor. More...
 
label size () const
 Return the number of elements in the UList. More...
 
void resize (const label)
 Alias for setSize(const label) More...
 
void resize (const label, const T &)
 Alias for setSize(const label, const T&) More...
 
void setSize (const label)
 Reset size of List. More...
 
void setSize (const label, const T &)
 Reset size of List and value for new elements. More...
 
void clear ()
 Clear the list, i.e. set size to zero. More...
 
void append (const T &)
 Append an element at the end of the list. More...
 
void append (const UList< T > &)
 Append a List at the end of this list. More...
 
void append (const UIndirectList< T > &)
 Append a UIndirectList at the end of this list. More...
 
void transfer (List< T > &)
 Transfer the contents of the argument List into this list. More...
 
template<unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
void transfer (DynamicList< T, SizeInc, SizeMult, SizeDiv > &)
 Transfer the contents of the argument List into this list. More...
 
void transfer (SortableList< T > &)
 Transfer the contents of the argument List into this list. More...
 
Xfer< List< T > > xfer ()
 Transfer contents to the Xfer container. More...
 
TnewElmt (const label)
 Return subscript-checked element of UList. More...
 
void operator= (const UList< T > &)
 Assignment from UList operator. Takes linear time. More...
 
void operator= (const List< T > &)
 Assignment operator. Takes linear time. More...
 
void operator= (const SLList< T > &)
 Assignment from SLList operator. Takes linear time. More...
 
void operator= (const UIndirectList< T > &)
 Assignment from UIndirectList operator. Takes linear time. More...
 
void operator= (const BiIndirectList< T > &)
 Assignment from BiIndirectList operator. Takes linear time. More...
 
void operator= (const T &)
 Assignment of all entries to the given value. More...
 
template<class T >
 List (const label s)
 
template<class T >
 List (const label s, const T &a)
 
template<class T >
 List (const List< T > &a)
 
template<class T >
 List (const Xfer< List< T > > &lst)
 
template<class T >
 List (List< T > &a, bool reUse)
 
template<class T >
 List (const UList< T > &a, const labelUList &map)
 
template<class T >
 List (const PtrList< T > &lst)
 
template<class T >
 List (const SLList< T > &lst)
 
template<class T >
 List (const UIndirectList< T > &lst)
 
template<class T >
 List (const BiIndirectList< T > &lst)
 
template<class T >
void transfer (List< T > &a)
 
template<class T >
void transfer (SortableList< T > &a)
 
template<class T >
 List ()
 
template<class T >
 List (Istream &is)
 

Static Public Attributes

static const char *const typeName = "cell"
 

Friends

bool operator== (const cell &, const cell &)
 
bool operator!= (const cell &, const cell &)
 

Additional Inherited Members

- Public Types inherited from List
typedef SubList< TsubList
 Declare type of subList. More...
 
- Static Public Member Functions inherited from List
static const List< T > & null ()
 Return a null List. More...
 
- Protected Member Functions inherited from List
void size (const label)
 Override size to be inconsistent with allocated storage. More...
 

Detailed Description

A cell is defined as a list of faces with extra functionality.

Source files

Definition at line 56 of file cell.H.

Constructor & Destructor Documentation

◆ cell() [1/5]

cell ( )
inline

Construct null.

Definition at line 31 of file cellI.H.

◆ cell() [2/5]

cell ( label  s)
inlineexplicit

Construct given size.

Definition at line 36 of file cellI.H.

◆ cell() [3/5]

cell ( const labelUList lst)
inlineexplicit

Construct from list of labels.

Definition at line 43 of file cellI.H.

◆ cell() [4/5]

cell ( const Xfer< labelList > &  lst)
inlineexplicit

Construct by transferring the parameter contents.

Definition at line 49 of file cellI.H.

◆ cell() [5/5]

cell ( Istream is)
inline

Construct from Istream.

Definition at line 56 of file cellI.H.

Member Function Documentation

◆ nFaces()

Foam::label nFaces ( ) const
inline

Return number of faces.

Definition at line 65 of file cellI.H.

◆ labels()

Foam::labelList labels ( const faceUList f) const

Return labels of cell vertices.

Definition at line 35 of file cell.C.

References f(), forAll, found, p, and List::size().

Here is the call graph for this function:

◆ points()

Foam::pointField points ( const faceUList f,
const pointField meshPoints 
) const

Return the cell vertices.

Definition at line 102 of file cell.C.

References f(), forAll, p, pointLabels(), and List::size().

Here is the call graph for this function:

◆ edges()

Foam::edgeList edges ( const faceUList f) const

Return cell edges.

Definition at line 120 of file cell.C.

References f(), forAll, and List::setSize().

Referenced by layerAdditionRemoval::changeTopology().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ opposingFaceLabel()

Foam::label opposingFaceLabel ( const label  masterFaceLabel,
const faceUList meshFaces 
) const

Return index of opposite face.

Definition at line 40 of file oppositeCellFace.C.

References Foam::endl(), forAll, Foam::Info, and List::size().

Referenced by singleLayerRegion::initialise(), and regionModel1D::initialise().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ opposingFace()

Foam::oppositeFace opposingFace ( const label  masterFaceLabel,
const faceUList meshFaces 
) const

Return opposite face oriented the same way as the master face.

Definition at line 115 of file oppositeCellFace.C.

References Foam::constant::electromagnetic::e, forAll, and List::size().

Here is the call graph for this function:

◆ centre()

Foam::point centre ( const pointField p,
const faceUList f 
) const

Returns cell centre.

Definition at line 173 of file cell.C.

References f(), forAll, p, and Vector< scalar >::zero.

Here is the call graph for this function:

◆ mag()

Foam::scalar mag ( const pointField p,
const faceUList f 
) const

Returns cell volume.

Definition at line 239 of file cell.C.

References f(), forAll, Foam::mag(), p, and Vector< scalar >::zero.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator==

bool operator== ( const cell ,
const cell  
)
friend

◆ operator!=

bool operator!= ( const cell ,
const cell  
)
friend

Field Documentation

◆ typeName

const char *const typeName = "cell"
static

Definition at line 65 of file cell.H.


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