|
Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
|
#include <spatial_cell_cpu.hpp>
Public Member Functions | |
| SpatialCell () | |
| ~SpatialCell () | |
| SpatialCell (const SpatialCell &other) | |
| const SpatialCell & | operator= (const SpatialCell &other) |
| template<int PAD> | |
| void | fetch_data (const vmesh::GlobalID &blockGID, const vmesh::VelocityMesh *vmesh, const Realf *src, Realf *array) |
| template<int PAD> | |
| void | fetch_acc_data (const vmesh::GlobalID &blockGID, const int &dim, vmesh::VelocityMesh *vmesh, const Realf *src, Realf *array, Real cellSizeFractions[2]) |
| vmesh::GlobalID | find_velocity_block (vmesh::GlobalID cellIndices[3], const uint popID) |
| Realf * | get_data (const uint popID) |
| const Realf * | get_data (const uint popID) const |
| Realf * | get_data (const vmesh::LocalID &blockLID, const uint popID) |
| const Realf * | get_data (const vmesh::LocalID &blockLID, const uint popID) const |
| Real * | get_block_parameters (const uint popID) |
| const Real * | get_block_parameters (const uint popID) const |
| Real * | get_block_parameters (const vmesh::LocalID &blockLID, const uint popID) |
| const Real * | get_block_parameters (const vmesh::LocalID &blockLID, const uint popID) const |
| Real * | get_cell_parameters () |
| const Real * | get_cell_parameters () const |
| vmesh::LocalID | get_number_of_velocity_blocks (const uint popID) const |
| vmesh::LocalID | get_number_of_all_velocity_blocks () const |
| int | get_number_of_populations () const |
| void | debug_population_check (const uint popID) const |
| void | debug_population_check (const uint popID, const vmesh::LocalID blockLID) const |
| Population & | get_population (const uint popID) |
| const Population & | get_population (const uint popID) const |
| void | set_population (const Population &pop, cuint popID) |
| void | scale_population (creal factor, cuint popID) |
| void | increment_population (const Population &pop, creal factor, cuint popID) |
| std::vector< Population > & | get_populations () |
| const std::vector< Population > & | get_populations () const |
| const Real & | get_max_r_dt (const uint popID) const |
| const Real & | get_max_v_dt (const uint popID) const |
| const vmesh::LocalID * | get_velocity_grid_length (const uint popID) |
| const Real * | get_velocity_grid_block_size (const uint popID) |
| const Real * | get_velocity_grid_cell_size (const uint popID) |
| void | get_velocity_block_coordinates (const uint popID, const vmesh::GlobalID &globalID, Real *coords) |
| velocity_block_indices_t | get_velocity_block_indices (const uint popID, const vmesh::GlobalID globalID) |
| vmesh::GlobalID | get_velocity_block (const uint popID, vmesh::GlobalID blockIndices[3]) const |
| vmesh::GlobalID | get_velocity_block (const uint popID, const velocity_block_indices_t indices) const |
| vmesh::GlobalID | get_velocity_block (const uint popID, const Real *coords) const |
| vmesh::GlobalID | get_velocity_block (const uint popID, const Real vx, const Real vy, const Real vz) const |
| vmesh::GlobalID | get_velocity_block_child (const uint popID, const vmesh::GlobalID &blockGID, const int &i_cell, const int &j_cell, const int &k_cell) |
| void | get_velocity_block_children_local_ids (const vmesh::GlobalID &blockGID, std::vector< vmesh::LocalID > &childrenLIDs, const uint popID) |
| vmesh::GlobalID | get_velocity_block_parent (const uint popID, const vmesh::GlobalID &blockGID) |
| vmesh::GlobalID | get_velocity_block_global_id (const vmesh::LocalID &blockLID, const uint popID) const |
| vmesh::LocalID | get_velocity_block_local_id (const vmesh::GlobalID &blockGID, const uint popID) const |
| void | get_velocity_block_size (const uint popID, const vmesh::GlobalID block, Real size[3]) |
| Real | get_velocity_block_vx_min (const uint popID, const vmesh::GlobalID block) const |
| Real | get_velocity_block_vx_max (const uint popID, const vmesh::GlobalID block) const |
| Real | get_velocity_block_vy_min (const uint popID, const vmesh::GlobalID block) const |
| Real | get_velocity_block_vy_max (const uint popID, const vmesh::GlobalID block) const |
| Real | get_velocity_block_vz_min (const uint popID, const vmesh::GlobalID block) const |
| Real | get_velocity_block_vz_max (const uint popID, const vmesh::GlobalID block) const |
| size_t | count (const vmesh::GlobalID &block, const uint popID) const |
| void | add_values (const vmesh::GlobalID &targetGID, std::unordered_map< vmesh::GlobalID, Realf[(WID+2) *(WID+2) *(WID+2)]> &sourceData, const uint popID) |
| void | printMeshSizes () |
| bool | add_velocity_block (const vmesh::GlobalID &block, const uint popID) |
| void | adjustSingleCellVelocityBlocks (const uint popID, bool doDeleteEmpty=false) |
| void | adjust_velocity_blocks (const std::vector< SpatialCell * > &spatial_neighbors, const uint popID, bool doDeleteEmptyBlocks=true) |
| template<typename fileReal> | |
| void | add_velocity_blocks (const uint popID, const std::vector< vmesh::GlobalID > &blocks, fileReal *avgBuffer) |
| void | update_velocity_block_content_lists (const uint popID) |
| bool | checkMesh (const uint popID) |
| void | clear (const uint popID, bool shrink=false) |
| void | setNewSizeClear (const uint popID, const vmesh::LocalID &newSize) |
| void | setNewSizeClear (const uint popID) |
| uint64_t | get_cell_memory_capacity () |
| uint64_t | get_cell_memory_size () |
| void | merge_values (const uint popID) |
| void | prepare_to_receive_blocks (const uint popID) |
| bool | shrink_to_fit () |
| size_t | size (const uint popID) const |
| void | remove_velocity_block (const vmesh::GlobalID &block, const uint popID) |
| vmesh::VelocityMesh * | get_velocity_mesh (const size_t &popID) |
| vmesh::VelocityBlockContainer * | get_velocity_blocks (const size_t &popID) |
| const vmesh::VelocityBlockContainer * | get_velocity_blocks (const size_t &popID) const |
| void | set_max_r_dt (const uint popID, const Real &value) |
| void | set_max_v_dt (const uint popID, const Real &value) |
| std::tuple< void *, int, MPI_Datatype > | get_mpi_datatype (const CellID cellID, const int sender_rank, const int receiver_rank, const bool receiving, const int neighborhood) |
| void | set_mpi_transfer_enabled (bool transferEnabled) |
| void | updateSparseMinValue (const uint popID) |
| Real | getVelocityBlockMinValue (const uint popID) const |
| SpatialCell () | |
| ~SpatialCell () | |
| SpatialCell (const SpatialCell &other) | |
| const SpatialCell & | operator= (const SpatialCell &other) |
| void | setReservation (const uint popID, const vmesh::LocalID reservationsize, bool force=false) |
| vmesh::LocalID | getReservation (const uint popID) const |
| void | applyReservation (const uint popID) |
| vmesh::GlobalID | find_velocity_block (vmesh::GlobalID cellIndices[3], const uint popID) |
| Realf * | get_data (const uint popID) |
| const Realf * | get_data (const uint popID) const |
| Realf * | get_data (const vmesh::LocalID &blockLID, const uint popID) |
| const Realf * | get_data (const vmesh::LocalID &blockLID, const uint popID) const |
| Real * | get_block_parameters (const uint popID) |
| const Real * | get_block_parameters (const uint popID) const |
| Real * | get_block_parameters (const vmesh::LocalID &blockLID, const uint popID) |
| const Real * | get_block_parameters (const vmesh::LocalID &blockLID, const uint popID) const |
| Realf * | dev_get_data (const uint popID) |
| const Realf * | dev_get_data (const uint popID) const |
| Real * | dev_get_block_parameters (const uint popID) |
| const Real * | dev_get_block_parameters (const uint popID) const |
| Real * | get_cell_parameters () |
| const Real * | get_cell_parameters () const |
| vmesh::LocalID | get_number_of_velocity_blocks (const uint popID) const |
| vmesh::LocalID | get_number_of_all_velocity_blocks () const |
| int | get_number_of_populations () const |
| void | debug_population_check (const uint popID) const |
| void | debug_population_check (const uint popID, const vmesh::LocalID blockLID) const |
| Population & | get_population (const uint popID) |
| const Population & | get_population (const uint popID) const |
| void | set_population (const Population &pop, cuint popID) |
| void | scale_population (creal factor, cuint popID) |
| void | increment_population (const Population &pop, creal factor, cuint popID) |
| void | increment_mass_loss (cuint popID, Real increment) |
| std::vector< Population > & | get_populations () |
| const std::vector< Population > & | get_populations () const |
| const Real & | get_max_r_dt (const uint popID) const |
| const Real & | get_max_v_dt (const uint popID) const |
| const vmesh::LocalID * | get_velocity_grid_length (const uint popID) |
| const vmesh::GlobalID * | get_velocity_grid (const uint popID) |
| const Real * | get_velocity_grid_block_size (const uint popID) |
| const Real * | get_velocity_grid_cell_size (const uint popID) |
| void | get_velocity_block_coordinates (const uint popID, const vmesh::GlobalID &globalID, Real *coords) |
| velocity_block_indices_t | get_velocity_block_indices (const uint popID, const vmesh::GlobalID globalID) |
| vmesh::GlobalID | get_velocity_block (const uint popID, vmesh::GlobalID blockIndices[3]) const |
| vmesh::GlobalID | get_velocity_block (const uint popID, const velocity_block_indices_t indices) const |
| vmesh::GlobalID | get_velocity_block (const uint popID, const Real *coords) const |
| vmesh::GlobalID | get_velocity_block (const uint popID, const Real vx, const Real vy, const Real vz) const |
| vmesh::GlobalID | get_velocity_block_global_id (const vmesh::LocalID &blockLID, const uint popID) const |
| vmesh::LocalID | get_velocity_block_local_id (const vmesh::GlobalID &blockGID, const uint popID) const |
| void | get_velocity_block_size (const uint popID, const vmesh::GlobalID block, Real size[3]) |
| Real | get_velocity_block_vx_min (const uint popID, const vmesh::GlobalID block) const |
| Real | get_velocity_block_vx_max (const uint popID, const vmesh::GlobalID block) const |
| Real | get_velocity_block_vy_min (const uint popID, const vmesh::GlobalID block) const |
| Real | get_velocity_block_vy_max (const uint popID, const vmesh::GlobalID block) const |
| Real | get_velocity_block_vz_min (const uint popID, const vmesh::GlobalID block) const |
| Real | get_velocity_block_vz_max (const uint popID, const vmesh::GlobalID block) const |
| size_t | count (const vmesh::GlobalID &block, const uint popID) const |
| void | printMeshSizes () |
| void | adjustSingleCellVelocityBlocks (const uint popID, bool doDeleteEmpty=false) |
| bool | add_velocity_block (const vmesh::GlobalID &block, const uint popID) |
| void | adjust_velocity_blocks (const uint popID, bool doDeleteEmptyBlocks=true) |
| vmesh::LocalID | adjust_velocity_blocks_caller (const uint popID) |
| template<typename fileReal> | |
| void | add_velocity_blocks (const uint popID, const std::vector< vmesh::GlobalID > &blocks, fileReal *initBuffer) |
| void | update_velocity_block_content_lists (const uint popID) |
| bool | checkMesh (const uint popID) |
| bool | checkSizes (const uint popID) |
| void | clear (const uint popID, bool shrink=false) |
| void | setNewSizeClear (const uint popID, const vmesh::LocalID &newSize) |
| void | setNewSizeClear (const uint popID) |
| uint64_t | get_cell_memory_capacity () |
| uint64_t | get_cell_memory_size () |
| void | prepare_to_receive_blocks (const uint popID) |
| bool | shrink_to_fit () |
| size_t | size (const uint popID) const |
| void | dev_resize_vmesh (const uint popID, const uint nBlocks) |
| vmesh::VelocityMesh * | get_velocity_mesh (const size_t &popID) |
| vmesh::VelocityBlockContainer * | get_velocity_blocks (const size_t &popID) |
| const vmesh::VelocityBlockContainer * | get_velocity_blocks (const size_t &popID) const |
| void | dev_upload_population (const uint popID) |
| vmesh::VelocityMesh * | dev_get_velocity_mesh (const size_t &popID) |
| vmesh::VelocityBlockContainer * | dev_get_velocity_blocks (const size_t &popID) |
| const vmesh::VelocityBlockContainer * | dev_get_velocity_blocks (const size_t &popID) const |
| void | prefetchDevice () |
| void | prefetchHost () |
| void | set_max_r_dt (const uint popID, const Real &value) |
| void | set_max_v_dt (const uint popID, const Real &value) |
| std::tuple< void *, int, MPI_Datatype > | get_mpi_datatype (const CellID cellID, const int sender_rank, const int receiver_rank, const bool receiving, const int neighborhood) |
| void | set_mpi_transfer_enabled (bool transferEnabled) |
| void | updateSparseMinValue (const uint popID) |
| Real | getVelocityBlockMinValue (const uint popID) const |
Static Public Member Functions | |
| static unsigned int | invalid_block_index () |
| static vmesh::GlobalID | invalid_global_id () |
| static vmesh::LocalID | invalid_local_id () |
| static bool | setCommunicatedSpecies (const uint popID) |
| static uint64_t | get_mpi_transfer_type (void) |
| static void | set_mpi_transfer_type (const uint64_t type, bool atSysBoundaries=false) |
| static void | set_mpi_transfer_direction (const int dimension) |
| static unsigned int | invalid_block_index () |
| static vmesh::GlobalID | invalid_global_id () |
| static vmesh::LocalID | invalid_local_id () |
| static bool | setCommunicatedSpecies (const uint popID) |
| static uint64_t | get_mpi_transfer_type (void) |
| static void | set_mpi_transfer_type (const uint64_t type, bool atSysBoundaries=false) |
| static void | set_mpi_transfer_direction (const int dimension) |
Static Public Attributes | |
| static uint64_t | mpi_transfer_type = 0 |
| static bool | mpiTransferAtSysBoundaries = false |
Private Member Functions | |
| bool | compute_block_has_content (const vmesh::GlobalID &block, const uint popID) const |
Private Attributes | |
| bool | initialized |
| bool | mpiTransferEnabled |
| std::vector< spatial_cell::Population > | populations |
Static Private Attributes | |
| static int | activePopID = 0 |
Definition at line 235 of file spatial_cell_cpu.hpp.
| spatial_cell::SpatialCell::SpatialCell | ( | ) |
Definition at line 41 of file spatial_cell_cpu.cpp.


