Closed andersonw1 closed 3 months ago
There is a lot of file output that is hard to delete. It would be more convenient to use a subdirectory for file output, as done in examples/dmd/de_dg_advection_greedy.cpp (search for io_dir
).
There is a lot of file output that is hard to delete. It would be more convenient to use a subdirectory for file output, as done in examples/dmd/de_dg_advection_greedy.cpp (search for
io_dir
).
The new commit adds an output directory using the same "io_dir" code as in the other example.
Adds parametric DMDc for heat conduction.
Example changing parameter in state vector: mpirun -np 8 parametric_dmdc_heat_conduction -s 1 -offline --kappa 0.5 -rdim 6 mpirun -np 8 parametric_dmdc_heat_conduction -s 1 -offline --kappa 0.75 -rdim 6 mpirun -np 8 parametric_dmdc_heat_conduction -s 1 -offline --kappa 1.25 -rdim 6 mpirun -np 8 parametric_dmdc_heat_conduction -s 1 -offline --kappa 1.5 -rdim 6
mpirun -np 8 parametric_dmdc_heat_conduction -s 1 --kappa 1 -online -predict -visit
Output: Relative error of DMDc temperature (u) at t_final: 0.5 is 0.0025944158 Elapsed time for solving FOM: 1.006058e+00 second Elapsed time for training DMDc: 7.535820e-01 second Elapsed time for predicting DMDc: 3.593333e-03 second
Example changing parameter in control vector: mpirun -np 8 parametric_dmdc_heat_conduction -s 1 -offline -amp-in 1 -rdim 6 mpirun -np 8 parametric_dmdc_heat_conduction -s 1 -offline -amp-in 2 -rdim 6 mpirun -np 8 parametric_dmdc_heat_conduction -s 1 -offline -amp-in 4 -rdim 6 mpirun -np 8 parametric_dmdc_heat_conduction -s 1 -offline -amp-in 5 -rdim 6
mpirun -np 8 parametric_dmdc_heat_conduction -s 1 -amp-in 3 -online -predict -visit
Output: Relative error of DMDc temperature (u) at t_final: 0.5 is 0.0028885833 Elapsed time for solving FOM: 9.007740e-01 second Elapsed time for training DMDc: 7.236116e-01 second Elapsed time for predicting DMDc: 5.489291e-03 second
Some things I am suspicious of: 1) Changing the amplitudes of the sources seems to have very little effect on the final accuracy of the ROM. For example, in the second example above, if we predict:
mpirun -np 8 parametric_dmdc_heat_conduction -s 1 --kappa 1 -amp-in 1000 -online -predict
the relative error for the final temperature is 0.013669751 despite the fact that
-amp-in 1000
is far outside our trained values for the inlet amplitude.2) I changed the if statements in
matrixinterpolator.cpp
. I think other examples that call the matrix interpolator should still work with the new logic, since we are now just checking if dimensions match. I still need to verify this.