KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
List of all members
Kratos::GlobalPointersVector< TDataType > Class Template Referencefinal

This class is a vector which stores global pointers. More...

#include <global_pointers_vector.h>

Collaboration diagram for Kratos::GlobalPointersVector< TDataType >:

Public Member Functions

Life Cycle
 GlobalPointersVector ()
 Default constructor. More...
 
 GlobalPointersVector (const std::initializer_list< GlobalPointer< TDataType >> &l)
 
 ~GlobalPointersVector ()
 Destructor. More...
 
template<class TContainerType >
void FillFromContainer (TContainerType &rContainer)
 Fill the container from another container. More...
 
void Sort ()
 Sort the elements in the container. More...
 
void Unique ()
 Remove duplicate elements from the container. More...
 
void shrink_to_fit ()
 Reduce the capacity of the container to fit its size. More...
 
Operators
GlobalPointersVectoroperator= (const GlobalPointersVector &rOther)
 Assignment operator to copy the contents of another GlobalPointersVector. More...
 
TDataType & operator[] (const size_type &i)
 Access an element in the container by index. More...
 
TDataType const & operator[] (const size_type &i) const
 Access a constant element in the container by index. More...
 
pointeroperator() (const size_type &i)
 Access an element in the container by index. More...
 
const_pointeroperator() (const size_type &i) const
 Access a constant element in the container by index. More...
 
bool operator== (const GlobalPointersVector &r) const
 Equality comparison operator to check if two GlobalPointersVector objects are equal. More...
 
Operations
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
ptr_iterator ptr_begin ()
 
ptr_const_iterator ptr_begin () const
 
ptr_iterator ptr_end ()
 
ptr_const_iterator ptr_end () const
 
ptr_reverse_iterator ptr_rbegin ()
 
ptr_const_reverse_iterator ptr_rbegin () const
 
ptr_reverse_iterator ptr_rend ()
 
ptr_const_reverse_iterator ptr_rend () const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
size_type size () const
 
size_type max_size () const
 
void swap (GlobalPointersVector &rOther)
 
void push_back (TPointerType x)
 
iterator insert (iterator Position, const TPointerType pData)
 
template<class InputIterator >
void insert (InputIterator First, InputIterator Last)
 
iterator erase (iterator pos)
 
iterator erase (iterator first, iterator last)
 
void clear ()
 
void resize (size_type new_dim) const
 
void resize (size_type new_dim)
 
void reserve (int dim)
 
int capacity ()
 
Input and output
std::string Info () const
 Turn back information as a string. More...
 
void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 
Access
TContainerTypeGetContainer ()
 
const TContainerTypeGetContainer () const
 

Type Definitions

using TContainerType = std::vector< GlobalPointer< TDataType > >
 
using TPointerType = GlobalPointer< TDataType >
 
using data_type = TDataType
 
using value_type = TPointerType
 
using pointer = TPointerType
 
using const_pointer = const TPointerType
 
using reference = TDataType &
 
using const_reference = const TDataType &
 
using ContainerType = TContainerType
 
using iterator = boost::indirect_iterator< typename TContainerType::iterator >
 
using const_iterator = boost::indirect_iterator< typename TContainerType::const_iterator >
 
using reverse_iterator = boost::indirect_iterator< typename TContainerType::reverse_iterator >
 
using const_reverse_iterator = boost::indirect_iterator< typename TContainerType::const_reverse_iterator >
 
using size_type = typename TContainerType::size_type
 
using ptr_iterator = typename TContainerType::iterator
 
using ptr_const_iterator = typename TContainerType::const_iterator
 
using ptr_reverse_iterator = typename TContainerType::reverse_iterator
 
using ptr_const_reverse_iterator = typename TContainerType::const_reverse_iterator
 
using difference_type = typename TContainerType::difference_type
 
 KRATOS_CLASS_POINTER_DEFINITION (GlobalPointersVector)
 Pointer definition of GlobalPointersVector. More...
 

