Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
Loading...
Searching...
No Matches
vmesh::VelocityBlockContainer Class Reference

#include <velocity_block_container.h>

Public Member Functions

 VelocityBlockContainer ()
 ~VelocityBlockContainer ()
 VelocityBlockContainer (const VelocityBlockContainer &other)
const VelocityBlockContaineroperator= (const VelocityBlockContainer &other)
ARCH_HOSTDEV vmesh::LocalID capacity () const
ARCH_HOSTDEV size_t capacityInBytes () const
void clear (bool shrink=true)
ARCH_HOSTDEV void move (const vmesh::LocalID source, const vmesh::LocalID target)
ARCH_HOSTDEV RealfgetData ()
ARCH_HOSTDEV const RealfgetData () const
ARCH_HOSTDEV RealfgetData (const vmesh::LocalID blockLID)
ARCH_HOSTDEV const RealfgetData (const vmesh::LocalID blockLID) const
ARCH_HOSTDEV RealgetParameters ()
ARCH_HOSTDEV const RealgetParameters () const
ARCH_HOSTDEV RealgetParameters (const vmesh::LocalID blockLID)
ARCH_HOSTDEV const RealgetParameters (const vmesh::LocalID blockLID) const
ARCH_HOSTDEV void pop ()
ARCH_HOSTDEV vmesh::LocalID push_back ()
ARCH_HOSTDEV vmesh::LocalID push_back_and_zero ()
ARCH_HOSTDEV vmesh::LocalID push_back (const uint32_t N_blocks)
ARCH_HOSTDEV vmesh::LocalID push_back_and_zero (const uint32_t N_blocks)
ARCH_HOSTDEV void resize (const vmesh::LocalID newSize)
ARCH_HOSTDEV bool setNewSize (const vmesh::LocalID newSize)
bool setNewCapacityShrink (const vmesh::LocalID reqCapacity)
ARCH_HOSTDEV vmesh::LocalID size () const
ARCH_HOSTDEV size_t sizeInBytes () const
bool setNewCapacity (const vmesh::LocalID capacity)

Static Public Member Functions

static ARCH_HOSTDEV double getBlockAllocationFactor ()

Private Member Functions

void exitInvalidLocalID (const vmesh::LocalID localID, const std::string &funcName) const
ARCH_DEV void exitInvalidLocalID (const vmesh::LocalID localID) const

Private Attributes

std::vector< Realf, aligned_allocator< Realf, WID3 > > block_data
std::vector< Real, aligned_allocator< Real, BlockParams::N_VELOCITY_BLOCK_PARAMS > > parameters

Detailed Description

Definition at line 59 of file velocity_block_container.h.

Constructor & Destructor Documentation

◆ VelocityBlockContainer() [1/2]

vmesh::VelocityBlockContainer::VelocityBlockContainer ( )
inline

Definition at line 126 of file velocity_block_container.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~VelocityBlockContainer()

vmesh::VelocityBlockContainer::~VelocityBlockContainer ( )
inline

Definition at line 142 of file velocity_block_container.h.

◆ VelocityBlockContainer() [2/2]

vmesh::VelocityBlockContainer::VelocityBlockContainer ( const VelocityBlockContainer & other)
inline

Definition at line 144 of file velocity_block_container.h.

Here is the call graph for this function:

Member Function Documentation

◆ capacity()

ARCH_HOSTDEV vmesh::LocalID vmesh::VelocityBlockContainer::capacity ( ) const
inline

Definition at line 181 of file velocity_block_container.h.

◆ capacityInBytes()

ARCH_HOSTDEV size_t vmesh::VelocityBlockContainer::capacityInBytes ( ) const
inline

Definition at line 199 of file velocity_block_container.h.

◆ clear()

void vmesh::VelocityBlockContainer::clear ( bool shrink = true)
inline

Clears VelocityBlockContainer data and (if shrinking) deallocates all memory reserved for velocity blocks.

Definition at line 219 of file velocity_block_container.h.

◆ exitInvalidLocalID() [1/2]

ARCH_DEV void vmesh::VelocityBlockContainer::exitInvalidLocalID ( const vmesh::LocalID localID) const
inlineprivate

Definition at line 318 of file velocity_block_container.h.

◆ exitInvalidLocalID() [2/2]

void vmesh::VelocityBlockContainer::exitInvalidLocalID ( const vmesh::LocalID localID,
const std::string & funcName ) const
inlineprivate

Definition at line 305 of file velocity_block_container.h.

Here is the caller graph for this function:

◆ getBlockAllocationFactor()

ARCH_HOSTDEV double vmesh::VelocityBlockContainer::getBlockAllocationFactor ( )
inlinestatic

Definition at line 326 of file velocity_block_container.h.

◆ getData() [1/4]

ARCH_HOSTDEV Realf * vmesh::VelocityBlockContainer::getData ( )
inline

Definition at line 330 of file velocity_block_container.h.

Here is the caller graph for this function:

◆ getData() [2/4]

ARCH_HOSTDEV const Realf * vmesh::VelocityBlockContainer::getData ( ) const
inline

Definition at line 334 of file velocity_block_container.h.