| spatial_cell::SpatialCell::~SpatialCell | ( | ) |
Definition at line 84 of file spatial_cell_cpu.cpp.
| spatial_cell::SpatialCell::SpatialCell | ( | const SpatialCell & | other | ) |
| spatial_cell::SpatialCell::SpatialCell | ( | ) |
| spatial_cell::SpatialCell::~SpatialCell | ( | ) |
| spatial_cell::SpatialCell::SpatialCell | ( | const SpatialCell & | other | ) |

| void spatial_cell::SpatialCell::add_values | ( | const vmesh::GlobalID & | targetGID, |
| std::unordered_map< vmesh::GlobalID, Realf[(WID+2) *(WID+2) *(WID+2)]> & | sourceData, | ||
| const uint | popID ) |
|
inline |
Adds an empty velocity block into this spatial cell. Returns true if given block was added or already exists. Returns false if given block is invalid or would be outside of the velocity grid.
Definition at line 760 of file spatial_cell_cpu.hpp.


| bool spatial_cell::SpatialCell::add_velocity_block | ( | const vmesh::GlobalID & | block, |
| const uint | popID ) |
| void spatial_cell::SpatialCell::add_velocity_blocks | ( | const uint | popID, |
| const std::vector< vmesh::GlobalID > & | blocks, | ||
| fileReal * | initBuffer ) |
Adds a vector of velocity blocks to the population, sets the parameters, and fills the data with phase-space densities from the provided buffer (which was read from a file). The copy operation is skipped if the avgBuffer is nullptr
Adds a vector of velocity blocks to the population, sets the parameters, and fills the data with phase-space densities from the provided buffer (which was read from a file). This version calls a kernel to perform operations on-device.
Definition at line 785 of file spatial_cell_cpu.hpp.

