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

Public Member Functions

 SchedulerUtility (PatchScheduler &sched)
 
template<class T , class flt >
void fields_forward_euler (u32 field_idx, u32 derfield_idx, flt dt)
 
template<class T , class flt >
void fields_leapfrog_corrector (u32 field_idx, u32 derfield_idx, u32 derfield_old_idx, flt hdt)
 
template<class T , class flt >
void fields_leapfrog_corrector (u32 field_idx, u32 derfield_idx, ComputeField< T > &derfield_old, ComputeField< flt > &field_epsilon, flt hdt)
 
template<class T >
void fields_apply_periodicity (u32 field_idx, std::pair< T, T > box)
 
template<class T >
void fields_apply_shearing_periodicity (u32 field_idx, u32 field_velocity, std::pair< T, T > box, i32_3 shear_base, i32_3 shear_dir, shambase::VecComponent< T > shear_value, shambase::VecComponent< T > shear_speed)
 
template<class T >
void fields_swap (u32 field_idx1, u32 field_idx2)
 
template<class T >
compute_rank_max (u32 field_idx)
 
template<class T >
compute_rank_min (u32 field_idx)
 
template<class T >
compute_rank_sum (u32 field_idx)
 
template<class T >
shambase::VecComponent< T > compute_rank_dot_sum (u32 field_idx)
 
template<class T >
ComputeField< T > save_field (u32 field_idx, std::string new_name)
 save a field in patchdata to a compute field
 
template<class T >
ComputeField< T > save_field_custom (std::string new_name, std::function< PatchDataField< T > &(u64)> field_getter)
 
template<class T >
ComputeField< T > make_compute_field (std::string new_name, u32 nvar)
 create a compute field and init it to zeros
 
template<class T >
ComputeField< T > make_compute_field (std::string new_name, u32 nvar, std::function< u32(u64)> size_getter)
 create a compute field and init it to zeros, and specify size for each cases
 
template<class T >
ComputeField< T > make_compute_field (std::string new_name, u32 nvar, T value_init)
 create a compute field and init it to the set value
 

Detailed Description

Definition at line 28 of file SchedulerUtility.hpp.

Constructor & Destructor Documentation

◆ SchedulerUtility()

shamrock::SchedulerUtility::SchedulerUtility ( PatchScheduler sched)
inline

Definition at line 32 of file SchedulerUtility.hpp.

Member Function Documentation

◆ compute_rank_dot_sum()

template<class T >
shambase::VecComponent< T > shamrock::SchedulerUtility::compute_rank_dot_sum ( u32  field_idx)
inline

Definition at line 174 of file SchedulerUtility.hpp.

◆ compute_rank_max()

template<class T >
T shamrock::SchedulerUtility::compute_rank_max ( u32  field_idx)
inline

Definition at line 138 of file SchedulerUtility.hpp.

◆ compute_rank_min()

template<class T >
T shamrock::SchedulerUtility::compute_rank_min ( u32  field_idx)
inline

Definition at line 150 of file SchedulerUtility.hpp.

◆ compute_rank_sum()

template<class T >
T shamrock::SchedulerUtility::compute_rank_sum ( u32  field_idx)
inline

Definition at line 162 of file SchedulerUtility.hpp.

◆ fields_apply_periodicity()

template<class T >
void shamrock::SchedulerUtility::fields_apply_periodicity ( u32  field_idx,
std::pair< T, T >  box 
)
inline

Definition at line 86 of file SchedulerUtility.hpp.

◆ fields_apply_shearing_periodicity()

template<class T >
void shamrock::SchedulerUtility::fields_apply_shearing_periodicity ( u32  field_idx,
u32  field_velocity,
std::pair< T, T >  box,
i32_3  shear_base,
i32_3  shear_dir,
shambase::VecComponent< T >  shear_value,
shambase::VecComponent< T >  shear_speed 
)
inline

Definition at line 99 of file SchedulerUtility.hpp.

◆ fields_forward_euler()

template<class T , class flt >
void shamrock::SchedulerUtility::fields_forward_euler ( u32  field_idx,
u32  derfield_idx,
flt  dt 
)
inline

Definition at line 35 of file SchedulerUtility.hpp.

◆ fields_leapfrog_corrector() [1/2]

template<class T , class flt >
void shamrock::SchedulerUtility::fields_leapfrog_corrector ( u32  field_idx,
u32  derfield_idx,
ComputeField< T > &  derfield_old,
ComputeField< flt > &  field_epsilon,
flt  hdt 
)
inline

Definition at line 65 of file SchedulerUtility.hpp.

◆ fields_leapfrog_corrector() [2/2]

template<class T , class flt >
void shamrock::SchedulerUtility::fields_leapfrog_corrector ( u32  field_idx,
u32  derfield_idx,
u32  derfield_old_idx,
flt  hdt 
)
inline

Definition at line 49 of file SchedulerUtility.hpp.

◆ fields_swap()

template<class T >
void shamrock::SchedulerUtility::fields_swap ( u32  field_idx1,
u32  field_idx2 
)
inline

Definition at line 125 of file SchedulerUtility.hpp.

◆ make_compute_field() [1/3]

template<class T >
ComputeField< T > shamrock::SchedulerUtility::make_compute_field ( std::string  new_name,
u32  nvar 
)
inline

create a compute field and init it to zeros

Template Parameters
T
Parameters
new_name
nvar
Returns
ComputeField<T>

Definition at line 227 of file SchedulerUtility.hpp.

+ Here is the call graph for this function:

◆ make_compute_field() [2/3]

template<class T >
ComputeField< T > shamrock::SchedulerUtility::make_compute_field ( std::string  new_name,
u32  nvar,
std::function< u32(u64)>  size_getter 
)
inline

create a compute field and init it to zeros, and specify size for each cases

Template Parameters
T
Parameters
new_name
nvar
Returns
ComputeField<T>

Definition at line 253 of file SchedulerUtility.hpp.

+ Here is the call graph for this function:

◆ make_compute_field() [3/3]

template<class T >
ComputeField< T > shamrock::SchedulerUtility::make_compute_field ( std::string  new_name,
u32  nvar,
value_init 
)
inline

create a compute field and init it to the set value

Template Parameters
T
Parameters
new_name
nvar
value_init
Returns
ComputeField<T>

Definition at line 281 of file SchedulerUtility.hpp.

+ Here is the call graph for this function:

◆ save_field()

template<class T >
ComputeField< T > shamrock::SchedulerUtility::save_field ( u32  field_idx,
std::string  new_name 
)
inline

save a field in patchdata to a compute field

Template Parameters
T
Parameters
field_idx
new_name
Returns
ComputeField<T>

Definition at line 194 of file SchedulerUtility.hpp.

+ Here is the call graph for this function:

◆ save_field_custom()

template<class T >
ComputeField< T > shamrock::SchedulerUtility::save_field_custom ( std::string  new_name,
std::function< PatchDataField< T > &(u64)>  field_getter 
)
inline

Definition at line 206 of file SchedulerUtility.hpp.


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