![]() |
GPUE
v1.0
GPU Gross-Pitaevskii Equation numerical solver for Bose-Einstein condensates
|
#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< Vortex > | removeVtx (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< Vortex > | getVtx_Uid (int uid) |
Returns a shared_ptr to the vortex by a UID. More... | |
std::shared_ptr< Vortex > | getVtx_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< Vortex > | getVtxMinDist (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) |
Vortex list for storing and retrieving vortices and associated values
Vtx::VtxList::VtxList | ( | ) |
Vtx::VtxList::VtxList | ( | std::size_t | reserveSize | ) |
Vtx::VtxList::~VtxList | ( | ) |
void Vtx::VtxList::addVtx | ( | std::shared_ptr< Vtx::Vortex > | vtx | ) |
Adds a vortex to the list.
void Vtx::VtxList::addVtx | ( | std::shared_ptr< Vtx::Vortex > | vtx, |
std::size_t | idx | ||
) |
void Vtx::VtxList::arrangeVtx | ( | std::vector< std::shared_ptr< Vortex > > & | vPrev | ) |
Arrange the vortices to have correct UID corresponding across timesteps.
cArray | Vortex |
std::size_t& Vtx::VtxList::getMax_Uid | ( | ) |
Returns the largest UID given.
std::vector< std::shared_ptr<Vortex> >& Vtx::VtxList::getVortices | ( | ) |
Returns a reference to the vortex list.
std::shared_ptr<Vortex> Vtx::VtxList::getVtx_Idx | ( | std::size_t | idx | ) |
Returns a shared_ptr to the vortex by an index in VtxList.
std::shared_ptr<Vortex> Vtx::VtxList::getVtx_Uid | ( | int | uid | ) |
Returns a shared_ptr to the vortex by a UID.
std::size_t Vtx::VtxList::getVtxIdx_Uid | ( | int | uid | ) |
Returns a vortex index based upon a given vortex UID.
Returns index of vortex with shortest coordinate distance from current vortex.
std::pair<double,std::shared_ptr<Vortex> > Vtx::VtxList::minDistPair | ( | std::shared_ptr< Vortex > | vtx, |
double | minRange | ||
) |
std::shared_ptr<Vortex> Vtx::VtxList::removeVtx | ( | std::size_t | idx | ) |
Remove a vortex at position idx.
void Vtx::VtxList::setUIDs | ( | std::set< std::shared_ptr< Vtx::Vortex > > & | v | ) |
void Vtx::VtxList::sortVtxUID | ( | ) |
Sorts the vortices based on UID, from low to high.
cArray | Vortex |
void Vtx::VtxList::swapUid_Idx | ( | std::size_t | idx0, |
std::size_t | idx1 | ||
) |
void Vtx::VtxList::vortOff | ( | ) |
Turns vortex activation off. Useful if vortex no longer exists in condensate.