| void spatial_cell::SpatialCell::add_velocity_blocks | ( | const uint | popID, |
| const std::vector< vmesh::GlobalID > & | blocks, | ||
| fileReal * | initBuffer ) |
| void spatial_cell::SpatialCell::adjust_velocity_blocks | ( | const std::vector< SpatialCell * > & | spatial_neighbors, |
| const uint | popID, | ||
| bool | doDeleteEmptyBlocks = true ) |
Adds "important" and removes "unimportant" velocity blocks to/from this cell.
velocity_block_with_content_list needs to be up to date in local and remote cells. velocity_block_with_no_content_list needs to be up to date in local cells.
update_velocity_block_with_content_lists() should have been called with the current distribution function values, and then the content list transferred.
Removes all velocity blocks from this spatial cell which don't have content and don't have spatial or velocity neighbors with content. Adds neighbors for all velocity blocks which do have content (including spatial neighbors). All cells in spatial_neighbors are assumed to be neighbors of this cell.
This function is thread-safe when called for different cells per thread. We need the block_has_content vector from neighbouring cells, but these are not written to here. We only modify local cell.
Definition at line 179 of file spatial_cell_cpu.cpp.


| void spatial_cell::SpatialCell::adjust_velocity_blocks | ( | const uint | popID, |
| bool | doDeleteEmptyBlocks = true ) |
Adds "important" and removes "unimportant" velocity blocks to/from this cell.
velocity_block_with_content_list needs to be up to date in local and remote cells. velocity_block_with_no_content_list needs to be up to date in local cells.
update_velocity_block_with_content_lists() should have been called with the current distribution function values, and then the contetn list transferred.
Removes all velocity blocks from this spatial cell which don't have content and don't have spatial or velocity neighbors with content. Adds neighbors for all velocity blocks which do have content (including spatial neighbors). All cells in spatial_neighbors are assumed to be neighbors of this cell.
This function is thread-safe when called for different cells per thread. We need the block_has_content vector from neighbouring cells, but these are not written to here. We only modify local cell.
Neighbour inclusion: GPU block adjusment now happens via batch calls. Single-cell block adjustments will not want to account for neighbours, so this code is no longer needed.
Now extract vectors to be used in actual block adjustment. Previous kernels may have added dummy (to be added) entries to velocity_block_with_content_map with LID=vmesh->invalidLocalID() Or non-content blocks which should be retained (with correct LIDs).
Rules used in extracting keys or elements from hashmaps Now these include passing pointers to GPU memory in order to evaluate nBlocksAfterAdjust without going via host. Pointers are copied by value.
Definition at line 437 of file spatial_cell_gpu.cpp.

