Castro icon indicating copy to clipboard operation
Castro copied to clipboard

make finest level dx() known at probinit time

Open zingale opened this issue 4 years ago • 4 comments

For generating initial models at runtime, it would be useful to know already when we call probinit what the finest level dx(:) is. One way we could do this is to just query the parmparse for the domain size, nx, and maximum level, and manually compute this and store it in a finest_level_module that can be used in probinit.

This could then be used, for example, in bubble_convergence, instead of having to have a separate probin for each resolution.

zingale avatar Sep 12 '19 12:09 zingale

essentially we'd need to do this in main.cpp before the amrptr->init(strt_time,stop_time);.

We'd need to rebuild the ref_ratio array here to compute the finest level number of zones.

zingale avatar Sep 13 '19 00:09 zingale

It seems the best way to do this is to remove any problem initialization stuff from probinit and create a new Castro-owned initialization routine that call with this info that can be used to create initial models before the initialization of the grids themselves.

zingale avatar Sep 13 '19 00:09 zingale

This routine would be called from the Castro constructor after buildMetrics() has been called, and should only be done by the level 0 constructor.

maxpkatz avatar Sep 13 '19 00:09 maxpkatz

I think most of what was needed for this is now done.

zingale avatar Jun 12 '21 00:06 zingale