Private Operators

class Serializer
 

Detailed Description

template<class TDataType>
class Kratos::GlobalPointersVector< TDataType >

This class is a vector which stores global pointers.

Uses boost::indirect_iterator

Template Parameters
TDataTypeThe type of data stored
Author
Riccardo Rossi

Member Typedef Documentation

◆ const_iterator

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::const_iterator = boost::indirect_iterator<typename TContainerType::const_iterator>

◆ const_pointer

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::const_pointer = const TPointerType

◆ const_reference

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::const_reference = const TDataType&

◆ const_reverse_iterator

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::const_reverse_iterator = boost::indirect_iterator<typename TContainerType::const_reverse_iterator>

◆ ContainerType

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::ContainerType = TContainerType

◆ data_type

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::data_type = TDataType

◆ difference_type

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::difference_type = typename TContainerType::difference_type

◆ iterator

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::iterator = boost::indirect_iterator<typename TContainerType::iterator>

◆ pointer

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::pointer = TPointerType

◆ ptr_const_iterator

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::ptr_const_iterator = typename TContainerType::const_iterator

◆ ptr_const_reverse_iterator

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::ptr_const_reverse_iterator = typename TContainerType::const_reverse_iterator

◆ ptr_iterator

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::ptr_iterator = typename TContainerType::iterator

◆ ptr_reverse_iterator

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::ptr_reverse_iterator = typename TContainerType::reverse_iterator

◆ reference

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::reference = TDataType&

◆ reverse_iterator

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::reverse_iterator = boost::indirect_iterator<typename TContainerType::reverse_iterator>

◆ size_type

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::size_type = typename TContainerType::size_type

◆ TContainerType

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::TContainerType = std::vector<GlobalPointer<TDataType> >

◆ TPointerType

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::TPointerType = GlobalPointer<TDataType>

◆ value_type

template<class TDataType >
using Kratos::GlobalPointersVector< TDataType >::value_type = TPointerType

Constructor & Destructor Documentation

◆ GlobalPointersVector() [1/2]

template<class TDataType >
Kratos::GlobalPointersVector< TDataType >::GlobalPointersVector ( )
inline

Default constructor.

◆ GlobalPointersVector() [2/2]

template<class TDataType >
Kratos::GlobalPointersVector< TDataType >::GlobalPointersVector ( const std::initializer_list< GlobalPointer< TDataType >> &  l)
inline

◆ ~GlobalPointersVector()

template<class TDataType >
Kratos::GlobalPointersVector< TDataType >::~GlobalPointersVector ( )
inline

Destructor.

Member Function Documentation

◆ back() [1/2]

template<class TDataType >
reference Kratos::GlobalPointersVector< TDataType >::back ( )
inline

◆ back() [2/2]

template<class TDataType >
const_reference Kratos::GlobalPointersVector< TDataType >::back ( ) const
inline

◆ begin() [1/2]

template<class TDataType >
iterator Kratos::GlobalPointersVector< TDataType >::begin ( )
inline

◆ begin() [2/2]

template<class TDataType >
const_iterator Kratos::GlobalPointersVector< TDataType >::begin ( ) const
inline

◆ capacity()

template<class TDataType >
int Kratos::GlobalPointersVector< TDataType >::capacity ( )
inline

◆ clear()

template<class TDataType >
void Kratos::GlobalPointersVector< TDataType >::clear ( )
inline

◆ end() [1/2]

template<class TDataType >
iterator Kratos::GlobalPointersVector< TDataType >::end ( )
inline

◆ end() [2/2]

template<class TDataType >
const_iterator Kratos::GlobalPointersVector< TDataType >::end ( ) const
inline

◆ erase() [1/2]

template<class TDataType >
iterator Kratos::GlobalPointersVector< TDataType >::erase ( iterator  first,
iterator  last 
)
inline

◆ erase() [2/2]