| vmesh::LocalID spatial_cell::SpatialCell::adjust_velocity_blocks_caller | ( | const uint | popID | ) |
Call GPU kernel with all necessary information for creation and deletion of blocks.
Definition at line 617 of file spatial_cell_gpu.cpp.


| void spatial_cell::SpatialCell::adjustSingleCellVelocityBlocks | ( | const uint | popID, |
| bool | doDeleteEmpty = false ) |
Definition at line 275 of file spatial_cell_cpu.cpp.


| void spatial_cell::SpatialCell::adjustSingleCellVelocityBlocks | ( | const uint | popID, |
| bool | doDeleteEmpty = false ) |
| void spatial_cell::SpatialCell::applyReservation | ( | const uint | popID | ) |
Recapacitates local temporary vectors based on guidance counter
Definition at line 334 of file spatial_cell_gpu.cpp.


|
inline |
Definition at line 687 of file spatial_cell_cpu.hpp.


| bool spatial_cell::SpatialCell::checkMesh | ( | const uint | popID | ) |
|
inline |
|
inline |
Removes all velocity blocks from this spatial cell and frees memory in the cell
Definition at line 695 of file spatial_cell_cpu.hpp.


| void spatial_cell::SpatialCell::clear | ( | const uint | popID, |
| bool | shrink = false ) |
|
private |
Returns true if given velocity block has enough of a distribution function. Returns false if the value of the distribution function is too low in every sense in given block. Also returns false if given block doesn't exist or is an error block.
Definition at line 290 of file spatial_cell_cpu.cpp.


|
inline |
Returns the number of given velocity blocks that exist.
Definition at line 660 of file spatial_cell_cpu.hpp.


| size_t spatial_cell::SpatialCell::count | ( | const vmesh::GlobalID & | block, |
| const uint | popID ) const |
|
inline |
| void spatial_cell::SpatialCell::debug_population_check | ( | const uint | popID | ) | const |
|
inline |
| void spatial_cell::SpatialCell::debug_population_check | ( | const uint | popID, |
| const vmesh::LocalID | blockLID ) const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 1074 of file spatial_cell_gpu.hpp.


|
inline |
|
inline |
Definition at line 1061 of file spatial_cell_gpu.hpp.


|
inline |
Resizes the chosen velocity mesh on-device.
Definition at line 1039 of file spatial_cell_gpu.hpp.


|
inline |
| void spatial_cell::SpatialCell::fetch_acc_data | ( | const vmesh::GlobalID & | blockGID, |
| const int & | dim, | ||
| vmesh::VelocityMesh * | vmesh, | ||
| const Realf * | src, | ||
| Realf * | array, | ||
| Real | cellSizeFractions[2] ) |
| void spatial_cell::SpatialCell::fetch_data | ( | const vmesh::GlobalID & | blockGID, |
| const vmesh::VelocityMesh * | vmesh, | ||
| const Realf * | src, | ||
| Realf * | array ) |
|
inline |
| vmesh::GlobalID spatial_cell::SpatialCell::find_velocity_block | ( | vmesh::GlobalID | cellIndices[3], |
| const uint | popID ) |
|
inline |
Definition at line 448 of file spatial_cell_cpu.hpp.


| Real * spatial_cell::SpatialCell::get_block_parameters | ( | const uint | popID | ) |
|
inline |
| const Real * spatial_cell::SpatialCell::get_block_parameters | ( | const uint | popID | ) | const |
|
inline |
| Real * spatial_cell::SpatialCell::get_block_parameters | ( | const vmesh::LocalID & | blockLID, |
| const uint | popID ) |
|
inline |
| const Real * spatial_cell::SpatialCell::get_block_parameters | ( | const vmesh::LocalID & | blockLID, |
| const uint | popID ) const |
|
inline |
Return the memory consumption in bytes as reported using the size() functions of the containers in spatial cell
Definition at line 737 of file spatial_cell_cpu.hpp.
| uint64_t spatial_cell::SpatialCell::get_cell_memory_capacity | ( | ) |
|
inline |
Return the memory consumption in bytes as reported using the size() functions of the containers in spatial cell
Definition at line 717 of file spatial_cell_cpu.hpp.

| uint64_t spatial_cell::SpatialCell::get_cell_memory_size | ( | ) |
|
inline |
| Real * spatial_cell::SpatialCell::get_cell_parameters | ( | ) |
|
inline |
Definition at line 472 of file spatial_cell_cpu.hpp.
| const Real * spatial_cell::SpatialCell::get_cell_parameters | ( | ) | const |
|
inline |
Definition at line 422 of file spatial_cell_cpu.hpp.


| Realf * spatial_cell::SpatialCell::get_data | ( | const uint | popID | ) |
|
inline |
| const Realf * spatial_cell::SpatialCell::get_data | ( | const uint | popID | ) | const |
|
inline |
| Realf * spatial_cell::SpatialCell::get_data | ( | const vmesh::LocalID & | blockLID, |
| const uint | popID ) |
|
inline |
| const Realf * spatial_cell::SpatialCell::get_data | ( | const vmesh::LocalID & | blockLID, |
| const uint | popID ) const |
| const Real & spatial_cell::SpatialCell::get_max_r_dt | ( | const uint | popID | ) | const |
Get maximum translation timestep for the given species.
| popID | ID of the particle species. |
Definition at line 321 of file spatial_cell_cpu.cpp.


