No advection, no stokes

Dear users/developers,

Is it possible to create a solver scheme of no advection | no stokes?
I think this functionality also popped up in the last hackathon by someone (can’t remember who) - the idea is to directly postprocess an initial condition dataset from a ascii file without going through the solvers because it is taking a very long time (for high mesh resolution), even when the solver tolerance is set to 1.

Actually, is there a step in the solver schemes which is indispensable after generating the mesh and setting the initial condition up? I once tried to comment the solver_timestep in core.cc, as a test, which skipped solving and went directly to postprocessing but the initial condition from the ascii file did not set (it resulted in an empty mesh).
If you think it is feasible and not too complicated, I don’t mind to have a go to create this special solver scheme…

Let me know what you think. And if you have other existing ideas to skip faster stokes and advection, I take them.

Many thanks,
Ludo

Hi Ludo,

I remember this coming up during the last Hackathon as well, but don’t recall who started working on it.

I believe part of the discussion resolved around whether we should have a “solver scheme” that actual does not solve anything. Effectively, the functionality listed above would just be to assemble the systems and not solve anything. If someone did make headway on this during the Hackathon, hopefully they can chime in (I think it was one of the developers).

Cheers,
John

This would be really useful. I’ve considered doing something like this a
few times in the past, but never gotten around to it. It would be really
helpful for debugging initial condition plugins. Bart Niday had another
use-case where he only wanted to postprocess a model based on its most
recent checkpoint. That would also benefit from such a feature.

As far as semantics about a ‘solver scheme’ doing no actual solving, it
seems natural to have a ‘none’ option. I think it would be pretty clear
to users what that meant.

Anyway, just throwing my +1 in case someone had been working on it and
changed their mind or never published it.

Best,
JPH

Interesting use cases.

I don’t think it would be very difficult to do. Take a look at the file
source/simulator/solver_schemes.cc. It defines the various solver
schemes, and they are called from core.cc in the function
solve_timestep(). It should not be difficult to add another case in that
latter function that calls a solve_no_advection_no_stokes() function in
the former file that duplicates what the other functions do except
actually building a linear system and solving it.

Best
W.

I did something similar at the hackathon last year, for a situation where I wanted to run time-dependent postprocessors on a time-independent solution. I added a function to solver_schemes.cc that runs the Stokes solver only on the first timestep, and does nothing on every subsequent timestep. I think it was merged on github.

I remember discussing an option to skip the solver entirely, but I never implemented that.

I imagine that you could take the function for ‘Stokes only first timestep’ (or whatever I called it) and remove the code that runs the Stokes solver on timestep 0.

Thanks for your feedbacks!
There is now a solver scheme « no Advection, no Stokes » and it has been merged yesterday into master.

Cheers,
Ludovic