Example #1
0
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);
  }
}
Example #2
0
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];
}
Example #3
0
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;
}
Example #4
0
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];
}
Example #5
0
int
ggcm_mhd_gkeyll_em_fields_index(struct ggcm_mhd *mhd)
{
  return ggcm_mhd_gkeyll_nr_moments(mhd) * ggcm_mhd_gkeyll_nr_fluids(mhd);
}