| const Real & spatial_cell::SpatialCell::get_max_r_dt | ( | const uint | popID | ) | const |
| const Real & spatial_cell::SpatialCell::get_max_v_dt | ( | const uint | popID | ) | const |
Get maximum acceleration timestep for the given species.
| popID | ID of the particle species. |
Definition at line 329 of file spatial_cell_cpu.cpp.


| const Real & spatial_cell::SpatialCell::get_max_v_dt | ( | const uint | popID | ) | const |
| std::tuple< void *, int, MPI_Datatype > spatial_cell::SpatialCell::get_mpi_datatype | ( | const CellID | cellID, |
| const int | sender_rank, | ||
| const int | receiver_rank, | ||
| const bool | receiving, | ||
| const int | neighborhood ) |
Get MPI datatype for sending the cell data.
| cellID | Spatial cell (dccrg) ID. |
| sender_rank | Rank of the MPI process sending data from this cell. |
| receiver_rank | Rank of the MPI process receiving data to this cell. |
| receiving | If true, this process is receiving data. |
| neighborhood | Neighborhood ID. |
Get MPI datatype for sending the cell data.
| cellID | Spatial cell (dccrg) ID. |
| sender_rank | Rank of the MPI process sending data from this cell. |
| receiver_rank | Rank of the MPI process receiving data to this cell. |
| receiving | If true, this process is receiving data. |
| neighborhood | Neighborhood ID. |
| popID | ID of the particle species. |
Definition at line 341 of file spatial_cell_cpu.cpp.

| std::tuple< void *, int, MPI_Datatype > spatial_cell::SpatialCell::get_mpi_datatype | ( | const CellID | cellID, |
| const int | sender_rank, | ||
| const int | receiver_rank, | ||
| const bool | receiving, | ||
| const int | neighborhood ) |
|
inlinestatic |
Gets the type of data that will be transferred by mpi_datatype.
Definition at line 870 of file spatial_cell_cpu.hpp.
|
static |
|
inline |
Get the total number of velocity blocks in this cell, summed over all existing particle populations.
Definition at line 484 of file spatial_cell_cpu.hpp.

| vmesh::LocalID spatial_cell::SpatialCell::get_number_of_all_velocity_blocks | ( | ) | const |
|
inline |
Definition at line 491 of file spatial_cell_cpu.hpp.
| int spatial_cell::SpatialCell::get_number_of_populations | ( | ) | const |
|
inline |
Definition at line 476 of file spatial_cell_cpu.hpp.


| vmesh::LocalID spatial_cell::SpatialCell::get_number_of_velocity_blocks | ( | const uint | popID | ) | const |
|
inline |
| Population & spatial_cell::SpatialCell::get_population | ( | const uint | popID | ) |
|
inline |
Definition at line 499 of file spatial_cell_cpu.hpp.
| const Population & spatial_cell::SpatialCell::get_population | ( | const uint | popID | ) | const |
|
inline |
| std::vector< Population > & spatial_cell::SpatialCell::get_populations | ( | ) |
|
inline |
Definition at line 515 of file spatial_cell_cpu.hpp.
| const std::vector< Population > & spatial_cell::SpatialCell::get_populations | ( | ) | const |
|
inline |
Definition at line 564 of file spatial_cell_cpu.hpp.
| vmesh::GlobalID spatial_cell::SpatialCell::get_velocity_block | ( | const uint | popID, |
| const Real * | coords ) const |
|
inline |
Returns the velocity block at given location or error_velocity_block if outside of the velocity grid
Definition at line 559 of file spatial_cell_cpu.hpp.
| vmesh::GlobalID spatial_cell::SpatialCell::get_velocity_block | ( | const uint | popID, |
| const Real | vx, | ||
| const Real | vy, | ||
| const Real | vz ) const |
|
inline |
Returns the velocity block at given indices or error_velocity_block
Definition at line 547 of file spatial_cell_cpu.hpp.
| vmesh::GlobalID spatial_cell::SpatialCell::get_velocity_block | ( | const uint | popID, |
| const velocity_block_indices_t | indices ) const |
|
inline |
| vmesh::GlobalID spatial_cell::SpatialCell::get_velocity_block | ( | const uint | popID, |
| vmesh::GlobalID | blockIndices[3] ) const |
| vmesh::GlobalID spatial_cell::SpatialCell::get_velocity_block_child | ( | const uint | popID, |
| const vmesh::GlobalID & | blockGID, | ||
| const int & | i_cell, | ||
| const int & | j_cell, | ||
| const int & | k_cell ) |
| void spatial_cell::SpatialCell::get_velocity_block_children_local_ids | ( | const vmesh::GlobalID & | blockGID, |
| std::vector< vmesh::LocalID > & | childrenLIDs, | ||
| const uint | popID ) |
|
inline |
| void spatial_cell::SpatialCell::get_velocity_block_coordinates | ( | const uint | popID, |
| const vmesh::GlobalID & | globalID, | ||
| Real * | coords ) |
|
inline |
Definition at line 568 of file spatial_cell_cpu.hpp.


| vmesh::GlobalID spatial_cell::SpatialCell::get_velocity_block_global_id | ( | const vmesh::LocalID & | blockLID, |
| const uint | popID ) const |
|
inline |
Returns the indices of given velocity block
Definition at line 538 of file spatial_cell_cpu.hpp.

| velocity_block_indices_t spatial_cell::SpatialCell::get_velocity_block_indices | ( | const uint | popID, |
| const vmesh::GlobalID | globalID ) |
|
inline |
Definition at line 573 of file spatial_cell_cpu.hpp.


| vmesh::LocalID spatial_cell::SpatialCell::get_velocity_block_local_id | ( | const vmesh::GlobalID & | blockGID, |
| const uint | popID ) const |
| vmesh::GlobalID spatial_cell::SpatialCell::get_velocity_block_parent | ( | const uint | popID, |
| const vmesh::GlobalID & | blockGID ) |

