Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
shamrock::scheduler::SchedulerPatchData Class Reference

Class to handle PatchData owned by the node. More...

#include <shamrock/include/shamrock/scheduler/SchedulerPatchData.hpp>

+ Collaboration diagram for shamrock::scheduler::SchedulerPatchData:

Public Member Functions

shamrock::patch::PatchDataLayerLayoutpdl ()
 
std::shared_ptr< shamrock::patch::PatchDataLayerLayoutget_layout_ptr () const
 
bool has_patch (u64 id)
 
PatchDataget_pdat (u64 id)
 
void for_each_patchdata (std::function< void(u64, PatchData &)> &&f)
 
void apply_change_list (const shamrock::scheduler::LoadBalancingChangeList &change_list, SchedulerPatchList &patch_list)
 apply a load balancing change list to shuffle patchdata arround the cluster
 
void split_patchdata (u64 key_orginal, const std::array< shamrock::patch::Patch, 8 > patches)
 split a patchdata into 8 childs according to the 8 patches in arguments
 
void merge_patchdata (u64 new_key, const std::array< u64, 8 > old_keys)
 merge 8 old patchdata into one
 
 SchedulerPatchData (const std::shared_ptr< shamrock::patch::PatchDataLayerLayout > &pdl_ptr, shamrock::patch::PatchCoord< 3 > patch_coord_range)
 

Public Attributes

std::shared_ptr< PatchDataLayerLayoutpdl_ptr
 
shambase::DistributedData< PatchDataowned_data
 map container for patchdata owned by the current node (layout : id_patch,data)
 
shamrock::patch::SimulationBoxInfo sim_box
 simulation box geometry info
 

Detailed Description

Class to handle PatchData owned by the node.

Definition at line 42 of file SchedulerPatchData.hpp.

Constructor & Destructor Documentation

◆ SchedulerPatchData()

shamrock::scheduler::SchedulerPatchData::SchedulerPatchData ( const std::shared_ptr< shamrock::patch::PatchDataLayerLayout > &  pdl_ptr,
shamrock::patch::PatchCoord< 3 >  patch_coord_range 
)
inline

Definition at line 100 of file SchedulerPatchData.hpp.

Member Function Documentation

◆ apply_change_list()

void shamrock::scheduler::SchedulerPatchData::apply_change_list ( const shamrock::scheduler::LoadBalancingChangeList change_list,
SchedulerPatchList patch_list 
)

apply a load balancing change list to shuffle patchdata arround the cluster

Parameters
change_list
patch_list

Definition at line 100 of file SchedulerPatchData.cpp.

+ Here is the call graph for this function:

◆ for_each_patchdata()

void shamrock::scheduler::SchedulerPatchData::for_each_patchdata ( std::function< void(u64, PatchData &)> &&  f)
inline

Definition at line 64 of file SchedulerPatchData.hpp.

◆ get_layout_ptr()

std::shared_ptr< shamrock::patch::PatchDataLayerLayout > shamrock::scheduler::SchedulerPatchData::get_layout_ptr ( ) const
inline

Definition at line 50 of file SchedulerPatchData.hpp.

◆ get_pdat()

PatchData & shamrock::scheduler::SchedulerPatchData::get_pdat ( u64  id)
inline

Definition at line 62 of file SchedulerPatchData.hpp.

◆ has_patch()

bool shamrock::scheduler::SchedulerPatchData::has_patch ( u64  id)
inline

Definition at line 60 of file SchedulerPatchData.hpp.

◆ merge_patchdata()

void shamrock::scheduler::SchedulerPatchData::merge_patchdata ( u64  new_key,
const std::array< u64, 8 >  old_keys 
)

merge 8 old patchdata into one

Parameters
new_keynew key to store the merge data in the map
old_keysold patch ids

Definition at line 360 of file SchedulerPatchData.cpp.

+ Here is the call graph for this function:

◆ pdl()

shamrock::patch::PatchDataLayerLayout & shamrock::scheduler::SchedulerPatchData::pdl ( )
inline

Definition at line 46 of file SchedulerPatchData.hpp.

◆ split_patchdata()

void shamrock::scheduler::SchedulerPatchData::split_patchdata ( u64  key_orginal,
const std::array< shamrock::patch::Patch, 8 >  patches 
)

split a patchdata into 8 childs according to the 8 patches in arguments

Parameters
key_orginalkey of the original patchdata
patchesthe patches

Definition at line 302 of file SchedulerPatchData.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ owned_data

shambase::DistributedData<PatchData> shamrock::scheduler::SchedulerPatchData::owned_data

map container for patchdata owned by the current node (layout : id_patch,data)

Definition at line 58 of file SchedulerPatchData.hpp.

◆ pdl_ptr

std::shared_ptr<PatchDataLayerLayout> shamrock::scheduler::SchedulerPatchData::pdl_ptr

Definition at line 44 of file SchedulerPatchData.hpp.

◆ sim_box

shamrock::patch::SimulationBoxInfo shamrock::scheduler::SchedulerPatchData::sim_box

simulation box geometry info

Definition at line 72 of file SchedulerPatchData.hpp.


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