Public Types | Public Member Functions | Static Public Member Functions | List of all members
SubField< Type > Class Template Reference

Pre-declare related SubField type. More...

Inheritance diagram for SubField< Type >:
Inheritance graph
[legend]
Collaboration diagram for SubField< Type >:
Collaboration graph
[legend]

Public Types

typedef pTraits< Type >::cmptType cmptType
 Component type. More...
 
- Public Types inherited from UList< Type >
typedef Type value_type
 Type of values the UList contains. More...
 
typedef Type & reference
 Type that can be used for storing into. More...
 
typedef const Type & const_reference
 Type that can be used for storing into. More...
 
typedef label difference_type
 The type that can represent the difference between any two. More...
 
typedef label size_type
 The type that can represent the size of a UList. More...
 
typedef Type * iterator
 Random access iterator for traversing UList. More...
 
typedef const Type * const_iterator
 Random access iterator for traversing UList. More...
 
typedef Type * reverse_iterator
 Reverse iterator for reverse traversal of UList. More...
 
typedef const Type * const_reverse_iterator
 Reverse iterator for reverse traversal of constant UList. More...
 

Public Member Functions

 SubField (const SubList< Type > &)
 Construct from a SubList. More...
 
 SubField (const UList< Type > &)
 Construct from a UList<Type>, using the entire size. More...
 
 SubField (const UList< Type > &list, const label subSize)
 Construct from a UList<Type> with a given size. More...
 
 SubField (const UList< Type > &list, const label subSize, const label startIndex)
 Construct from a UList<Type> with a given size and start index. More...
 
 SubField (const SubField< Type > &)
 Construct as copy. More...
 
tmp< Field< cmptType > > component (const direction) const
 Return a component field of the field. More...
 
tmp< Field< Type > > T () const
 Return the field transpose (only defined for second rank tensors) More...
 
void operator= (const SubField< Type > &)
 Assignment via UList operator. Takes linear time. More...
 
 operator const Field< Type > & () const
 Allow cast to a const Field<Type>&. More...
 
- Public Member Functions inherited from refCount
 refCount ()
 Construct null with zero count. More...
 
int count () const
 Return the reference count. More...
 
bool okToDelete () const
 Return true if the reference count is zero. More...
 
void resetRefCount ()
 Reset the reference count to zero. More...
 
void operator++ ()
 Increment the reference count. More...
 
void operator++ (int)
 Increment the reference count. More...
 
void operator-- ()
 Decrement the reference count. More...
 
void operator-- (int)
 Decrement the reference count. More...
 
- Public Member Functions inherited from SubList< Type >
 SubList (const UList< Type > &list, const label subSize)
 Construct from UList and sub-list size. More...
 
 SubList (const UList< Type > &list, const label subSize, const label startIndex)
 Construct from UList, sub-list size and start index. More...
 
 operator const Foam::List< Type > & () const
 Allow cast to a const List<T>&. More...
 
void operator= (const Type &)
 Assignment of all entries to the given value. More...
 
- Public Member Functions inherited from UList< Type >
 UList ()
 Null constructor. More...
 
 UList (Type *__restrict__ v, label size)
 Construct from components. More...
 
label fcIndex (const label i) const
 Return the forward circular index, i.e. the next index. More...
 
label rcIndex (const label i) const
 Return the reverse circular index, i.e. the previous index. More...
 
std::streamsize byteSize () const
 Return the binary size in number of characters of the UList. More...
 
const Type * cdata () const
 Return a const pointer to the first data element,. More...
 
Type * data ()
 Return a pointer to the first data element,. More...
 
Type & first ()
 Return the first element of the list. More...
 
const Type & first () const
 Return first element of the list. More...
 
Type & last ()
 Return the last element of the list. More...
 
const Type & last () const
 Return the last element of the list. More...
 
void checkStart (const label start) const
 Check start is within valid range (0 ... size-1). More...
 
void checkSize (const label size) const
 Check size is within valid range (0 ... size). More...
 
void checkIndex (const label i) const
 Check index i is within valid range (0 ... size-1). More...
 
void writeEntry (Ostream &) const
 Write the UList as a dictionary entry. More...
 
void writeEntry (const word &keyword, Ostream &) const
 Write the UList as a dictionary entry with keyword. More...
 
void assign (const UList< Type > &)
 Assign elements to those from UList. More...
 
Type & operator[] (const label)
 Return element of UList. More...
 
const Type & operator[] (const label) const
 Return element of constant UList. More...
 
 operator const Foam::List< Type > & () const
 Allow cast to a const List<T>&. More...
 
void operator= (const Type &)
 Assignment of all entries to the given value. More...
 
iterator begin ()
 Return an iterator to begin traversing the UList. More...
 