|
inline |
Definition at line 578 of file spatial_cell_cpu.hpp.
| void spatial_cell::SpatialCell::get_velocity_block_size | ( | const uint | popID, |
| const vmesh::GlobalID | block, | ||
| Real | size[3] ) |

|
inline |
Returns the edge where given velocity block ends.
Definition at line 594 of file spatial_cell_cpu.hpp.

| Real spatial_cell::SpatialCell::get_velocity_block_vx_max | ( | const uint | popID, |
| const vmesh::GlobalID | block ) const |
|
inline |
Returns the edge where given velocity block starts.
Definition at line 585 of file spatial_cell_cpu.hpp.
| Real spatial_cell::SpatialCell::get_velocity_block_vx_min | ( | const uint | popID, |
| const vmesh::GlobalID | block ) const |
|
inline |
Returns the edge where given velocity block ends.
Definition at line 615 of file spatial_cell_cpu.hpp.

| Real spatial_cell::SpatialCell::get_velocity_block_vy_max | ( | const uint | popID, |
| const vmesh::GlobalID | block ) const |
|
inline |
Returns the edge where given velocity block starts.
Definition at line 606 of file spatial_cell_cpu.hpp.
| Real spatial_cell::SpatialCell::get_velocity_block_vy_min | ( | const uint | popID, |
| const vmesh::GlobalID | block ) const |
|
inline |
Returns the edge where given velocity block ends.
Definition at line 636 of file spatial_cell_cpu.hpp.

| Real spatial_cell::SpatialCell::get_velocity_block_vz_max | ( | const uint | popID, |
| const vmesh::GlobalID | block ) const |
|
inline |
Returns the edge where given velocity block starts.
Definition at line 627 of file spatial_cell_cpu.hpp.
| Real spatial_cell::SpatialCell::get_velocity_block_vz_min | ( | const uint | popID, |
| const vmesh::GlobalID | block ) const |
|
inline |
| vmesh::VelocityBlockContainer * spatial_cell::SpatialCell::get_velocity_blocks | ( | const size_t & | popID | ) |
|
inline |
| const vmesh::VelocityBlockContainer * spatial_cell::SpatialCell::get_velocity_blocks | ( | const size_t & | popID | ) | const |
|
inline |
|
inline |
| const Real * spatial_cell::SpatialCell::get_velocity_grid_block_size | ( | const uint | popID | ) |
|
inline |
| const Real * spatial_cell::SpatialCell::get_velocity_grid_cell_size | ( | const uint | popID | ) |
|
inline |
| const vmesh::LocalID * spatial_cell::SpatialCell::get_velocity_grid_length | ( | const uint | popID | ) |
|
inline |
Definition at line 673 of file spatial_cell_cpu.hpp.


| vmesh::VelocityMesh * spatial_cell::SpatialCell::get_velocity_mesh | ( | const size_t & | popID | ) |
| vmesh::LocalID spatial_cell::SpatialCell::getReservation | ( | const uint | popID | ) | const |
| Real spatial_cell::SpatialCell::getVelocityBlockMinValue | ( | const uint | popID | ) | const |
Get random number generator data buffer.
| popID | ID of the particle species. |
Definition at line 592 of file spatial_cell_cpu.cpp.

| Real spatial_cell::SpatialCell::getVelocityBlockMinValue | ( | const uint | popID | ) | const |
|
inline |
| void spatial_cell::SpatialCell::increment_population | ( | const Population & | pop, |
| creal | factor, | ||
| cuint | popID ) |
|
inlinestatic |
|
static |
|
inlinestatic |
Definition at line 649 of file spatial_cell_cpu.hpp.


|
static |
|
inlinestatic |
Definition at line 653 of file spatial_cell_cpu.hpp.


|
static |
| void spatial_cell::SpatialCell::merge_values | ( | const uint | popID | ) |
| const SpatialCell & spatial_cell::SpatialCell::operator= | ( | const SpatialCell & | other | ) |
| const SpatialCell & spatial_cell::SpatialCell::operator= | ( | const SpatialCell & | other | ) |

| void spatial_cell::SpatialCell::prefetchDevice | ( | ) |
Definition at line 767 of file spatial_cell_gpu.cpp.
| void spatial_cell::SpatialCell::prefetchHost | ( | ) |
Definition at line 773 of file spatial_cell_gpu.cpp.
| void spatial_cell::SpatialCell::prepare_to_receive_blocks | ( | const uint | popID | ) |
Prepares this spatial cell to receive the velocity grid over MPI. At this stage we have received a new block list over MPI into mpi_velocity_block_list, but the rest of the cell structures have not been adapted to this new list. Here we re-initialize the cell with empty blocks based on the new list.
Prepares this spatial cell to receive the velocity grid over MPI. At this stage we have received a new block list (over MPI or from an initializatiom function), but the rest of the cell structures have not been adapted to this new list. Here we re-initialize the cell with empty blocks based on the new list.
Definition at line 601 of file spatial_cell_cpu.cpp.


| void spatial_cell::SpatialCell::prepare_to_receive_blocks | ( | const uint | popID | ) |
| void spatial_cell::SpatialCell::printMeshSizes | ( | ) |
Definition at line 690 of file spatial_cell_cpu.cpp.
| void spatial_cell::SpatialCell::printMeshSizes | ( | ) |
|
inline |
Removes given block from the velocity grid. Does nothing if given block doesn't exist.
Definition at line 832 of file spatial_cell_cpu.hpp.


| void spatial_cell::SpatialCell::set_max_r_dt | ( | const uint | popID, |
| const Real & | value ) |
Set maximum translation timestep for a particle species. This function is called during Vlasov translation.
| popID | ID of the particle species. |
| value | New maximum timestep. |
Definition at line 636 of file spatial_cell_cpu.cpp.


| void spatial_cell::SpatialCell::set_max_r_dt | ( | const uint | popID, |
| const Real & | value ) |
| void spatial_cell::SpatialCell::set_max_v_dt | ( | const uint | popID, |
| const Real & | value ) |
Set maximum acceleration timestep for a particle species. This function is called during Vlasov acceleration.
| popID | ID of the particle species. |
| value | New maximum timestep. |
Definition at line 645 of file spatial_cell_cpu.cpp.