◆ getData() [3/4]

ARCH_HOSTDEV Realf * vmesh::VelocityBlockContainer::getData ( const vmesh::LocalID blockLID)
inline

Definition at line 338 of file velocity_block_container.h.

Here is the call graph for this function:

◆ getData() [4/4]

ARCH_HOSTDEV const Realf * vmesh::VelocityBlockContainer::getData ( const vmesh::LocalID blockLID) const
inline

Definition at line 354 of file velocity_block_container.h.

Here is the call graph for this function:

◆ getParameters() [1/4]

ARCH_HOSTDEV Real * vmesh::VelocityBlockContainer::getParameters ( )
inline

Definition at line 370 of file velocity_block_container.h.

Here is the caller graph for this function:

◆ getParameters() [2/4]

ARCH_HOSTDEV const Real * vmesh::VelocityBlockContainer::getParameters ( ) const
inline

Definition at line 374 of file velocity_block_container.h.

◆ getParameters() [3/4]

ARCH_HOSTDEV Real * vmesh::VelocityBlockContainer::getParameters ( const vmesh::LocalID blockLID)
inline

Definition at line 378 of file velocity_block_container.h.

Here is the call graph for this function:

◆ getParameters() [4/4]

ARCH_HOSTDEV const Real * vmesh::VelocityBlockContainer::getParameters ( const vmesh::LocalID blockLID) const
inline

Definition at line 397 of file velocity_block_container.h.

Here is the call graph for this function:

◆ move()

ARCH_HOSTDEV void vmesh::VelocityBlockContainer::move ( const vmesh::LocalID source,
const vmesh::LocalID target )
inline

Definition at line 242 of file velocity_block_container.h.

Here is the call graph for this function:

◆ operator=()

const VelocityBlockContainer & vmesh::VelocityBlockContainer::operator= ( const VelocityBlockContainer & other)
inline

Definition at line 162 of file velocity_block_container.h.

Here is the call graph for this function:

◆ pop()

ARCH_HOSTDEV void vmesh::VelocityBlockContainer::pop ( )
inline

Definition at line 416 of file velocity_block_container.h.

◆ push_back() [1/2]

ARCH_HOSTDEV vmesh::LocalID vmesh::VelocityBlockContainer::push_back ( )
inline

Grows the size of the VBC, does not touch data

Definition at line 440 of file velocity_block_container.h.

Here is the call graph for this function:

◆ push_back() [2/2]

ARCH_HOSTDEV vmesh::LocalID vmesh::VelocityBlockContainer::push_back ( const uint32_t N_blocks)
inline

Grows the size of the VBC, does not touch data

Definition at line 560 of file velocity_block_container.h.

Here is the call graph for this function:

◆ push_back_and_zero() [1/2]

ARCH_HOSTDEV vmesh::LocalID vmesh::VelocityBlockContainer::push_back_and_zero ( )
inline

Grows the size of the VBC, sets data to zero

Definition at line 497 of file velocity_block_container.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ push_back_and_zero() [2/2]

ARCH_HOSTDEV vmesh::LocalID vmesh::VelocityBlockContainer::push_back_and_zero ( const uint32_t N_blocks)
inline

Grows the size of the VBC, sets data to zero

Definition at line 599 of file velocity_block_container.h.

Here is the call graph for this function:

◆ resize()

ARCH_HOSTDEV void vmesh::VelocityBlockContainer::resize ( const vmesh::LocalID newSize)
inline

Definition at line 733 of file velocity_block_container.h.

Here is the call graph for this function:

◆ setNewCapacity()

bool vmesh::VelocityBlockContainer::setNewCapacity ( const vmesh::LocalID capacity)
inline

Definition at line 664 of file velocity_block_container.h.

Here is the caller graph for this function:

◆ setNewCapacityShrink()

bool vmesh::VelocityBlockContainer::setNewCapacityShrink ( const vmesh::LocalID reqCapacity)
inline

Definition at line 696 of file velocity_block_container.h.

Here is the call graph for this function:

◆ setNewSize()

ARCH_HOSTDEV bool vmesh::VelocityBlockContainer::setNewSize ( const vmesh::LocalID newSize)
inline

Definition at line 737 of file velocity_block_container.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ size()

ARCH_HOSTDEV vmesh::LocalID vmesh::VelocityBlockContainer::size ( ) const
inline

Return the number of existing velocity blocks.

Returns
Number of existing velocity blocks.

Definition at line 765 of file velocity_block_container.h.

Here is the caller graph for this function:

◆ sizeInBytes()

ARCH_HOSTDEV size_t vmesh::VelocityBlockContainer::sizeInBytes ( ) const
inline

Definition at line 783 of file velocity_block_container.h.

Member Data Documentation

◆ block_data

std::vector<Realf,aligned_allocator<Realf,WID3> > vmesh::VelocityBlockContainer::block_data
private

Definition at line 121 of file velocity_block_container.h.

◆ parameters

std::vector<Real,aligned_allocator<Real,BlockParams::N_VELOCITY_BLOCK_PARAMS> > vmesh::VelocityBlockContainer::parameters
private

Definition at line 122 of file velocity_block_container.h.


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