Reenable error output

This commit is contained in:
Magnus Ulimoen 2021-06-29 19:45:20 +02:00
parent 1c884fe09d
commit 2bad8a1b71
1 changed files with 12 additions and 9 deletions

View File

@ -293,7 +293,7 @@ fn main() {
} = config.into_runtime();
let mut sys = System::new(grids, grid_connections, operators);
match initial_conditions {
match &initial_conditions {
/*
parsing::InitialConditions::File(f) => {
for grid in &sys.grids {
@ -371,23 +371,26 @@ fn main() {
}
output.add_timestep(ntime, &sys.fnow);
/*
if opt.error {
let time = ntime as Float * dt;
let mut e = 0.0;
for ((fmod, grid), op) in sys.fnow.iter().zip(&sys.grids).zip(&sys.operators) {
let mut fvort = fmod.clone();
fvort.vortex(
grid.x(),
grid.y(),
time,
&vortexparams.as_ref().unwrap().clone(),
);
match &initial_conditions {
parsing::InitialConditions::Vortex(vortexparams) => {
fvort.vortex(grid.x(), grid.y(), time, &vortexparams);
}
parsing::InitialConditions::Expressions(expr) => {
let (rho, rhou, rhov, e) = fvort.components_mut();
expr.as_ref()
.evaluate(time, grid.x(), grid.y(), rho, rhou, rhov, e)
}
}
e += fmod.h2_err(&fvort, &**op);
}
outinfo.error = Some(e);
}
*/
if opt.output_json {
println!("{}", json5::to_string(&outinfo).unwrap());