GEOS icon indicating copy to clipboard operation
GEOS copied to clipboard

feat: Add option for automatic timestep computation in wave solvers

Open acitrain opened this issue 2 years ago • 2 comments

This PR add the possibility of compute automatically the timestep for wave propagation solvers.

How to use it?

  • You add the correct switch in your XML (timestepStabilityLimit=1)
  • You launch GEOS
  • If the requested dt for the solver (forceDt) is higher than the CFL condition limit, substeps are used to remain below the condition Also, an option is added to input source wavelets using TableFunctions, with the option sourceWaveletTableNames There also a routine inside the PR to be wrapped using Pygeosx

acitrain avatar Dec 22 '23 09:12 acitrain

Would there be a way to specify a zero timestep (standing for automatic computation for the timestep) in the xml file, and reuse that time step automatically in the computation, without having to modify xmls and relaunch the code ?

tbeltzun avatar Mar 11 '24 16:03 tbeltzun

Codecov Report

Attention: Patch coverage is 89.85507% with 28 lines in your changes missing coverage. Please review.

Please upload report for BASE (develop@890c5e7). Learn more about missing BASE report. Report is 76 commits behind head on develop.

Files with missing lines Patch % Lines
...rderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp 0.00% 12 Missing :warning:
...sSolvers/wavePropagation/shared/WaveSolverBase.cpp 75.00% 5 Missing :warning:
...erEqn/isotropic/AcousticElasticWaveEquationSEM.cpp 0.00% 4 Missing :warning:
...qn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp 57.14% 3 Missing :warning:
...Eqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp 75.00% 3 Missing :warning:
...econdOrderEqn/isotropic/ElasticWaveEquationSEM.cpp 99.18% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #2909   +/-   ##
==========================================
  Coverage           ?   57.72%           
==========================================
  Files              ?     1086           
  Lines              ?    97519           
  Branches           ?        0           
==========================================
  Hits               ?    56294           
  Misses             ?    41225           
  Partials           ?        0           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 18 '24 15:04 codecov[bot]

I have approved it but two things about this PR:

  1. please don't put PRs in the merge queue until they have all codeowners approvals.
  2. IMO, the idea of forceDt is for the timestep size to be fixed. To let the solver adjust the timestep size one can just set a maxTiimestep size for the event instead of forcing it. So, I would argue that, if the forceDt is too large it's fine for the simulation to fail instead of substepping. I know that solver base sort of does this too but we have talked about removing it coz it is actually a lot easier to let the EventManager be the only object managing timestepping.

CusiniM avatar Oct 31 '24 16:10 CusiniM