Skip to content
Merged
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
4 changes: 2 additions & 2 deletions hermes-3.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ int Hermes::init(bool restarting) {


// try loading J from the grid, otherwise use the one calculated from the metric coefficients
Field3D Jtmp = 0.0;
Coordinates::FieldMetric Jtmp = 0.0;
if (mesh->get(Jtmp, "J_new")==0){
mesh->communicate(Jtmp);
coord->J = Jtmp;
Expand All @@ -291,7 +291,7 @@ int Hermes::init(bool restarting) {
coord->J_perp = sqrt(coord->g_11 * coord->g_33 - coord->g_13 * coord->g_13);

// try loading g_22 at the lower and upper cell interface from the grid, otherwise caluculate from the mean of the two cellcentered ones
Field3D loadtmp = 0.0;
Coordinates::FieldMetric loadtmp = 0.0;
if (mesh->get(loadtmp, "g_22_cell_ylow")==0) {
coord->g_22_cell_ylow = loadtmp / SQ(rho_s0);
} else {
Expand Down
27 changes: 8 additions & 19 deletions include/amjuel_reaction.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,9 @@ protected:
BoutReal avgNe = 0.0;
BoutReal avgN1 = 0.0;
BoutReal avgTe = 0.0;
if (Ne.isFci()) {
avgNe = (4.0 * Ne[i] + Ne.ydown()[iym] + Ne.yup()[iyp]) / 6.0;
avgN1 = (4.0 * N1[i] + N1.ydown()[iym] + N1.yup()[iyp]) / 6.0;
avgTe = (4.0 * Te[i] + Te.ydown()[iym] + Te.yup()[iyp]) / 6.0;
} else {
avgNe = Ne[i];
avgN1 = N1[i];
avgTe = Te[i];
}

avgNe = Ne[i];
avgN1 = N1[i];
avgTe = Te[i];
reaction_rate[i] = avgNe * avgN1 * evaluate(rate_coefs, avgTe * Tnorm, avgNe * Nnorm) * Nnorm / FreqNorm * rate_multiplier;
}

Expand Down Expand Up @@ -179,15 +172,11 @@ protected:
BoutReal avgNe = 0.0;
BoutReal avgN1 = 0.0;
BoutReal avgTe = 0.0;
if (Ne.isFci()) {
avgNe = (4.0 * Ne[i] + Ne.ydown()[iym] + Ne.yup()[iyp]) / 6.0;
avgN1 = (4.0 * N1[i] + N1.ydown()[iym] + N1.yup()[iyp]) / 6.0;
avgTe = (4.0 * Te[i] + Te.ydown()[iym] + Te.yup()[iyp]) / 6.0;
} else {
avgNe = Ne[i];
avgN1 = N1[i];
avgTe = Te[i];
}

avgNe = Ne[i];
avgN1 = N1[i];
avgTe = Te[i];

energy_loss[i] = avgNe * avgN1 * evaluate(radiation_coefs, avgTe * Tnorm, avgNe * Nnorm) * Nnorm / (Tnorm * FreqNorm) * radiation_multiplier;
}

Expand Down
Loading