const_iterator begin () const
 Return const_iterator to begin traversing the constant UList. More...
 
iterator end ()
 Return an iterator to end traversing the UList. More...
 
const_iterator end () const
 Return const_iterator to end traversing the constant UList. More...
 
const_iterator cbegin () const
 Return const_iterator to begin traversing the constant UList. More...
 
const_iterator cend () const
 Return const_iterator to end traversing the constant UList. More...
 
reverse_iterator rbegin ()
 Return reverse_iterator to begin reverse traversing the UList. More...
 
const_reverse_iterator rbegin () const
 Return const_reverse_iterator to begin reverse traversing the UList. More...
 
reverse_iterator rend ()
 Return reverse_iterator to end reverse traversing the UList. More...
 
const_reverse_iterator rend () const
 Return const_reverse_iterator to end reverse traversing the UList. More...
 
const_reverse_iterator crbegin () const
 Return const_reverse_iterator to begin reverse traversing the UList. More...
 
const_reverse_iterator crend () const
 Return const_reverse_iterator to end reverse traversing the UList. More...
 
label size () const
 Return the number of elements in the UList. More...
 
label max_size () const
 Return size of the largest possible UList. More...
 
bool empty () const
 Return true if the UList is empty (ie, size() is zero). More...
 
void swap (UList< Type > &)
 Swap two ULists of the same type in constant time. More...
 
bool operator== (const UList< Type > &) const
 Equality operation on ULists of the same type. More...
 
bool operator!= (const UList< Type > &) const
 The opposite of the equality operation. Takes linear time. More...
 
bool operator< (const UList< Type > &) const
 Compare two ULists lexicographically. Takes linear time. More...
 
bool operator> (const UList< Type > &) const
 Compare two ULists lexicographically. Takes linear time. More...
 
bool operator<= (const UList< Type > &) const
 Return true if !(a > b). Takes linear time. More...
 
bool operator>= (const UList< Type > &) const
 Return true if !(a < b). Takes linear time. More...
 

Static Public Member Functions

static const SubField< Type > & null ()
 Return a null SubField. More...
 
- Static Public Member Functions inherited from SubList< Type >
static const SubList< Type > & null ()
 Return a null SubList. More...
 
- Static Public Member Functions inherited from UList< Type >
static const UList< Type > & null ()
 Return a null UList. More...
 

Detailed Description

template<class Type>
class Foam::SubField< Type >

Pre-declare related SubField type.

SubField is a Field obtained as a section of another Field.

Thus it is itself unallocated so that no storage is allocated or deallocated during its use. To achieve this behaviour, SubField is derived from a SubList rather than a List.

Source files

Definition at line 61 of file Field.H.

Member Typedef Documentation

typedef pTraits<Type>::cmptType cmptType

Component type.

Definition at line 67 of file SubField.H.

Constructor & Destructor Documentation

SubField ( const SubList< Type > &  list)
inline

Construct from a SubList.

Definition at line 30 of file SubFieldI.H.

Referenced by SubField< Type >::SubField().

Here is the caller graph for this function:

SubField ( const UList< Type > &  list)
inlineexplicit

Construct from a UList<Type>, using the entire size.

Definition at line 40 of file SubFieldI.H.

References SubField< Type >::SubField().

Here is the call graph for this function:

SubField ( const UList< Type > &  list,
const label  subSize 
)
inline

Construct from a UList<Type> with a given size.

Definition at line 50 of file SubFieldI.H.

References SubField< Type >::SubField().

Here is the call graph for this function:

SubField ( const UList< Type > &  list,
const label  subSize,
const label  startIndex 
)
inline

Construct from a UList<Type> with a given size and start index.

Definition at line 61 of file SubFieldI.H.

References SubField< Type >::SubField().

Here is the call graph for this function:

SubField ( const SubField< Type > &  sfield)
inline

Construct as copy.

Definition at line 73 of file SubFieldI.H.

Member Function Documentation

const Foam::SubField< Type > & null ( )
inlinestatic

Return a null SubField.

Definition at line 85 of file SubFieldI.H.

References SubField< Type >::component().

Here is the call graph for this function:

Foam::tmp< Foam::Field< typename Foam::SubField< Type >::cmptType > > component ( const direction  d) const
inline

Return a component field of the field.

Definition at line 94 of file SubFieldI.H.

Referenced by SubField< Type >::null().

Here is the caller graph for this function:

Foam::tmp< Foam::Field< Type > > T ( ) const
inline

Return the field transpose (only defined for second rank tensors)

Definition at line 103 of file SubFieldI.H.

void operator= ( const SubField< Type > &  rhs)
inline

Assignment via UList operator. Takes linear time.

Definition at line 112 of file SubFieldI.H.

operator const Field< Type > & ( ) const
inline

Allow cast to a const Field<Type>&.


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