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.
|
This class is a vector which stores global pointers. More...
#include <global_pointers_vector.h>
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 | |
GlobalPointersVector & | operator= (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... | |
pointer & | operator() (const size_type &i) |
Access an element in the container by index. More... | |
const_pointer & | operator() (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 | |
TContainerType & | GetContainer () |
const TContainerType & | GetContainer () 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 |
This class is a vector which stores global pointers.
Uses boost::indirect_iterator
TDataType | The type of data stored |
using Kratos::GlobalPointersVector< TDataType >::const_iterator = boost::indirect_iterator<typename TContainerType::const_iterator> |
using Kratos::GlobalPointersVector< TDataType >::const_pointer = const TPointerType |
using Kratos::GlobalPointersVector< TDataType >::const_reference = const TDataType& |
using Kratos::GlobalPointersVector< TDataType >::const_reverse_iterator = boost::indirect_iterator<typename TContainerType::const_reverse_iterator> |
using Kratos::GlobalPointersVector< TDataType >::ContainerType = TContainerType |
using Kratos::GlobalPointersVector< TDataType >::data_type = TDataType |
using Kratos::GlobalPointersVector< TDataType >::difference_type = typename TContainerType::difference_type |
using Kratos::GlobalPointersVector< TDataType >::iterator = boost::indirect_iterator<typename TContainerType::iterator> |
using Kratos::GlobalPointersVector< TDataType >::pointer = TPointerType |
using Kratos::GlobalPointersVector< TDataType >::ptr_const_iterator = typename TContainerType::const_iterator |
using Kratos::GlobalPointersVector< TDataType >::ptr_const_reverse_iterator = typename TContainerType::const_reverse_iterator |
using Kratos::GlobalPointersVector< TDataType >::ptr_iterator = typename TContainerType::iterator |
using Kratos::GlobalPointersVector< TDataType >::ptr_reverse_iterator = typename TContainerType::reverse_iterator |
using Kratos::GlobalPointersVector< TDataType >::reference = TDataType& |
using Kratos::GlobalPointersVector< TDataType >::reverse_iterator = boost::indirect_iterator<typename TContainerType::reverse_iterator> |
using Kratos::GlobalPointersVector< TDataType >::size_type = typename TContainerType::size_type |
using Kratos::GlobalPointersVector< TDataType >::TContainerType = std::vector<GlobalPointer<TDataType> > |
using Kratos::GlobalPointersVector< TDataType >::TPointerType = GlobalPointer<TDataType> |
using Kratos::GlobalPointersVector< TDataType >::value_type = TPointerType |
|
inline |
Default constructor.
|
inline |
|
inline |
Destructor.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Fill the container from another container.
TContainerType | The type of the source container. |
rContainer | The source container. |
|
inline |
|
inline |
|
inline |
Gives a reference to underly normal container.
|
inline |
Gives a constant reference to underly normal container.
|
inline |
Turn back information as a string.
|
inline |
|
inline |
Kratos::GlobalPointersVector< TDataType >::KRATOS_CLASS_POINTER_DEFINITION | ( | GlobalPointersVector< TDataType > | ) |
Pointer definition of GlobalPointersVector.
|
inline |
|
inline |
Access an element in the container by index.
i | The index of the element to access. |
|
inline |
Access a constant element in the container by index.
i | The index of the element to access. |
|
inline |
Assignment operator to copy the contents of another GlobalPointersVector.
rOther | The GlobalPointersVector to copy from. |
|
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.
r | The GlobalPointersVector to compare with. |
|
inline |
Access an element in the container by index.
i | The index of the element to access. |
|
inline |
Access a constant element in the container by index.
i | The index of the element to access. |
|
inline |
Print object's data.
|
inline |
Print information about this object.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Reduce the capacity of the container to fit its size.
|
inline |
|
inline |
Sort the elements in the container.
|
inline |
|
inline |
Remove duplicate elements from the container.
This function first sorts the elements and then removes duplicates.
|
friend |