GPUE  v1.0
GPU Gross-Pitaevskii Equation numerical solver for Bose-Einstein condensates
Vtx::VtxList Class Reference

#include <vort.h>

Public Member Functions

 VtxList ()
 
 VtxList (std::size_t reserveSize)
 
 ~VtxList ()
 
void addVtx (std::shared_ptr< Vtx::Vortex > vtx)
 Adds a vortex to the list. More...
 
void addVtx (std::shared_ptr< Vtx::Vortex > vtx, std::size_t idx)
 
std::shared_ptr< VortexremoveVtx (std::size_t idx)
 Remove a vortex at position idx. More...
 
std::vector< std::shared_ptr< Vortex > > & getVortices ()
 Returns a reference to the vortex list. More...
 
std::shared_ptr< VortexgetVtx_Uid (int uid)
 Returns a shared_ptr to the vortex by a UID. More...
 
std::shared_ptr< VortexgetVtx_Idx (std::size_t idx)
 Returns a shared_ptr to the vortex by an index in VtxList. More...
 
std::size_t getVtxIdx_Uid (int uid)
 Returns a vortex index based upon a given vortex UID. More...
 
std::size_t & getMax_Uid ()
 Returns the largest UID given. More...
 
std::shared_ptr< VortexgetVtxMinDist (std::shared_ptr< Vortex > vtx)
 Returns index of vortex with shortest coordinate distance from current vortex. More...
 
void swapUid (std::shared_ptr< Vortex > v1, std::shared_ptr< Vortex > v2)
 In-place swap of the UID for the two given vortices. More...
 
void swapUid_Idx (std::size_t idx0, std::size_t idx1)
 In-place swap of the UID for the two given vortices. More...
 
void vortOff ()
 Turns vortex activation off. Useful if vortex no longer exists in condensate. More...
 
void sortVtxUID ()
 Sorts the vortices based on UID, from low to high. More...
 
void arrangeVtx (std::vector< std::shared_ptr< Vortex > > &vPrev)
 Arrange the vortices to have correct UID corresponding across timesteps. More...
 
void setUIDs (std::set< std::shared_ptr< Vtx::Vortex > > &v)
 
std::pair< double, std::shared_ptr< Vortex > > minDistPair (std::shared_ptr< Vortex > vtx, double minRange)
 

Detailed Description

Vortex list for storing and retrieving vortices and associated values

Definition at line 78 of file vort.h.

Constructor & Destructor Documentation

◆ VtxList() [1/2]

Vtx::VtxList::VtxList ( )

◆ VtxList() [2/2]

Vtx::VtxList::VtxList ( std::size_t  reserveSize)

◆ ~VtxList()

Vtx::VtxList::~VtxList ( )

Member Function Documentation

◆ addVtx() [1/2]

void Vtx::VtxList::addVtx ( std::shared_ptr< Vtx::Vortex vtx)

Adds a vortex to the list.

Returns
Reference to vortex list

◆ addVtx() [2/2]

void Vtx::VtxList::addVtx ( std::shared_ptr< Vtx::Vortex vtx,
std::size_t  idx 
)

◆ arrangeVtx()

void Vtx::VtxList::arrangeVtx ( std::vector< std::shared_ptr< Vortex > > &  vPrev)

Arrange the vortices to have correct UID corresponding across timesteps.

Parameters
cArrayVortex

◆ getMax_Uid()

std::size_t& Vtx::VtxList::getMax_Uid ( )

Returns the largest UID given.

Returns
unsigned int Largest vortex UID

◆ getVortices()

std::vector< std::shared_ptr<Vortex> >& Vtx::VtxList::getVortices ( )

Returns a reference to the vortex list.

Returns
Reference to vortex list

◆ getVtx_Idx()

std::shared_ptr<Vortex> Vtx::VtxList::getVtx_Idx ( std::size_t  idx)

Returns a shared_ptr to the vortex by an index in VtxList.

Returns
shared_ptr<Vortex> Shared pointer to vortex by index

◆ getVtx_Uid()

std::shared_ptr<Vortex> Vtx::VtxList::getVtx_Uid ( int  uid)

Returns a shared_ptr to the vortex by a UID.

Returns
shared_ptr<Vortex> Shared pointer to vortex by index

◆ getVtxIdx_Uid()

std::size_t Vtx::VtxList::getVtxIdx_Uid ( int  uid)

Returns a vortex index based upon a given vortex UID.

Returns
unsigned int Vortex index for UID

◆ getVtxMinDist()

std::shared_ptr<Vortex> Vtx::VtxList::getVtxMinDist ( std::shared_ptr< Vortex vtx)

Returns index of vortex with shortest coordinate distance from current vortex.

Returns
unsigned int Vortex index for shortest distance

◆ minDistPair()

std::pair<double,std::shared_ptr<Vortex> > Vtx::VtxList::minDistPair ( std::shared_ptr< Vortex vtx,
double  minRange 
)

◆ removeVtx()

std::shared_ptr<Vortex> Vtx::VtxList::removeVtx ( std::size_t  idx)

Remove a vortex at position idx.

Returns
The shared_ptr pointer to the removed vortex

◆ setUIDs()

void Vtx::VtxList::setUIDs ( std::set< std::shared_ptr< Vtx::Vortex > > &  v)

◆ sortVtxUID()

void Vtx::VtxList::sortVtxUID ( )

Sorts the vortices based on UID, from low to high.

Parameters
cArrayVortex

◆ swapUid()

void Vtx::VtxList::swapUid ( std::shared_ptr< Vortex v1,
std::shared_ptr< Vortex v2 
)

In-place swap of the UID for the two given vortices.

Parameters
v1Shared pointer of Vortex v1
v2Shared pointer of Vortex v2

◆ swapUid_Idx()

void Vtx::VtxList::swapUid_Idx ( std::size_t  idx0,
std::size_t  idx1 
)

In-place swap of the UID for the two given vortices.

Parameters
idx0Index pointer of Vortex v0
idx1Index pointer of Vortex v1

◆ vortOff()

void Vtx::VtxList::vortOff ( )

Turns vortex activation off. Useful if vortex no longer exists in condensate.


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