Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions moments/zero/sources_explicit.c
Original file line number Diff line number Diff line change
Expand Up @@ -2291,6 +2291,7 @@ explicit_e_field_source_update_euler(const gkyl_moment_em_coupling* mom_em, doub
for (int i = 0; i < nfluids; i++) {
double *f = fluid_s[i];
const double q = mom_em->param[i].charge;
const double m = mom_em->param[i].mass;

double rho = f[0];

Expand All @@ -2305,9 +2306,9 @@ explicit_e_field_source_update_euler(const gkyl_moment_em_coupling* mom_em, doub
double vy = uy / gamma;
double vz = uz / gamma;

e_field_new[0] += dt * (-(1.0 / epsilon0) * q * rho * vx);
e_field_new[1] += dt * (-(1.0 / epsilon0) * q * rho * vy);
e_field_new[2] += dt * (-(1.0 / epsilon0) * q * rho * vz);
e_field_new[0] += dt * (-(1.0 / epsilon0) * (q/m) * rho * vx);
e_field_new[1] += dt * (-(1.0 / epsilon0) * (q/m) * rho * vy);
e_field_new[2] += dt * (-(1.0 / epsilon0) * (q/m) * rho * vz);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion moments/zero/sources_implicit.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ implicit_source_coupling_update(const gkyl_moment_em_coupling* mom_em, double t_
fluid_rhs[i][0] = rho + (0.5 * dt * rho_rhs);
fluid_rhs[i][1] = mom_x + (0.5 * dt * mom_x_rhs);
fluid_rhs[i][2] = mom_y + (0.5 * dt * mom_y_rhs);
fluid_rhs[i][3] = mom_z + (0.5 * dt * mom_x_rhs);
fluid_rhs[i][3] = mom_z + (0.5 * dt * mom_z_rhs);

if (mom_em->param[i].type == GKYL_EQN_EULER) {
double energy = f[4];
Expand Down
Loading