template<class TDataType >
iterator Kratos::GlobalPointersVector< TDataType >::erase ( iterator  pos)
inline

◆ FillFromContainer()

template<class TDataType >
template<class TContainerType >
void Kratos::GlobalPointersVector< TDataType >::FillFromContainer ( TContainerType rContainer)
inline

Fill the container from another container.

Template Parameters
TContainerTypeThe type of the source container.
Parameters
rContainerThe source container.

◆ front() [1/2]

template<class TDataType >
reference Kratos::GlobalPointersVector< TDataType >::front ( )
inline

◆ front() [2/2]

template<class TDataType >
const_reference Kratos::GlobalPointersVector< TDataType >::front ( ) const
inline

◆ GetContainer() [1/2]

template<class TDataType >
TContainerType& Kratos::GlobalPointersVector< TDataType >::GetContainer ( )
inline

Gives a reference to underly normal container.

◆ GetContainer() [2/2]

template<class TDataType >
const TContainerType& Kratos::GlobalPointersVector< TDataType >::GetContainer ( ) const
inline

Gives a constant reference to underly normal container.

◆ Info()

template<class TDataType >
std::string Kratos::GlobalPointersVector< TDataType >::Info ( ) const
inline

Turn back information as a string.

◆ insert() [1/2]

template<class TDataType >
template<class InputIterator >
void Kratos::GlobalPointersVector< TDataType >::insert ( InputIterator  First,
InputIterator  Last 
)
inline

◆ insert() [2/2]

template<class TDataType >
iterator Kratos::GlobalPointersVector< TDataType >::insert ( iterator  Position,
const TPointerType  pData 
)
inline

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<class TDataType >
Kratos::GlobalPointersVector< TDataType >::KRATOS_CLASS_POINTER_DEFINITION ( GlobalPointersVector< TDataType >  )

Pointer definition of GlobalPointersVector.

◆ max_size()

template<class TDataType >
size_type Kratos::GlobalPointersVector< TDataType >::max_size ( ) const
inline

◆ operator()() [1/2]

template<class TDataType >
pointer& Kratos::GlobalPointersVector< TDataType >::operator() ( const size_type i)
inline

Access an element in the container by index.

Parameters
iThe index of the element to access.
Returns
A reference to the element.

◆ operator()() [2/2]

template<class TDataType >
const_pointer& Kratos::GlobalPointersVector< TDataType >::operator() ( const size_type i) const
inline

Access a constant element in the container by index.

Parameters
iThe index of the element to access.
Returns
A constant reference to the element.

◆ operator=()

template<class TDataType >
GlobalPointersVector& Kratos::GlobalPointersVector< TDataType >::operator= ( const GlobalPointersVector< TDataType > &  rOther)
inline

Assignment operator to copy the contents of another GlobalPointersVector.

Parameters
rOtherThe GlobalPointersVector to copy from.
Returns
A reference to the modified GlobalPointersVector.

◆ operator==()

template<class TDataType >
bool Kratos::GlobalPointersVector< TDataType >::operator== ( const GlobalPointersVector< TDataType > &  r) const
inline

Equality comparison operator to check if two GlobalPointersVector objects are equal.

This function checks if the sizes are equal and then compares the elements for equality using the EqualKeyTo() function.

Parameters
rThe GlobalPointersVector to compare with.
Returns
True if the containers are equal, false otherwise.

◆ operator[]() [1/2]

template<class TDataType >
TDataType& Kratos::GlobalPointersVector< TDataType >::operator[] ( const size_type i)
inline

Access an element in the container by index.

Parameters
iThe index of the element to access.
Returns
A reference to the element.

◆ operator[]() [2/2]

template<class TDataType >
TDataType const& Kratos::GlobalPointersVector< TDataType >::operator[] ( const size_type i) const
inline

Access a constant element in the container by index.

Parameters
iThe index of the element to access.
Returns
A constant reference to the element.

◆ PrintData()

