IBAMR  IBAMR version 0.19.
Public Types | Public Member Functions | Private Attributes | List of all members
IBTK::LSet< T > Class Template Reference

Class LSet provides inter-processor communications and database access functionality to a collection of Lagrangian objects.

#include <ibtk/LSetDataFactory.h>

Inheritance diagram for IBTK::LSet< T >:
Inheritance graph
[legend]

Public Types

using DataSet = std::vector< SAMRAI::tbox::Pointer< T > >
 The container class. More...
 
using value_type = typename DataSet::value_type
 The type of object, T, stored in the collection. More...
 
using pointer = typename DataSet::pointer
 Pointer to T. More...
 
using reference = typename DataSet::reference
 Reference to T. More...
 
using const_reference = typename DataSet::const_reference
 Const reference to T. More...
 
using size_type = typename DataSet::size_type
 An unsigned integral type. More...
 
using difference_type = typename DataSet::difference_type
 A signed integral type. More...
 
using iterator = typename DataSet::iterator
 Iterator used to iterate through the set. More...
 
using const_iterator = typename DataSet::const_iterator
 Const iterator used to iterate through the collection. More...
 

Public Member Functions

 LSet ()
 Default constructor. More...
 
 LSet (const LSet &from)
 Copy constructor. More...
 
virtual ~LSet ()
 Destructor. More...
 
LSetoperator= (const LSet &that)
 Assignment operator. More...
 
reference operator[] (size_type n)
 
const_reference operator[] (size_type n) const
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator end () const
 
iterator end ()
 
size_type size () const
 
bool empty () const
 
void push_back (const value_type &value)
 Insert a new element at the end (of the set). More...
 
iterator insert (iterator pos, const typename LSet< T >::value_type &x)
 Inserts x before pos. More...
 
template<class InputIterator >
void insert (iterator pos, InputIterator first, InputIterator last)
 Inserts the range [first,last) before pos. More...
 
void insert (iterator pos, size_type n, const typename LSet< T >::value_type &x)
 Inserts n copies of x before pos. More...
 
const DataSetgetDataSet () const
 Return a const reference to the set of data items. More...
 
DataSetgetDataSet ()
 Return a non-const reference to the set of data items. More...
 
void setDataSet (const DataSet &set)
 Reset the set of data items. More...
 
const SAMRAI::hier::IntVector< NDIM > & getPeriodicOffset () const
 
void setPeriodicOffset (const SAMRAI::hier::IntVector< NDIM > &offset)
 Set the value of the periodic offset. More...
 
void copySourceItem (const SAMRAI::hier::Index< NDIM > &src_index, const SAMRAI::hier::IntVector< NDIM > &src_offset, const LSet &src_item)
 Copy data from the source. More...
 
size_t getDataStreamSize () const
 Return an upper bound on the amount of space required to pack the object to a buffer. More...
 
void packStream (SAMRAI::tbox::AbstractStream &stream)
 Pack data into the output stream. More...
 
void unpackStream (SAMRAI::tbox::AbstractStream &stream, const SAMRAI::hier::IntVector< NDIM > &offset)
 Unpack data from the input stream. More...
 
void putToDatabase (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > database)
 Pack data into a database. More...
 
void getFromDatabase (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > database)
 Unpack data from a database. More...
 
template<class T >
LSet< T >::iterator insert (typename LSet< T >::iterator pos, const typename LSet< T >::value_type &x)
 
template<class InputIterator >
void insert (typename LSet< T >::iterator pos, InputIterator first, InputIterator last)
 
template<class T >
void insert (typename LSet< T >::iterator pos, typename LSet< T >::size_type n, const typename LSet< T >::value_type &x)
 

Private Attributes

LSet< T >::DataSet d_set
 The collection of data items. More...
 
SAMRAI::hier::IntVector< NDIM > d_offset
 The periodic offset. More...
 

Member Typedef Documentation

◆ DataSet

template<class T >
using IBTK::LSet< T >::DataSet = std::vector<SAMRAI::tbox::Pointer<T> >

◆ value_type

template<class T >
using IBTK::LSet< T >::value_type = typename DataSet::value_type

◆ pointer

template<class T >
using IBTK::LSet< T >::pointer = typename DataSet::pointer

◆ reference

template<class T >
using IBTK::LSet< T >::reference = typename DataSet::reference

◆ const_reference

template<class T >
using IBTK::LSet< T >::const_reference = typename DataSet::const_reference

◆ size_type

template<class T >
using IBTK::LSet< T >::size_type = typename DataSet::size_type

◆ difference_type

template<class T >
using IBTK::LSet< T >::difference_type = typename DataSet::difference_type

◆ iterator

template<class T >
using IBTK::LSet< T >::iterator = typename DataSet::iterator

◆ const_iterator

template<class T >
using IBTK::LSet< T >::const_iterator = typename DataSet::const_iterator

Constructor & Destructor Documentation

◆ LSet() [1/2]

template<class T >
IBTK::LSet< T >::LSet
inline

◆ LSet() [2/2]

template<class T >
IBTK::LSet< T >::LSet ( const LSet< T > &  from)
inline
Parameters
fromThe value to copy to this object.

◆ ~LSet()

