IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
Public Types | Public Member Functions | 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. More...

#include </home/runner/work/IBAMR/IBAMR/ibtk/include/ibtk/LSet.h>

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

Public Types

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

Public Member Functions

 LSet ()
 Default constructor.
 
 LSet (const LSet &from)
 Copy constructor. More...
 
virtual ~LSet ()
 Destructor.
 
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).
 
iterator insert (iterator pos, const typename LSet< T >::value_type &x)
 Inserts x before pos.
 
template<class InputIterator >
void insert (iterator pos, InputIterator first, InputIterator last)
 Inserts the range [first,last) before pos.
 
void insert (iterator pos, size_type n, const typename LSet< T >::value_type &x)
 Inserts n copies of x before pos.
 
const DataSetgetDataSet () const
 Return a const reference to the set of data items.
 
DataSetgetDataSet ()
 Return a non-const reference to the set of data items.
 
void setDataSet (const DataSet &set)
 Reset the set of data items.
 
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.
 
void packStream (SAMRAI::tbox::AbstractStream &stream)
 Pack data into the output stream.
 
void unpackStream (SAMRAI::tbox::AbstractStream &stream, const SAMRAI::hier::IntVector< NDIM > &offset)
 Unpack data from the input stream.
 
void putToDatabase (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > database)
 Pack data into a database.
 
void getFromDatabase (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > database)
 Unpack data from a database.
 
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)
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ LSet()

template<class T >
IBTK::LSet< T >::LSet ( const LSet< T > &  from)
inline

Copy constructor.

Parameters
fromThe value to copy to this object.

Member Function Documentation

◆ begin() [1/2]

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

◆ begin() [2/2]

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

◆ 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

Copy data from the source.

Note
The index of the destination object is src_index + src_offset.

◆ empty()

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

◆ end() [1/2]

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

◆ end() [2/2]

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

◆ 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.

◆ operator=()

template<class T >
LSet< T > & IBTK::LSet< T >::operator= ( const LSet< T > &  that)
inline

Assignment operator.

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.

◆ setPeriodicOffset()

template<class T >
void IBTK::LSet< T >::setPeriodicOffset ( const SAMRAI::hier::IntVector< NDIM > &  offset)
inline

Set the value of the periodic offset.

Note
If the LSet lives in cell i, the index of the source object is src_index = i - offset.

◆ size()

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

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