Class DiscreteOrdinatesSolver

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class DiscreteOrdinatesSolver : public opensn::Solver

Base class for solvers that drive a DiscreteOrdinatesProblem.

Solution and time state remain in the shared problem. A solver restores its temporary settings before returning. Validation is collective.

Subclassed by opensn::NonLinearKEigenSolver, opensn::PowerIterationKEigenSolver, opensn::SteadyStateSourceSolver, opensn::TransientSolver

Public Functions

std::size_t GetNumSweeps() const

Return the cumulative number of transport sweeps applied by all WGS solvers of the problem.

Public Static Functions

static InputParameters GetInputParameters()

Protected Functions

explicit DiscreteOrdinatesSolver(const InputParameters &params)
virtual void ValidateState() const final

Requires a built problem, validates its configuration, then checks solver requirements.

virtual void CheckRequirements(std::vector<std::string> &errors) const = 0

Appends one message for each solver-specific requirement the problem violates.

Problem-wide rules belong in DiscreteOrdinatesProblem::CheckConfigurationErrors. Requirements based on rank-local state reduce it before appending an error.

void RequireSteadyState(std::vector<std::string> &errors) const

Appends the error for a solver that requires steady-state mode.

void RequireNoExternalSources(std::vector<std::string> &errors) const

Appends an error for each external source (volumetric, point, or incoming-flux boundary).

void RequireFissionableMaterial(std::vector<std::string> &errors) const

Appends an error if no cell has fissionable cross sections. Collective.

void CheckKEigenRequirements(std::vector<std::string> &errors) const

Appends the requirements common to k-eigenvalue solvers. Collective.

bool CheckTransportSolveConverged(const std::string &what) const

Returns whether the last transport solve converged: the across-groupset iteration when the problem has more than one groupset, otherwise the within-group solve.

Only a solve whose convergence test passed counts as converged; a single sweep without a test does not. If the solve did not converge, logs a warning on rank 0. what names the solve in the message, for example “Time step 3”.

Protected Attributes

std::shared_ptr<DiscreteOrdinatesProblem> do_problem_