| void spatial_cell::SpatialCell::set_max_v_dt | ( | const uint | popID, |
| const Real & | value ) |
|
static |
|
static |
|
inline |
Set if this cell is transferred/received using MPI in the next communication phase.
Definition at line 877 of file spatial_cell_cpu.hpp.

| void spatial_cell::SpatialCell::set_mpi_transfer_enabled | ( | bool | transferEnabled | ) |
|
inlinestatic |
Sets the type of data to transfer by mpi_datatype.
Definition at line 862 of file spatial_cell_cpu.hpp.

|
static |
|
inline |
| void spatial_cell::SpatialCell::set_population | ( | const Population & | pop, |
| cuint | popID ) |
|
static |
Set the particle species SpatialCell should use in functions that use the velocity mesh.
| popID | Population ID. |
Definition at line 619 of file spatial_cell_cpu.cpp.


|
static |
|
inline |
Definition at line 709 of file spatial_cell_cpu.hpp.
| void spatial_cell::SpatialCell::setNewSizeClear | ( | const uint | popID | ) |
|
inline |
Ensures the selected population vmesh localToGlobalMap has sufficient capacity and is of correct size. Does not alter its contents. Ensures the selected population vmesh globalToLocalMap has sufficient capacity and is empty. Ensures the selected population VBC has sufficient capacity and is of correct size.
Definition at line 706 of file spatial_cell_cpu.hpp.
| void spatial_cell::SpatialCell::setNewSizeClear | ( | const uint | popID, |
| const vmesh::LocalID & | newSize ) |
| void spatial_cell::SpatialCell::setReservation | ( | const uint | popID, |
| const vmesh::LocalID | reservationsize, | ||
| bool | force = false ) |
Sets a guidance counter so that vmesh adjustment vectors have sufficient size
Definition at line 324 of file spatial_cell_gpu.cpp.

| bool spatial_cell::SpatialCell::shrink_to_fit | ( | ) |
Purges extra capacity from block vectors. It sets size to num_blocks * block_allocation_factor (if capacity greater than this), and also forces capacity to this new smaller value.
Definition at line 654 of file spatial_cell_cpu.cpp.

| bool spatial_cell::SpatialCell::shrink_to_fit | ( | ) |
|
inline |
Returns the number of existing velocity blocks.
Definition at line 668 of file spatial_cell_cpu.hpp.


| size_t spatial_cell::SpatialCell::size | ( | const uint | popID | ) | const |
| void spatial_cell::SpatialCell::update_velocity_block_content_lists | ( | const uint | popID | ) |
Update the two lists containing blocks with content, and blocks without content.
Update the two lists containing blocks with content, and blocks without content. This updates lists for a single cell, unlike the batch operations.
Definition at line 675 of file spatial_cell_cpu.cpp.


| void spatial_cell::SpatialCell::update_velocity_block_content_lists | ( | const uint | popID | ) |
| void spatial_cell::SpatialCell::updateSparseMinValue | ( | const uint | popID | ) |
Updates minValue based on algorithm value from parameters (see parameters.cpp).
| popID | ID of the particle species. |
Definition at line 699 of file spatial_cell_cpu.cpp.


