HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
1D Linear Advection - Discontinuous Waves (Time Windowed DMD)

See 1D Linear Advection - Discontinuous Waves to familiarize yourself with this case.

Location: hypar/Examples/1D/LinearAdvection/DiscontinuousWaves_libROM_DMD_Train (This directory contains all the input files needed to run this case.)

Governing equations: 1D Linear Advection Equation (linearadr.h)

Reduced Order Modeling: This example trains time-windowed DMD objects and then predicts the solution using the DMDs at the same times that the actual HyPar solution is written at.

References:

  • Ghosh, D., Baeder, J. D., "Compact Reconstruction Schemes with Weighted ENO Limiting for Hyperbolic Conservation Laws", SIAM Journal on Scientific Computing, 34 (3), 2012, A1678–A1706

Domain: \(-1 \le x \le 1\), "periodic" (_PERIODIC_) boundary conditions

Initial solution:

\begin{equation} u\left(x,0\right) = \left\{\begin{array}{lc} \exp\left(-\log\left(2\right)\frac{\left(x+7\right)^2}{0.0009}\right) & -0.8\le x \le -0.6 \\ 1 & -0.4\le x \le -0.2 \\ 1 - \left|10\left(x-0.1\right)\right| & 0\le x \le 0.2 \\ \sqrt{1-100\left(x-0.5\right)^2} & 0.4\le x \le 0.6 \\ 0 & {\rm otherwise} \end{array}\right. \end{equation}

Numerical Method:

Reduced Order Modeling:

Input files required:

librom.inp

begin
rdim 16
sampling_frequency 1
mode train
dmd_num_win_samples 100
end

solver.inp

begin
ndims 1
nvars 1
size 160
iproc 4
ghost 3
n_iter 800
time_scheme rk
time_scheme_type ssprk3
hyp_space_scheme crweno5
dt 0.0025
screen_op_iter 10
file_op_iter 16
ip_file_type ascii
op_file_format binary
op_overwrite no
model linear-advection-diffusion-reaction
end

boundary.inp

2
periodic 0 1 0 0
periodic 0 -1 0 0

physics.inp

begin
advection 1.0
end

lusolver.inp (optional)

begin
reducedsolvetype jacobi
evaluate_norm 1
maxiter 10
atol 1e-12
rtol 1e-10
verbose 0
end

weno.inp (optional)

begin
mapped 1
borges 0
yc 0
no_limiting 0
epsilon 0.000001
p 2.0
rc 0.3
xi 0.001
end

To generate initial.inp, compile and run the following code in the run directory. Note: if the final time is an integer multiple of the time period, the file initial.inp can also be used as the exact solution exact.inp (i.e. create a sym link called exact.inp pointing to initial.inp, or just copy initial.inp to exact.inp).

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
double absolute(double x)
{
return (x<0? -x : x);
}
int main(){
int NI,ndims;
char ip_file_type[50];
strcpy(ip_file_type,"ascii");
FILE *in;
printf("Reading file \"solver.inp\"...\n");
in = fopen("solver.inp","r");
if (!in) printf("Error: Input file \"solver.inp\" not found. Default values will be used.\n");
else {
char word[500];
fscanf(in,"%s",word);
if (!strcmp(word, "begin")){
while (strcmp(word, "end")){
fscanf(in,"%s",word);
if (!strcmp(word, "ndims")) fscanf(in,"%d",&ndims);
else if (!strcmp(word, "size")) fscanf(in,"%d",&NI);
else if (!strcmp(word, "ip_file_type")) fscanf(in,"%s",ip_file_type);
}
} else printf("Error: Illegal format in solver.inp. Crash and burn!\n");
}
fclose(in);
if (ndims != 1) {
printf("ndims is not 1 in solver.inp. this code is to generate 1D initial conditions\n");
return(0);
}
printf("Grid:\t\t\t%d\n",NI);
int i;
double dx = 2.0 / ((double)NI);
double *x, *u;
x = (double*) calloc (NI, sizeof(double));
u = (double*) calloc (NI, sizeof(double));
for (i = 0; i < NI; i++){
x[i] = -1.0 + i*dx;
if (x[i] < -0.8) u[i] = 0.0;
else if (x[i] < -0.6) u[i] = exp(-log(2.0)*(x[i]+0.7)*(x[i]+0.7)/0.0009);
else if (x[i] < -0.4) u[i] = 0.0;
else if (x[i] < -0.2) u[i] = 1.0;
else if (x[i] < 0 ) u[i] = 0.0;
else if (x[i] < 0.2) u[i] = 1.0 - absolute(10.0*(x[i]-0.1));
else if (x[i] < 0.4) u[i] = 0.0;
else if (x[i] < 0.6) u[i] = sqrt(1.0-100*(x[i]-0.5)*(x[i]-0.5));
else u[i] = 0.0;
}
FILE *out;
if (!strcmp(ip_file_type,"ascii")) {
printf("Writing ASCII initial solution file initial.inp\n");
out = fopen("initial.inp","w");
for (i = 0; i < NI; i++) fprintf(out,"%lf ",x[i]);
fprintf(out,"\n");
for (i = 0; i < NI; i++) fprintf(out,"%lf ",u[i]);
fprintf(out,"\n");
fclose(out);
} else if ((!strcmp(ip_file_type,"binary")) || (!strcmp(ip_file_type,"bin"))) {
printf("Writing binary initial solution file initial.inp\n");
out = fopen("initial.inp","wb");
fwrite(x,sizeof(double),NI,out);
fwrite(u,sizeof(double),NI,out);
fclose(out);
}
free(x);
free(u);
return(0);
}

Output:

After running the code, there should be the following output files:

  • 51 output files op_00000.bin, op_00001.bin, ... op_00050.bin; these are the HyPar solutions.
  • 51 output files op_rom_00000.bin, op_rom_00001.bin, ... op_rom_00050.bin; these are the predicted solutions from the DMD object(s).

The first of each of these file sets is the solution at \(t=0\) and the final one is the solution at \(t=2\). Since HyPar::op_overwrite is set to no in solver.inp, a separate file is written for solutions at each output time. All the files are binary (HyPar::op_file_format is set to binary in solver.inp).

The provided Python script (plotSolution.py) can be used to generate plots from the binary files that compare the HyPar and DMD solutions. Alternatively, HyPar::op_file_format can be set to text, and GNUPlot or something similar can be used to plot the resulting text files.

The following plot shows the final solution - FOM (full-order model) refers to the HyPar solution, ROM (reduced-order model) refers to the DMD solution.

Solution_1DLinearAdvDisclibROM_DMD.png

The L1, L2, and Linf norms of the diff between the HyPar and ROM solution at the final time are calculated and reported on screen (see below) as well as pde_rom_diff.dat:

160 4 2.5000000000000001E-03 5.7205961033976573E-03 5.1134497956698138E-03 9.1706092284055997E-03 7.9410959999999999E+00 8.1151900000000001E+00

The numbers are: number of grid points (HyPar::dim_global), number of processors (MPIVariables::iproc), time step size (HyPar::dt), L1, L2, and L-infinity norms of the diff (HyPar::rom_diff_norms), solver wall time (seconds) (i.e., not accounting for initialization, and cleaning up), and total wall time.

By default, the code will write the trained DMD object(s) to files in a subdirectory (DMDROMObject::m_dirname - default value is "DMD"). If the subdirectory does not exist, the code may not report an error (or give some HDF5 file-writing error); the DMD objects will not be written! If the subdirectory exists, several files will exist after the simulation is complete - they are in a format that is readable by libROM.

Expected screen output:

HyPar - Parallel (MPI) version with 4 processes
Compiled with PETSc time integration.
Allocated simulation object(s).
Reading solver inputs from file "solver.inp".
No. of dimensions : 1
No. of variables : 1
Domain size : 160
Processes along each dimension : 4
Exact solution domain size : 160
No. of ghosts pts : 3
No. of iter. : 800
Restart iteration : 0
Time integration scheme : rk (ssprk3)
Spatial discretization scheme (hyperbolic) : crweno5
Split hyperbolic flux term? : no
Interpolation type for hyperbolic term : characteristic
Spatial discretization type (parabolic ) : nonconservative-1stage
Spatial discretization scheme (parabolic ) : 2
Time Step : 2.500000E-03
Check for conservation : no
Screen output iterations : 10
File output iterations : 16
Initial solution file type : ascii
Initial solution read mode : serial
Solution file write mode : serial
Solution file format : binary
Overwrite solution file : no
Physical model : linear-advection-diffusion-reaction
Partitioning domain and allocating data arrays.
Reading array from ASCII file initial.inp (Serial mode).
Volume integral of the initial solution:
0: 5.1835172500000004E-01
Reading boundary conditions from boundary.inp.
Boundary periodic: Along dimension 0 and face +1
Boundary periodic: Along dimension 0 and face -1
2 boundary condition(s) read.
Initializing solvers.
Reading WENO parameters from weno.inp.
Initializing physics. Model = "linear-advection-diffusion-reaction"
Reading physical model inputs from file "physics.inp".
Setting up time integration.
Setting up libROM interface.
libROM inputs and parameters:
reduced model dimensionality: 16
sampling frequency: 1
mode: train
type: DMD
save to file: true
local vector size: 40
libROM DMD inputs:
number of samples per window: 100
directory name for DMD onjects: DMD
Solving in time (from 0 to 800 iterations)
Writing solution file op_00000.bin.
DMDROMObject::takeSample() - creating new DMD object, t=0.000000 (total: 1).
iter= 10 t=2.500E-02 CFL=2.000E-01 norm=2.2256E-02 wctime: 3.1E-04 (s)
Writing solution file op_00001.bin.
iter= 20 t=5.000E-02 CFL=2.000E-01 norm=2.1583E-02 wctime: 3.0E-04 (s)
iter= 30 t=7.500E-02 CFL=2.000E-01 norm=2.1179E-02 wctime: 2.5E-04 (s)
Writing solution file op_00002.bin.
iter= 40 t=1.000E-01 CFL=2.000E-01 norm=2.0887E-02 wctime: 2.9E-04 (s)
Writing solution file op_00003.bin.
iter= 50 t=1.250E-01 CFL=2.000E-01 norm=2.0660E-02 wctime: 2.5E-04 (s)
iter= 60 t=1.500E-01 CFL=2.000E-01 norm=2.0475E-02 wctime: 2.8E-04 (s)
Writing solution file op_00004.bin.
iter= 70 t=1.750E-01 CFL=2.000E-01 norm=2.0320E-02 wctime: 2.7E-04 (s)
iter= 80 t=2.000E-01 CFL=2.000E-01 norm=2.0187E-02 wctime: 2.5E-04 (s)
Writing solution file op_00005.bin.
iter= 90 t=2.250E-01 CFL=2.000E-01 norm=2.0071E-02 wctime: 2.8E-04 (s)
Writing solution file op_00006.bin.
iter= 100 t=2.500E-01 CFL=2.000E-01 norm=1.9968E-02 wctime: 2.6E-04 (s)
DMDROMObject::takeSample() - creating new DMD object, t=0.250000 (total: 2).
iter= 110 t=2.750E-01 CFL=2.000E-01 norm=1.9877E-02 wctime: 3.0E-04 (s)
Writing solution file op_00007.bin.
iter= 120 t=3.000E-01 CFL=2.000E-01 norm=1.9794E-02 wctime: 2.6E-04 (s)
Writing solution file op_00008.bin.
iter= 130 t=3.250E-01 CFL=2.000E-01 norm=1.9719E-02 wctime: 2.9E-04 (s)
iter= 140 t=3.500E-01 CFL=2.000E-01 norm=1.9650E-02 wctime: 2.7E-04 (s)
Writing solution file op_00009.bin.
iter= 150 t=3.750E-01 CFL=2.000E-01 norm=1.9587E-02 wctime: 2.9E-04 (s)
iter= 160 t=4.000E-01 CFL=2.000E-01 norm=1.9522E-02 wctime: 2.4E-04 (s)
Writing solution file op_00010.bin.
iter= 170 t=4.250E-01 CFL=2.000E-01 norm=1.9462E-02 wctime: 2.7E-04 (s)
Writing solution file op_00011.bin.
iter= 180 t=4.500E-01 CFL=2.000E-01 norm=1.9412E-02 wctime: 2.4E-04 (s)
iter= 190 t=4.750E-01 CFL=2.000E-01 norm=1.9364E-02 wctime: 2.8E-04 (s)
Writing solution file op_00012.bin.
iter= 200 t=5.000E-01 CFL=2.000E-01 norm=1.9319E-02 wctime: 2.5E-04 (s)
DMDROMObject::takeSample() - creating new DMD object, t=0.500000 (total: 3).
Writing solution file op_00013.bin.
iter= 210 t=5.250E-01 CFL=2.000E-01 norm=1.9276E-02 wctime: 2.6E-04 (s)
iter= 220 t=5.500E-01 CFL=2.000E-01 norm=1.9235E-02 wctime: 2.8E-04 (s)
Writing solution file op_00014.bin.
iter= 230 t=5.750E-01 CFL=2.000E-01 norm=1.9191E-02 wctime: 2.4E-04 (s)
iter= 240 t=6.000E-01 CFL=2.000E-01 norm=1.9152E-02 wctime: 2.4E-04 (s)
Writing solution file op_00015.bin.
iter= 250 t=6.250E-01 CFL=2.000E-01 norm=1.9117E-02 wctime: 2.5E-04 (s)
Writing solution file op_00016.bin.
iter= 260 t=6.500E-01 CFL=2.000E-01 norm=1.9084E-02 wctime: 2.5E-04 (s)
iter= 270 t=6.750E-01 CFL=2.000E-01 norm=1.9052E-02 wctime: 2.8E-04 (s)
Writing solution file op_00017.bin.
iter= 280 t=7.000E-01 CFL=2.000E-01 norm=1.9022E-02 wctime: 2.8E-04 (s)
Writing solution file op_00018.bin.
iter= 290 t=7.250E-01 CFL=2.000E-01 norm=1.8992E-02 wctime: 2.7E-04 (s)
iter= 300 t=7.500E-01 CFL=2.000E-01 norm=1.8964E-02 wctime: 2.6E-04 (s)
DMDROMObject::takeSample() - creating new DMD object, t=0.750000 (total: 4).
Writing solution file op_00019.bin.
iter= 310 t=7.750E-01 CFL=2.000E-01 norm=1.8936E-02 wctime: 2.9E-04 (s)
iter= 320 t=8.000E-01 CFL=2.000E-01 norm=1.8910E-02 wctime: 2.4E-04 (s)
Writing solution file op_00020.bin.
iter= 330 t=8.250E-01 CFL=2.000E-01 norm=1.8884E-02 wctime: 2.6E-04 (s)
Writing solution file op_00021.bin.
iter= 340 t=8.500E-01 CFL=2.000E-01 norm=1.8859E-02 wctime: 2.8E-04 (s)
iter= 350 t=8.750E-01 CFL=2.000E-01 norm=1.8835E-02 wctime: 2.4E-04 (s)
Writing solution file op_00022.bin.
iter= 360 t=9.000E-01 CFL=2.000E-01 norm=1.8811E-02 wctime: 2.7E-04 (s)
Writing solution file op_00023.bin.
iter= 370 t=9.250E-01 CFL=2.000E-01 norm=1.8788E-02 wctime: 2.7E-04 (s)
iter= 380 t=9.500E-01 CFL=2.000E-01 norm=1.8766E-02 wctime: 2.3E-04 (s)
Writing solution file op_00024.bin.
iter= 390 t=9.750E-01 CFL=2.000E-01 norm=1.8745E-02 wctime: 2.7E-04 (s)
iter= 400 t=1.000E+00 CFL=2.000E-01 norm=1.8724E-02 wctime: 2.8E-04 (s)
Writing solution file op_00025.bin.
DMDROMObject::takeSample() - creating new DMD object, t=1.000000 (total: 5).
iter= 410 t=1.025E+00 CFL=2.000E-01 norm=1.8704E-02 wctime: 2.4E-04 (s)
Writing solution file op_00026.bin.
iter= 420 t=1.050E+00 CFL=2.000E-01 norm=1.8684E-02 wctime: 2.7E-04 (s)
iter= 430 t=1.075E+00 CFL=2.000E-01 norm=1.8665E-02 wctime: 2.3E-04 (s)
Writing solution file op_00027.bin.
iter= 440 t=1.100E+00 CFL=2.000E-01 norm=1.8647E-02 wctime: 2.9E-04 (s)
Writing solution file op_00028.bin.
iter= 450 t=1.125E+00 CFL=2.000E-01 norm=1.8628E-02 wctime: 2.4E-04 (s)
iter= 460 t=1.150E+00 CFL=2.000E-01 norm=1.8610E-02 wctime: 3.0E-04 (s)
Writing solution file op_00029.bin.
iter= 470 t=1.175E+00 CFL=2.000E-01 norm=1.8594E-02 wctime: 2.4E-04 (s)
iter= 480 t=1.200E+00 CFL=2.000E-01 norm=1.8568E-02 wctime: 2.6E-04 (s)
Writing solution file op_00030.bin.
iter= 490 t=1.225E+00 CFL=2.000E-01 norm=1.8549E-02 wctime: 2.4E-04 (s)
Writing solution file op_00031.bin.
iter= 500 t=1.250E+00 CFL=2.000E-01 norm=1.8534E-02 wctime: 2.5E-04 (s)
DMDROMObject::takeSample() - creating new DMD object, t=1.250000 (total: 6).
iter= 510 t=1.275E+00 CFL=2.000E-01 norm=1.8519E-02 wctime: 2.4E-04 (s)
Writing solution file op_00032.bin.
iter= 520 t=1.300E+00 CFL=2.000E-01 norm=1.8504E-02 wctime: 2.6E-04 (s)
Writing solution file op_00033.bin.
iter= 530 t=1.325E+00 CFL=2.000E-01 norm=1.8489E-02 wctime: 2.4E-04 (s)
iter= 540 t=1.350E+00 CFL=2.000E-01 norm=1.8474E-02 wctime: 3.0E-04 (s)
Writing solution file op_00034.bin.
iter= 550 t=1.375E+00 CFL=2.000E-01 norm=1.8460E-02 wctime: 2.6E-04 (s)
iter= 560 t=1.400E+00 CFL=2.000E-01 norm=1.8438E-02 wctime: 2.6E-04 (s)
Writing solution file op_00035.bin.
iter= 570 t=1.425E+00 CFL=2.000E-01 norm=1.8422E-02 wctime: 2.6E-04 (s)
Writing solution file op_00036.bin.
iter= 580 t=1.450E+00 CFL=2.000E-01 norm=1.8409E-02 wctime: 3.2E-04 (s)
iter= 590 t=1.475E+00 CFL=2.000E-01 norm=1.8396E-02 wctime: 3.0E-04 (s)
Writing solution file op_00037.bin.
iter= 600 t=1.500E+00 CFL=2.000E-01 norm=1.8383E-02 wctime: 2.6E-04 (s)
DMDROMObject::takeSample() - creating new DMD object, t=1.500000 (total: 7).
Writing solution file op_00038.bin.
iter= 610 t=1.525E+00 CFL=2.000E-01 norm=1.8369E-02 wctime: 3.0E-04 (s)
iter= 620 t=1.550E+00 CFL=2.000E-01 norm=1.8356E-02 wctime: 2.4E-04 (s)
Writing solution file op_00039.bin.
iter= 630 t=1.575E+00 CFL=2.000E-01 norm=1.8343E-02 wctime: 2.7E-04 (s)
iter= 640 t=1.600E+00 CFL=2.000E-01 norm=1.8330E-02 wctime: 2.4E-04 (s)
Writing solution file op_00040.bin.
iter= 650 t=1.625E+00 CFL=2.000E-01 norm=1.8318E-02 wctime: 2.4E-04 (s)
Writing solution file op_00041.bin.
iter= 660 t=1.650E+00 CFL=2.000E-01 norm=1.8304E-02 wctime: 2.6E-04 (s)
iter= 670 t=1.675E+00 CFL=2.000E-01 norm=1.8291E-02 wctime: 2.6E-04 (s)
Writing solution file op_00042.bin.
iter= 680 t=1.700E+00 CFL=2.000E-01 norm=1.8275E-02 wctime: 3.0E-04 (s)
Writing solution file op_00043.bin.
iter= 690 t=1.725E+00 CFL=2.000E-01 norm=1.8263E-02 wctime: 2.5E-04 (s)
iter= 700 t=1.750E+00 CFL=2.000E-01 norm=1.8250E-02 wctime: 2.8E-04 (s)
DMDROMObject::takeSample() - creating new DMD object, t=1.750000 (total: 8).
Writing solution file op_00044.bin.
iter= 710 t=1.775E+00 CFL=2.000E-01 norm=1.8238E-02 wctime: 2.6E-04 (s)
iter= 720 t=1.800E+00 CFL=2.000E-01 norm=1.8227E-02 wctime: 2.6E-04 (s)
Writing solution file op_00045.bin.
iter= 730 t=1.825E+00 CFL=2.000E-01 norm=1.8215E-02 wctime: 2.9E-04 (s)
Writing solution file op_00046.bin.
iter= 740 t=1.850E+00 CFL=2.000E-01 norm=1.8204E-02 wctime: 2.9E-04 (s)
iter= 750 t=1.875E+00 CFL=2.000E-01 norm=1.8192E-02 wctime: 2.6E-04 (s)
Writing solution file op_00047.bin.
iter= 760 t=1.900E+00 CFL=2.000E-01 norm=1.8181E-02 wctime: 2.6E-04 (s)
Writing solution file op_00048.bin.
iter= 770 t=1.925E+00 CFL=2.000E-01 norm=1.8170E-02 wctime: 2.8E-04 (s)
iter= 780 t=1.950E+00 CFL=2.000E-01 norm=1.8159E-02 wctime: 2.8E-04 (s)
Writing solution file op_00049.bin.
iter= 790 t=1.975E+00 CFL=2.000E-01 norm=1.8148E-02 wctime: 3.2E-04 (s)
iter= 800 t=2.000E+00 CFL=2.000E-01 norm=1.8137E-02 wctime: 2.9E-04 (s)
Completed time integration (Final time: 2.000000), total wctime: 3.850328 (seconds).
Writing solution file op_00050.bin.
libROM: Training ROM.
DMDRomObject::train() - training DMD object 0 with 101 samples.
Using 16 basis vectors out of 100.
DMDRomObject::train() - training DMD object 1 with 101 samples.
Using 16 basis vectors out of 100.
DMDRomObject::train() - training DMD object 2 with 101 samples.
Using 16 basis vectors out of 100.
DMDRomObject::train() - training DMD object 3 with 101 samples.
Using 16 basis vectors out of 100.
DMDRomObject::train() - training DMD object 4 with 101 samples.
Using 16 basis vectors out of 100.
DMDRomObject::train() - training DMD object 5 with 101 samples.
Using 16 basis vectors out of 100.
DMDRomObject::train() - training DMD object 6 with 101 samples.
Using 16 basis vectors out of 100.
DMDRomObject::train() - training DMD object 7 with 100 samples.
Using 16 basis vectors out of 99.
libROM: wallclock time: 0.181797 (seconds).
libROM: Predicting solution at time 0.0000e+00 using ROM.
libROM: wallclock time: 0.000599 (seconds).
Writing solution file op_rom_00000.bin.
libROM: Predicting solution at time 4.0000e-02 using ROM.
libROM: wallclock time: 0.000528 (seconds).
Writing solution file op_rom_00001.bin.
libROM: Predicting solution at time 8.0000e-02 using ROM.
libROM: wallclock time: 0.000513 (seconds).
Writing solution file op_rom_00002.bin.
libROM: Predicting solution at time 1.2000e-01 using ROM.
libROM: wallclock time: 0.000544 (seconds).
Writing solution file op_rom_00003.bin.
libROM: Predicting solution at time 1.6000e-01 using ROM.
libROM: wallclock time: 0.000531 (seconds).
Writing solution file op_rom_00004.bin.
libROM: Predicting solution at time 2.0000e-01 using ROM.
libROM: wallclock time: 0.000513 (seconds).
Writing solution file op_rom_00005.bin.
libROM: Predicting solution at time 2.4000e-01 using ROM.
libROM: wallclock time: 0.000494 (seconds).
Writing solution file op_rom_00006.bin.
libROM: Predicting solution at time 2.8000e-01 using ROM.
libROM: wallclock time: 0.000530 (seconds).
Writing solution file op_rom_00007.bin.
libROM: Predicting solution at time 3.2000e-01 using ROM.
libROM: wallclock time: 0.000543 (seconds).
Writing solution file op_rom_00008.bin.
libROM: Predicting solution at time 3.6000e-01 using ROM.
libROM: wallclock time: 0.000516 (seconds).
Writing solution file op_rom_00009.bin.
libROM: Predicting solution at time 4.0000e-01 using ROM.
libROM: wallclock time: 0.000493 (seconds).
Writing solution file op_rom_00010.bin.
libROM: Predicting solution at time 4.4000e-01 using ROM.
libROM: wallclock time: 0.000500 (seconds).
Writing solution file op_rom_00011.bin.
libROM: Predicting solution at time 4.8000e-01 using ROM.
libROM: wallclock time: 0.000555 (seconds).
Writing solution file op_rom_00012.bin.
libROM: Predicting solution at time 5.2000e-01 using ROM.
libROM: wallclock time: 0.000572 (seconds).
Writing solution file op_rom_00013.bin.
libROM: Predicting solution at time 5.6000e-01 using ROM.
libROM: wallclock time: 0.000574 (seconds).
Writing solution file op_rom_00014.bin.
libROM: Predicting solution at time 6.0000e-01 using ROM.
libROM: wallclock time: 0.000568 (seconds).
Writing solution file op_rom_00015.bin.
libROM: Predicting solution at time 6.4000e-01 using ROM.
libROM: wallclock time: 0.000586 (seconds).
Writing solution file op_rom_00016.bin.
libROM: Predicting solution at time 6.8000e-01 using ROM.
libROM: wallclock time: 0.000537 (seconds).
Writing solution file op_rom_00017.bin.
libROM: Predicting solution at time 7.2000e-01 using ROM.
libROM: wallclock time: 0.000500 (seconds).
Writing solution file op_rom_00018.bin.
libROM: Predicting solution at time 7.6000e-01 using ROM.
libROM: wallclock time: 0.000531 (seconds).
Writing solution file op_rom_00019.bin.
libROM: Predicting solution at time 8.0000e-01 using ROM.
libROM: wallclock time: 0.000546 (seconds).
Writing solution file op_rom_00020.bin.
libROM: Predicting solution at time 8.4000e-01 using ROM.
libROM: wallclock time: 0.000525 (seconds).
Writing solution file op_rom_00021.bin.
libROM: Predicting solution at time 8.8000e-01 using ROM.
libROM: wallclock time: 0.000504 (seconds).
Writing solution file op_rom_00022.bin.
libROM: Predicting solution at time 9.2000e-01 using ROM.
libROM: wallclock time: 0.000533 (seconds).
Writing solution file op_rom_00023.bin.
libROM: Predicting solution at time 9.6000e-01 using ROM.
libROM: wallclock time: 0.000519 (seconds).
Writing solution file op_rom_00024.bin.
libROM: Predicting solution at time 1.0000e+00 using ROM.
libROM: wallclock time: 0.000518 (seconds).
Writing solution file op_rom_00025.bin.
libROM: Predicting solution at time 1.0400e+00 using ROM.
libROM: wallclock time: 0.000544 (seconds).
Writing solution file op_rom_00026.bin.
libROM: Predicting solution at time 1.0800e+00 using ROM.
libROM: wallclock time: 0.000525 (seconds).
Writing solution file op_rom_00027.bin.
libROM: Predicting solution at time 1.1200e+00 using ROM.
libROM: wallclock time: 0.000531 (seconds).
Writing solution file op_rom_00028.bin.
libROM: Predicting solution at time 1.1600e+00 using ROM.
libROM: wallclock time: 0.000515 (seconds).
Writing solution file op_rom_00029.bin.
libROM: Predicting solution at time 1.2000e+00 using ROM.
libROM: wallclock time: 0.000556 (seconds).
Writing solution file op_rom_00030.bin.
libROM: Predicting solution at time 1.2400e+00 using ROM.
libROM: wallclock time: 0.000502 (seconds).
Writing solution file op_rom_00031.bin.
libROM: Predicting solution at time 1.2800e+00 using ROM.
libROM: wallclock time: 0.000501 (seconds).
Writing solution file op_rom_00032.bin.
libROM: Predicting solution at time 1.3200e+00 using ROM.
libROM: wallclock time: 0.000596 (seconds).
Writing solution file op_rom_00033.bin.
libROM: Predicting solution at time 1.3600e+00 using ROM.
libROM: wallclock time: 0.000532 (seconds).
Writing solution file op_rom_00034.bin.
libROM: Predicting solution at time 1.4000e+00 using ROM.
libROM: wallclock time: 0.000520 (seconds).
Writing solution file op_rom_00035.bin.
libROM: Predicting solution at time 1.4400e+00 using ROM.
libROM: wallclock time: 0.000570 (seconds).
Writing solution file op_rom_00036.bin.
libROM: Predicting solution at time 1.4800e+00 using ROM.
libROM: wallclock time: 0.000552 (seconds).
Writing solution file op_rom_00037.bin.
libROM: Predicting solution at time 1.5200e+00 using ROM.
libROM: wallclock time: 0.000548 (seconds).
Writing solution file op_rom_00038.bin.
libROM: Predicting solution at time 1.5600e+00 using ROM.
libROM: wallclock time: 0.000544 (seconds).
Writing solution file op_rom_00039.bin.
libROM: Predicting solution at time 1.6000e+00 using ROM.
libROM: wallclock time: 0.000484 (seconds).
Writing solution file op_rom_00040.bin.
libROM: Predicting solution at time 1.6400e+00 using ROM.
libROM: wallclock time: 0.000554 (seconds).
Writing solution file op_rom_00041.bin.
libROM: Predicting solution at time 1.6800e+00 using ROM.
libROM: wallclock time: 0.000564 (seconds).
Writing solution file op_rom_00042.bin.
libROM: Predicting solution at time 1.7200e+00 using ROM.
libROM: wallclock time: 0.000486 (seconds).
Writing solution file op_rom_00043.bin.
libROM: Predicting solution at time 1.7600e+00 using ROM.
libROM: wallclock time: 0.000545 (seconds).
Writing solution file op_rom_00044.bin.
libROM: Predicting solution at time 1.8000e+00 using ROM.
libROM: wallclock time: 0.000535 (seconds).
Writing solution file op_rom_00045.bin.
libROM: Predicting solution at time 1.8400e+00 using ROM.
libROM: wallclock time: 0.000519 (seconds).
Writing solution file op_rom_00046.bin.
libROM: Predicting solution at time 1.8800e+00 using ROM.
libROM: wallclock time: 0.000491 (seconds).
Writing solution file op_rom_00047.bin.
libROM: Predicting solution at time 1.9200e+00 using ROM.
libROM: wallclock time: 0.000516 (seconds).
Writing solution file op_rom_00048.bin.
libROM: Predicting solution at time 1.9600e+00 using ROM.
libROM: wallclock time: 0.000553 (seconds).
Writing solution file op_rom_00049.bin.
libROM: Predicting solution at time 2.0000e+00 using ROM.
libROM: wallclock time: 0.000527 (seconds).
libROM: Calculating diff between PDE and ROM solutions.
Writing solution file op_rom_00050.bin.
libROM: total prediction/query wallclock time: 0.027182 (seconds).
libROMInterface::saveROM() - saving ROM objects.
Saving DMD object with filename root DMD/dmdobj_0000.
Saving DMD object with filename root DMD/dmdobj_0001.
Saving DMD object with filename root DMD/dmdobj_0002.
Saving DMD object with filename root DMD/dmdobj_0003.
Saving DMD object with filename root DMD/dmdobj_0004.
Saving DMD object with filename root DMD/dmdobj_0005.
Saving DMD object with filename root DMD/dmdobj_0006.
Saving DMD object with filename root DMD/dmdobj_0007.
Norms of the diff between ROM and PDE solutions for domain 0:
L1 Norm : 5.7205961033976573E-03
L2 Norm : 5.1134497956698138E-03
Linfinity Norm : 9.1706092284055997E-03
Solver runtime (in seconds): 7.9410959999999999E+00
Total runtime (in seconds): 8.1151900000000001E+00
Deallocating arrays.
Finished.