Incompact3d icon indicating copy to clipboard operation
Incompact3d copied to clipboard

Move case-specific intitlization / finalization to dedicated case subroutine

Open mathrack opened this issue 4 years ago • 2 comments

The file xcompact3d.f90 contains case-specific open / close statements. This should be moved inside the corresponding init and finalize subroutines in BC-xxx.f90.

https://github.com/xcompact3d/Incompact3d/blob/ca5be84f7aa4f92a355e4e4cb89becb493f238c3/src/xcompact3d.f90#L264

https://github.com/xcompact3d/Incompact3d/blob/ca5be84f7aa4f92a355e4e4cb89becb493f238c3/src/xcompact3d.f90#L292

However, the case/init subroutine is called only when irestart==0. It might be relevant to adapt the initial stage of xcompact3d. For instance :

  • always call a subroutine case/boot
  • then call the subroutine case/init when irestart==0

The case-specific open / close statements could then be moved inside case/boot and case/finalize

mathrack avatar Sep 20 '21 09:09 mathrack

See this commit, or this one for instance

mathrack avatar Sep 20 '21 10:09 mathrack

That would be nice.

I also recommend making the parameters filename (InputFN='input.i3d') global at module_param.f90, so we can handle case-specific nameslists at case-specific files. It would reduce a little bit the footprint of different modules and make it easier for us to drop in customized solutions.

fschuch avatar Oct 06 '21 21:10 fschuch