dedalus icon indicating copy to clipboard operation
dedalus copied to clipboard

Interactive field saving/loading

Open kburns opened this issue 11 years ago • 1 comments

Original report (archived issue) by Keaton Burns (Bitbucket: kburns).


Better system for easily saving/loading fields, for interactive work or for linear solvers (i.e. outside of an Evaluator context).

kburns avatar Aug 01 '14 18:08 kburns

Original comment by J. S. Oishi (Bitbucket: jsoishi).


A minimal way of saving a single field phi defined on a domain domain is as follows:

from dedalus.core.problems import Namespace
from dedalus.core.evaluator import FileHandler

nm = Namespace()
nm['phi'] = phi
handler = FileHandler('test_files',domain, nm)
handler.add_task('phi')
handler.tasks[0]['out'] = phi
handler.process(0, 0, 0, 0, 0)

This may not all be necessary, but it is sufficient.

kburns avatar Jun 03 '19 18:06 kburns