| void spatial_cell::SpatialCell::updateSparseMinValue | ( | const uint | popID | ) |
|
staticprivate |
Definition at line 390 of file spatial_cell_cpu.hpp.
| Real spatial_cell::SpatialCell::density_post_adjust |
Definition at line 706 of file spatial_cell_gpu.hpp.
| Real spatial_cell::SpatialCell::density_pre_adjust |
Definition at line 706 of file spatial_cell_gpu.hpp.
| std::array< Real, bvolderivatives::N_BVOL_DERIVATIVES > spatial_cell::SpatialCell::derivativesBVOL |
Derivatives of BVOL needed by the acceleration. Separate array because it does not need to be communicated.
Definition at line 359 of file spatial_cell_cpu.hpp.
| std::array< Real, vderivatives::N_V_DERIVATIVES > spatial_cell::SpatialCell::derivativesV |
Derivatives of V for vorticity AMR.
Definition at line 358 of file spatial_cell_cpu.hpp.
| split::SplitVector<Hashinator::hash_pair<vmesh::GlobalID,vmesh::LocalID> > * spatial_cell::SpatialCell::dev_list_delete =0 |
Definition at line 700 of file spatial_cell_gpu.hpp.
| split::SplitVector<Hashinator::hash_pair<vmesh::GlobalID,vmesh::LocalID> > * spatial_cell::SpatialCell::dev_list_to_replace =0 |
Definition at line 701 of file spatial_cell_gpu.hpp.
| split::SplitVector<vmesh::GlobalID> * spatial_cell::SpatialCell::dev_list_with_replace_new =0 |
Definition at line 699 of file spatial_cell_gpu.hpp.
| split::SplitVector<Hashinator::hash_pair<vmesh::GlobalID,vmesh::LocalID> > * spatial_cell::SpatialCell::dev_list_with_replace_old =0 |
Definition at line 702 of file spatial_cell_gpu.hpp.
| split::SplitVector<vmesh::GlobalID>* spatial_cell::SpatialCell::dev_velocity_block_with_content_list =0 |
Device pointer to list of existing cells with content.
Definition at line 692 of file spatial_cell_gpu.hpp.
| Hashinator::Hashmap<vmesh::GlobalID,vmesh::LocalID>* spatial_cell::SpatialCell::dev_velocity_block_with_content_map =0 |
Definition at line 696 of file spatial_cell_gpu.hpp.
| Hashinator::Hashmap<vmesh::GlobalID,vmesh::LocalID> * spatial_cell::SpatialCell::dev_velocity_block_with_no_content_map =0 |
Definition at line 696 of file spatial_cell_gpu.hpp.
| std::map< int, std::set< int > > spatial_cell::SpatialCell::face_neighbor_ranks |
Definition at line 369 of file spatial_cell_cpu.hpp.
| Realf* spatial_cell::SpatialCell::gpu_rhoLossAdjust |
Definition at line 705 of file spatial_cell_gpu.hpp.
|
private |
Definition at line 391 of file spatial_cell_cpu.hpp.
| uint64_t spatial_cell::SpatialCell::ioLocalCellId |
Local cell ID used for IO, not needed elsewhere and thus not being kept up-to-date.
Definition at line 364 of file spatial_cell_cpu.hpp.
| uint64_t spatial_cell::SpatialCell::largestvmesh = 0 |
Definition at line 707 of file spatial_cell_gpu.hpp.
| split::SplitVector<Hashinator::hash_pair<vmesh::GlobalID,vmesh::LocalID> >* spatial_cell::SpatialCell::list_delete =0 |
Definition at line 700 of file spatial_cell_gpu.hpp.
| vmesh::LocalID spatial_cell::SpatialCell::list_delete_capacity =0 |
Definition at line 703 of file spatial_cell_gpu.hpp.
| split::SplitVector<Hashinator::hash_pair<vmesh::GlobalID,vmesh::LocalID> >* spatial_cell::SpatialCell::list_to_replace =0 |
Definition at line 701 of file spatial_cell_gpu.hpp.
| vmesh::LocalID spatial_cell::SpatialCell::list_to_replace_capacity =0 |
Definition at line 703 of file spatial_cell_gpu.hpp.
| split::SplitVector<vmesh::GlobalID>* spatial_cell::SpatialCell::list_with_replace_new =0 |
Definition at line 699 of file spatial_cell_gpu.hpp.
| vmesh::LocalID spatial_cell::SpatialCell::list_with_replace_new_capacity =0 |
Definition at line 703 of file spatial_cell_gpu.hpp.
| split::SplitVector<Hashinator::hash_pair<vmesh::GlobalID,vmesh::LocalID> >* spatial_cell::SpatialCell::list_with_replace_old =0 |
Definition at line 702 of file spatial_cell_gpu.hpp.
| vmesh::LocalID spatial_cell::SpatialCell::list_with_replace_old_capacity =0 |
Definition at line 703 of file spatial_cell_gpu.hpp.
|
static |
Which data is transferred by the mpi datatype given by spatial cells.
Definition at line 381 of file spatial_cell_cpu.hpp.
|
static |
Do we only transfer data at boundaries (true), or in the whole system (false).
Definition at line 382 of file spatial_cell_cpu.hpp.
|
private |
Definition at line 392 of file spatial_cell_cpu.hpp.
| std::array< Realf *, MAX_NEIGHBORS_PER_DIM > spatial_cell::SpatialCell::neighbor_block_data |
Pointers for translation operator. We can point to neighbor cell block data. We do not allocate memory for the pointer.
Definition at line 366 of file spatial_cell_cpu.hpp.
| std::array< vmesh::LocalID, MAX_NEIGHBORS_PER_DIM > spatial_cell::SpatialCell::neighbor_number_of_blocks |
Definition at line 368 of file spatial_cell_cpu.hpp.
Definition at line 362 of file spatial_cell_cpu.hpp.
| std::array< Real, CellParams::N_SPATIAL_CELL_PARAMS > spatial_cell::SpatialCell::parameters |
Bulk variables in this spatial cell.
Definition at line 361 of file spatial_cell_cpu.hpp.
|
private |
Particle population variables.
Definition at line 394 of file spatial_cell_cpu.hpp.
| uint spatial_cell::SpatialCell::sysBoundaryFlag |
What type of system boundary does the cell belong to. Enumerated in the sysboundarytype namespace's enum.
Definition at line 370 of file spatial_cell_cpu.hpp.
| uint spatial_cell::SpatialCell::sysBoundaryLayer |
Layers counted from closest systemBoundary. If 0 then it has not been computed. First sysboundary layer is layer 1.
Definition at line 372 of file spatial_cell_cpu.hpp.
| int spatial_cell::SpatialCell::sysBoundaryLayerNew |
Definition at line 374 of file spatial_cell_cpu.hpp.
| vmesh::LocalID spatial_cell::SpatialCell::vbwcl_sizePower |
Definition at line 697 of file spatial_cell_gpu.hpp.
| vmesh::LocalID spatial_cell::SpatialCell::vbwncl_sizePower |
Definition at line 697 of file spatial_cell_gpu.hpp.
| std::vector<vmesh::GlobalID>* spatial_cell::SpatialCell::velocity_block_with_content_list |
needed (by DCCRG?), do not remove. List of existing cells with content, only up-to-date after call to update_has_content().
Definition at line 375 of file spatial_cell_cpu.hpp.
| split::SplitVector<vmesh::GlobalID>* spatial_cell::SpatialCell::velocity_block_with_content_list =0 |
needed (by DCCRG?), do not remove. List of existing cells with content (updated by update_has_content()).
Definition at line 691 of file spatial_cell_gpu.hpp.
| vmesh::LocalID spatial_cell::SpatialCell::velocity_block_with_content_list_capacity =0 |
Capacity of vector. Cached value.
Definition at line 694 of file spatial_cell_gpu.hpp.
| vmesh::LocalID spatial_cell::SpatialCell::velocity_block_with_content_list_size =0 |
Size of vector. Needed for MPI communication of size before actual list transfer.
Definition at line 377 of file spatial_cell_cpu.hpp.
| Hashinator::Hashmap<vmesh::GlobalID,vmesh::LocalID>* spatial_cell::SpatialCell::velocity_block_with_content_map =0 |
Definition at line 695 of file spatial_cell_gpu.hpp.
| std::vector<vmesh::GlobalID>* spatial_cell::SpatialCell::velocity_block_with_no_content_list |
List of existing cells with no content, only up-to-date after call to update_has_content. This is also never transferred over MPI, so is invalid on remote cells.
Definition at line 378 of file spatial_cell_cpu.hpp.
| Hashinator::Hashmap<vmesh::GlobalID,vmesh::LocalID> * spatial_cell::SpatialCell::velocity_block_with_no_content_map =0 |
Definition at line 695 of file spatial_cell_gpu.hpp.