Skip to content

Commit

Permalink
Make percentage computation clearer.
Browse files Browse the repository at this point in the history
  • Loading branch information
bangerth committed May 17, 2022
1 parent 5649d57 commit 44cf89c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/postprocess/visualization/seismic_anomalies.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ namespace aspect

// Compute the percentage deviation from the average
const double Vs_average = (1. - fractional_slice)*padded_Vs_depth_average[idx] + fractional_slice*padded_Vs_depth_average[idx+1];
(*return_value.second)(cell->active_cell_index()) = (Vs - Vs_average)/Vs_average*1e2;
(*return_value.second)(cell->active_cell_index()) = (Vs - Vs_average)/Vs_average * 100 /* per cent */;
}
break;
}
Expand Down Expand Up @@ -236,7 +236,7 @@ namespace aspect
const double adiabatic_Vp = adiabatic_seismic_outputs->vp[0];

// Compute the percentage deviation from the average
(*return_value.second)(cell->active_cell_index()) = (Vp - adiabatic_Vp)/adiabatic_Vp*1e2;
(*return_value.second)(cell->active_cell_index()) = (Vp - adiabatic_Vp)/adiabatic_Vp * 100 /* per cent */;
}
break;
}
Expand Down

0 comments on commit 44cf89c

Please sign in to comment.