23 template<
class Tvec,
template<
class>
class SPHKernel>
24 void SolverConfig<Tvec, SPHKernel>::set_layout(shamrock::patch::PatchDataLayerLayout &pdl) {
31 if (track_particles_id) {
35 if (has_field_uint()) {
40 if (has_field_alphaAV()) {
44 if (has_field_divv()) {
48 if (has_field_dtdivv()) {
52 if (has_field_curlv()) {
56 if (has_field_soundspeed()) {
64 if (has_field_b_on_rho()) {
71 if (has_field_psi_on_ch()) {
75 if (has_field_div_b()) {
79 if (has_field_curl_b()) {
87 if (dust_config.has_epsilon_field()) {
88 u32 ndust = dust_config.get_dust_nvar();
93 if (dust_config.has_deltav_field()) {
94 u32 ndust = dust_config.get_dust_nvar();
99 if (compute_luminosity) {
103 if (do_MHD_debug()) {
115 if (should_save_dt_to_fields()) {
119 if (dust_config.has_s_j_field()) {
120 u32 ndust = dust_config.get_dust_nvar();
129 template<
class Tvec,
template<
class>
class SPHKernel>
130 void SolverConfig<Tvec, SPHKernel>::set_ghost_layout(
131 shamrock::patch::PatchDataLayerLayout &ghost_layout) {
133 ghost_layout.
add_field<Tscal>(
"hpart", 1);
134 ghost_layout.
add_field<Tscal>(
"uint", 1);
137 if (has_axyz_in_ghost()) {
140 ghost_layout.
add_field<Tscal>(
"omega", 1);
142 if (ghost_has_soundspeed()) {
143 ghost_layout.
add_field<Tscal>(
"soundspeed", 1);
146 if (has_field_b_on_rho()) {
147 ghost_layout.
add_field<Tvec>(
"B/rho", 1);
150 if (has_field_psi_on_ch()) {
151 ghost_layout.
add_field<Tscal>(
"psi/ch", 1);
154 if (has_field_curl_b()) {
155 ghost_layout.
add_field<Tvec>(
"curlB", 1);
158 if (dust_config.has_epsilon_field()) {
159 u32 ndust = dust_config.get_dust_nvar();
160 ghost_layout.
add_field<Tscal>(
"epsilon", ndust);
163 if (dust_config.has_deltav_field()) {
164 u32 ndust = dust_config.get_dust_nvar();
165 ghost_layout.
add_field<Tvec>(
"deltav", ndust);
168 if (dust_config.has_s_j_field()) {
169 u32 ndust = dust_config.get_dust_nvar();
170 ghost_layout.
add_field<Tscal>(
"s_j", ndust);
std::uint32_t u32
32 bit unsigned integer
std::uint64_t u64
64 bit unsigned integer
void add_field(const std::string &field_name, u32 nvar, SourceLocation loc=SourceLocation{})
add a field of type T to the layout
namespace for math utility
namespace for the sph model
The configuration for a sph solver.