template<class TDataType >
void Kratos::GlobalPointersVector< TDataType >::PrintData ( std::ostream &  rOStream) const
inline

Print object's data.

◆ PrintInfo()

template<class TDataType >
void Kratos::GlobalPointersVector< TDataType >::PrintInfo ( std::ostream &  rOStream) const
inline

Print information about this object.

◆ ptr_begin() [1/2]

template<class TDataType >
ptr_iterator Kratos::GlobalPointersVector< TDataType >::ptr_begin ( )
inline

◆ ptr_begin() [2/2]

template<class TDataType >
ptr_const_iterator Kratos::GlobalPointersVector< TDataType >::ptr_begin ( ) const
inline

◆ ptr_end() [1/2]

template<class TDataType >
ptr_iterator Kratos::GlobalPointersVector< TDataType >::ptr_end ( )
inline

◆ ptr_end() [2/2]

template<class TDataType >
ptr_const_iterator Kratos::GlobalPointersVector< TDataType >::ptr_end ( ) const
inline

◆ ptr_rbegin() [1/2]

template<class TDataType >
ptr_reverse_iterator Kratos::GlobalPointersVector< TDataType >::ptr_rbegin ( )
inline

◆ ptr_rbegin() [2/2]

template<class TDataType >
ptr_const_reverse_iterator Kratos::GlobalPointersVector< TDataType >::ptr_rbegin ( ) const
inline

◆ ptr_rend() [1/2]

template<class TDataType >
ptr_reverse_iterator Kratos::GlobalPointersVector< TDataType >::ptr_rend ( )
inline

◆ ptr_rend() [2/2]

template<class TDataType >
ptr_const_reverse_iterator Kratos::GlobalPointersVector< TDataType >::ptr_rend ( ) const
inline

◆ push_back()

template<class TDataType >
void Kratos::GlobalPointersVector< TDataType >::push_back ( TPointerType  x)
inline

◆ rbegin() [1/2]

template<class TDataType >
reverse_iterator Kratos::GlobalPointersVector< TDataType >::rbegin ( )
inline

◆ rbegin() [2/2]

template<class TDataType >
const_reverse_iterator Kratos::GlobalPointersVector< TDataType >::rbegin ( ) const
inline

◆ rend() [1/2]

template<class TDataType >
reverse_iterator Kratos::GlobalPointersVector< TDataType >::rend ( )
inline

◆ rend() [2/2]

template<class TDataType >
const_reverse_iterator Kratos::GlobalPointersVector< TDataType >::rend ( ) const
inline

◆ reserve()

template<class TDataType >
void Kratos::GlobalPointersVector< TDataType >::reserve ( int  dim)
inline

◆ resize() [1/2]

template<class TDataType >
void Kratos::GlobalPointersVector< TDataType >::resize ( size_type  new_dim)
inline

◆ resize() [2/2]

template<class TDataType >
void Kratos::GlobalPointersVector< TDataType >::resize ( size_type  new_dim) const
inline

◆ shrink_to_fit()

template<class TDataType >
void Kratos::GlobalPointersVector< TDataType >::shrink_to_fit ( )
inline

Reduce the capacity of the container to fit its size.

◆ size()

template<class TDataType >
size_type Kratos::GlobalPointersVector< TDataType >::size ( ) const
inline

◆ Sort()

template<class TDataType >
void Kratos::GlobalPointersVector< TDataType >::Sort ( )
inline

Sort the elements in the container.

◆ swap()

template<class TDataType >
void Kratos::GlobalPointersVector< TDataType >::swap ( GlobalPointersVector< TDataType > &  rOther)
inline

◆ Unique()

template<class TDataType >
void Kratos::GlobalPointersVector< TDataType >::Unique ( )
inline

Remove duplicate elements from the container.

This function first sorts the elements and then removes duplicates.

Friends And Related Function Documentation

◆ Serializer

template<class TDataType >
friend class Serializer
friend

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