void ggcm_mhd_gkeyll_fluid_species_index_all(struct ggcm_mhd *mhd, int indices[]) { for ( int s = 0; s < ggcm_mhd_gkeyll_nr_fluids(mhd); s++) { indices[s] = ggcm_mhd_gkeyll_fluid_species_index(mhd, s); } }
void ggcm_mhd_gkeyll_set_pressure_ratios(struct ggcm_mhd *mhd, double pressure_ratios_in[]) { for (int s = 0; s < ggcm_mhd_gkeyll_nr_fluids(mhd); s++) mhd->par.pressure_ratios[s] = pressure_ratios_in[s]; }
int ggcm_mhd_gkeyll_fluid_species_index(struct ggcm_mhd *mhd, int species) { // species starts from 0 to nr_fluids-1 assert(species >=0 && species < ggcm_mhd_gkeyll_nr_fluids(mhd)); return ggcm_mhd_gkeyll_nr_moments(mhd) * species; }
void ggcm_mhd_gkeyll_set_momentum_ratios(struct ggcm_mhd *mhd, double momentum_ratios_in[]) { for (int s = 0; s < ggcm_mhd_gkeyll_nr_fluids(mhd); s++) mhd->par.momentum_ratios[s] = momentum_ratios_in[s]; }
int ggcm_mhd_gkeyll_em_fields_index(struct ggcm_mhd *mhd) { return ggcm_mhd_gkeyll_nr_moments(mhd) * ggcm_mhd_gkeyll_nr_fluids(mhd); }