template<class T >
IBTK::LSet< T >::~LSet
inlinevirtual

Member Function Documentation

◆ operator=()

template<class T >
LSet< T > & IBTK::LSet< T >::operator= ( const LSet< T > &  that)
inline
Parameters
thatThe value to assign to this object.
Returns
A reference to this object.

◆ operator[]() [1/2]

template<class T >
reference IBTK::LSet< T >::operator[] ( size_type  n)
Returns
A reference to the nth element of the set.

◆ operator[]() [2/2]

template<class T >
const_reference IBTK::LSet< T >::operator[] ( size_type  n) const
Returns
A const reference to the nth element of the set.

◆ begin() [1/2]

template<class T >
LSet< T >::iterator IBTK::LSet< T >::begin
inline
Returns
A const_iterator pointing to the beginning of the set of indices.

◆ begin() [2/2]

template<class T >
iterator IBTK::LSet< T >::begin ( )
Returns
An iterator pointing to the beginning of the set of indices.

◆ end() [1/2]

template<class T >
LSet< T >::iterator IBTK::LSet< T >::end
inline
Returns
A const_iterator pointing to the end of the set of indices.

◆ end() [2/2]

template<class T >
iterator IBTK::LSet< T >::end ( )
Returns
An iterator pointing to the end of the set of indices.

◆ size()

template<class T >
LSet< T >::size_type IBTK::LSet< T >::size
inline
Returns
The size of the set.

◆ empty()

template<class T >
bool IBTK::LSet< T >::empty
inline
Returns
Whether the set is empty.

◆ push_back()

template<class T >
void IBTK::LSet< T >::push_back ( const value_type value)
inline

◆ insert() [1/6]

template<class T >
iterator IBTK::LSet< T >::insert ( iterator  pos,
const typename LSet< T >::value_type x 
)

◆ insert() [2/6]

template<class T >
template<class InputIterator >
void IBTK::LSet< T >::insert ( iterator  pos,
InputIterator  first,
InputIterator  last 
)

◆ insert() [3/6]

template<class T >
void IBTK::LSet< T >::insert ( iterator  pos,
size_type  n,
const typename LSet< T >::value_type x 
)

◆ getDataSet() [1/2]

template<class T >
LSet< T >::DataSet & IBTK::LSet< T >::getDataSet
inline

◆ getDataSet() [2/2]

template<class T >
DataSet& IBTK::LSet< T >::getDataSet ( )

◆ setDataSet()

template<class T >
void IBTK::LSet< T >::setDataSet ( const DataSet set)
inline

◆ getPeriodicOffset()

template<class T >
const SAMRAI::hier::IntVector< NDIM > & IBTK::LSet< T >::getPeriodicOffset
inline
Returns
A const reference to the periodic offset.
Note
If the LSet lives in cell i, the index of the source object is src_index = i - offset.

◆ setPeriodicOffset()

template<class T >
void IBTK::LSet< T >::setPeriodicOffset ( const SAMRAI::hier::IntVector< NDIM > &  offset)
inline
Note
If the LSet lives in cell i, the index of the source object is src_index = i - offset.

◆ copySourceItem()

template<class T >
void IBTK::LSet< T >::copySourceItem ( const SAMRAI::hier::Index< NDIM > &  src_index,
const SAMRAI::hier::IntVector< NDIM > &  src_offset,
const LSet< T > &  src_item 
)
inline
Note
The index of the destination object is src_index + src_offset.

◆ getDataStreamSize()

template<class T >
size_t IBTK::LSet< T >::getDataStreamSize
inline

◆ packStream()

template<class T >
void IBTK::LSet< T >::packStream ( SAMRAI::tbox::AbstractStream stream)
inline

◆ unpackStream()

template<class T >
void IBTK::LSet< T >::unpackStream ( SAMRAI::tbox::AbstractStream stream,
const SAMRAI::hier::IntVector< NDIM > &  offset 
)
inline

◆ putToDatabase()

template<class T >
void IBTK::LSet< T >::putToDatabase ( SAMRAI::tbox::Pointer< SAMRAI::tbox::Database database)
inline

◆ getFromDatabase()

template<class T >
void IBTK::LSet< T >::getFromDatabase ( SAMRAI::tbox::Pointer< SAMRAI::tbox::Database database)
inline

◆ insert() [4/6]

template<class T >
template<class T >
LSet<T>::iterator IBTK::LSet< T >::insert ( typename LSet< T >::iterator  pos,
const typename LSet< T >::value_type x 
)
inline

◆ insert() [5/6]

template<class T >
template<class InputIterator >
void IBTK::LSet< T >::insert ( typename LSet< T >::iterator  pos,
InputIterator  first,
InputIterator  last 
)
inline

◆ insert() [6/6]

template<class T >
template<class T >
void IBTK::LSet< T >::insert ( typename LSet< T >::iterator  pos,
typename LSet< T >::size_type  n,
const typename LSet< T >::value_type x 
)
inline

Member Data Documentation

◆ d_set

template<class T >
LSet<T>::DataSet IBTK::LSet< T >::d_set
private

◆ d_offset

template<class T >
SAMRAI::hier::IntVector<NDIM> IBTK::LSet< T >::d_offset
private

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