Open eyupsopaci opened 1 year ago
The inconsistency arises due to the output module. The digit precision for the output is inadequate in output.f90 Line 493.
allocate(pb%ox%fmt(pb%ox%nox))
! Default output format
![check_restart_ooo](https://github.com/ydluo/qdyn/assets/65046328/a73353f5-3b19-4f94-ad29-733a60a8f8f8)
pb%ox%fmt = "(e15.7)"
When it is set to 'e24.14', the solutions perfectly overlap (restart1 is with the longer digits).
Thanks Eyup, I'll include this in the final release (#84)
Thanks Eyup, I'll include this in the final release (#84)
I changed the output the precision of the ox file in lines 493-506 since each variable requires different precision:
allocate(pb%ox%fmt(pb%ox%nox))
! Default output format
pb%ox%fmt = "(e15.7)"
! Simulation step is an integer
pb%ox%fmt(1) = "(i15)"
! Time needs higher precision
pb%ox%fmt(2) = "(e24.14)"
! Theta may require even higher precision
pb%ox%fmt(7) = "(e26.16)"
! tau and sigma
pb%ox%fmt(8) = "(e20.12)"
pb%ox%fmt(11) = "(e20.12)"
! Fault label is an integer
pb%ox%fmt(pb%ox%nox)= "(i15)"
The above solution sustains a precise restart for a stiff setup, where theta values can exceed 1e9. The following figure shows the comparison between the seamless and restarted simulations.
The restarted simulation differs from the seamless result. I put an example from the QDYN documentation 'Single asperity simulations (3D)' by slightly changing the input.
The above code runs for 350 years and then restarts for an additional 350 years. I also run a continuous 700 years solution. Then I compared the results. Here is a 'output_vmax' file result.
There is a constant shift between the seamless and restarted solutions.
The amount of shift between the solutions differs w.r.t the initial values and the inputs.