Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
shamrock::amr::AMRGrid< Tcoord, dim > Class Template Reference

The AMR grid only sees the grid as an integer map. More...

#include <shamrock/include/shamrock/amr/AMRGrid.hpp>

+ Collaboration diagram for shamrock::amr::AMRGrid< Tcoord, dim >:

Public Types

using CellCoord = AMRBlockCoord< Tcoord, dim >
 

Public Member Functions

void check_amr_main_fields ()
 
 AMRGrid (PatchScheduler &scheduler)
 
shambase::DistributedData< OptIndexListgen_refinelists_native (std::function< void(u64, patch::Patch, patch::PatchDataLayer &, sycl::buffer< u32 > &)> fct)
 generate split lists for all patchdata owned by the node
 
template<class UserAcc , class Fct , class... T>
shambase::DistributedData< OptIndexListgen_refine_list (Fct &&lambd, T &&...args)
 
u64 get_process_refine_count (shambase::DistributedData< OptIndexList > &splits)
 
template<class UserAcc , class Fct >
shambase::DistributedData< OptIndexListgen_merge_list (Fct &&lambd)
 
template<class UserAcc , class Fct >
void apply_splits (shambase::DistributedData< OptIndexList > &&splts, Fct &&lambd)
 
template<class UserAcc , class Fct >
void apply_merge (shambase::DistributedData< OptIndexList > &&splts, Fct &&lambd)
 
void make_base_grid (Tcoord bmin, Tcoord cell_size, std::array< u32, dim > cell_count)
 

Public Attributes

PatchSchedulersched
 

Static Public Attributes

static constexpr u32 dimension = dim
 
static constexpr u32 split_count = CellCoord::splts_count
 

Detailed Description

template<class Tcoord, u32 dim>
class shamrock::amr::AMRGrid< Tcoord, dim >

The AMR grid only sees the grid as an integer map.

Template Parameters
Tcoord
dim

Definition at line 44 of file AMRGrid.hpp.

Member Typedef Documentation

◆ CellCoord

template<class Tcoord , u32 dim>
using shamrock::amr::AMRGrid< Tcoord, dim >::CellCoord = AMRBlockCoord<Tcoord, dim>

Definition at line 48 of file AMRGrid.hpp.

Constructor & Destructor Documentation

◆ AMRGrid()

template<class Tcoord , u32 dim>
shamrock::amr::AMRGrid< Tcoord, dim >::AMRGrid ( PatchScheduler scheduler)
inlineexplicit

Definition at line 72 of file AMRGrid.hpp.

Member Function Documentation

◆ apply_merge()

template<class Tcoord , u32 dim>
template<class UserAcc , class Fct >
void shamrock::amr::AMRGrid< Tcoord, dim >::apply_merge ( shambase::DistributedData< OptIndexList > &&  splts,
Fct &&  lambd 
)
inline

Definition at line 359 of file AMRGrid.hpp.

◆ apply_splits()

template<class Tcoord , u32 dim>
template<class UserAcc , class Fct >
void shamrock::amr::AMRGrid< Tcoord, dim >::apply_splits ( shambase::DistributedData< OptIndexList > &&  splts,
Fct &&  lambd 
)
inline
Template Parameters
UserAcc
Fct
Parameters
splts
lambd

Definition at line 274 of file AMRGrid.hpp.

+ Here is the call graph for this function:

◆ check_amr_main_fields()

template<class Tcoord , u32 dim>
void shamrock::amr::AMRGrid< Tcoord, dim >::check_amr_main_fields ( )
inline

Definition at line 52 of file AMRGrid.hpp.

◆ gen_merge_list()

template<class Tcoord , u32 dim>
template<class UserAcc , class Fct >
shambase::DistributedData< OptIndexList > shamrock::amr::AMRGrid< Tcoord, dim >::gen_merge_list ( Fct &&  lambd)
inline

Definition at line 163 of file AMRGrid.hpp.

◆ gen_refine_list()

template<class Tcoord , u32 dim>
template<class UserAcc , class Fct , class... T>
shambase::DistributedData< OptIndexList > shamrock::amr::AMRGrid< Tcoord, dim >::gen_refine_list ( Fct &&  lambd,
T &&...  args 
)
inline

Definition at line 125 of file AMRGrid.hpp.

◆ gen_refinelists_native()

template<class Tcoord , u32 dim>
shambase::DistributedData< OptIndexList > shamrock::amr::AMRGrid< Tcoord, dim >::gen_refinelists_native ( std::function< void(u64, patch::Patch, patch::PatchDataLayer &, sycl::buffer< u32 > &)>  fct)
inline

generate split lists for all patchdata owned by the node

auto split_lists = grid.gen_splitlists(
[&](u64 id_patch, Patch cur_p, PatchData &pdat) -> sycl::buffer<u32> {
generate the buffer saying which cells should split
}
);
std::uint64_t u64
64 bit unsigned integer
Template Parameters
Fct
Parameters
f
Returns
shambase::DistributedData<SplitList>

Definition at line 88 of file AMRGrid.hpp.

+ Here is the call graph for this function:

◆ get_process_refine_count()

template<class Tcoord , u32 dim>
u64 shamrock::amr::AMRGrid< Tcoord, dim >::get_process_refine_count ( shambase::DistributedData< OptIndexList > &  splits)
inline

Definition at line 152 of file AMRGrid.hpp.

◆ make_base_grid()

template<class Tcoord , u32 dim>
void shamrock::amr::AMRGrid< Tcoord, dim >::make_base_grid ( Tcoord  bmin,
Tcoord  cell_size,
std::array< u32, dim >  cell_count 
)
inline

Definition at line 466 of file AMRGrid.hpp.

Member Data Documentation

◆ dimension

template<class Tcoord , u32 dim>
constexpr u32 shamrock::amr::AMRGrid< Tcoord, dim >::dimension = dim
staticconstexpr

Definition at line 49 of file AMRGrid.hpp.

◆ sched

template<class Tcoord , u32 dim>
PatchScheduler& shamrock::amr::AMRGrid< Tcoord, dim >::sched

Definition at line 46 of file AMRGrid.hpp.

◆ split_count

template<class Tcoord , u32 dim>
constexpr u32 shamrock::amr::AMRGrid< Tcoord, dim >::split_count = CellCoord::splts_count
staticconstexpr

Definition at line 50 of file AMRGrid.hpp.


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