svalinn / r2s-act

Rigorous 2 Step Activation Workflow
4 stars 7 forks source link

Rerun R2S step 1 without mmgridgen #18

Closed gonuke closed 11 years ago

gonuke commented 11 years ago

A common use case is to rerun the R2S methodology starting with neutronics but without changing the geometry/materials. Therefore it is useful to be able to repeat the workflow without doing the ray firing for the mmGridGen step.

erelson commented 11 years ago

I've implemented this. Right now I provide the user control by adding an additional option (gen_mmgrid) to r2s.cfg.

In r2s_step1.py the primary relevant lines are:

grid = mmgrid.mmGrid( smesh )
grid.generate( mmgrid_rays, False )
grid.createTags()

Which add the various material tags to smesh. smesh gets saved, but I now realize that r2s_step1.py was recreating it from scratch every time.

Thus I've also changed r2s_step1.py to re-use the existing .h5m file if gen_mmgrid == False. Thankfully Steve made this straightforward by including such functionality in read_meshtal.py. Modifications were made to mmgrid.py and read_meshtal.py to handle tags already existing.