Open-Sn / opensn

open-source Sn software
https://open-sn.github.io/opensn/
Other
19 stars 17 forks source link

folder organization in module/LBS #41

Open ragusa opened 10 months ago

ragusa commented 10 months ago

there are diffusion solvers in

can this be harmonized?

zhardy-lanl commented 7 months ago

This is a big can of worms that does need to be addressed sooner rather than later. The current code design is that a_lbs_solver is the broad and encompassing data structure that defines a transport or diffusion problem. All of the b, c, and d variants are specializations. The LBSSolver gets attached to an executor which then solves the problem.

There are several issues with the current design in my view:

  1. a_lbs_solver is meant to be inherited by transport and diffusion specific data structures. There is a lot of data in LBSSolver and other classes within a_lbs_solver, however, that is transport specific. For example, DSA is tied to transport and not diffusion, yet a_lbs_solver contains all of the DSA related routines and not b_discrete_ordinates_solver. There are numerous other examples in this regard.
  2. Our standalone diffusion solvers are essentially wrappers around the DSA functionality, which is the opposite of how it should be. Our DSA routines should create diffusion solvers instead.

This will ultimately require a meeting where we go through the linear_boltzmann_solvers directory in great detail and decide on a new strategy that makes more sense.

zhardy-lanl commented 2 months ago

There are many different paths we can take on this topic... I'll propose a number of thoughts we should discuss:

  1. Should we have a different diffusion solver for each discretization, or house the different discretizations in a single solver?
  2. Should there be separate diffusion solvers for multi-group and single group?
  3. Should we have standalone diffusion modules that get created by DiscreteOrdinatesSolver for DSA, or should LBSSolver define diffusion solvers for DSA that then get used by standalone modules?

I think if we can really nail down on these questions (and potentially others that I am not considering) it will really clear up what needs to be done for this issue.