pyopensn.solver.Solver

class pyopensn.solver.Solver

Base class for all solvers.

Wrapper of opensn::Solver.

Advance(self: pyopensn.solver.Solver) → None

Advance the solver by one step.

Changes made to the problem since the last step are checked as in Execute. Initialize must be called first. Solver classes that do not implement stepping leave the state unchanged and log that Advance is unsupported.

For MPI transport solvers, this is a collective operation and must be called on all ranks.

Execute(self: pyopensn.solver.Solver) → None

Execute the solver.

The problem’s current state and the solver’s requirements are checked first, so changes made to the problem after Initialize (for example a mode switch or SetXSMap) are validated before they are used. Initialize must be called before Execute.

For MPI transport solvers, this is a collective operation and must be called on all ranks.

Initialize(self: pyopensn.solver.Solver) → None

Initialize the solver.

Solvers check that the problem is in a supported state (for example, steady-state mode without external sources for the k-eigenvalue solvers) and raise ValueError otherwise. Setup and post-setup validation must both succeed. Calling Initialize again clears the previous initialized state first.

For MPI transport solvers, this is a collective operation and must be called on all ranks.