Class DiscreteOrdinatesKEigenAcceleration

Nested Relationships

Nested Types

Inheritance Relationships

Derived Types

Class Documentation

class DiscreteOrdinatesKEigenAcceleration

Base class for LBS acceleration methods.

Subclassed by opensn::CMFDAcceleration, opensn::SCDSAAcceleration, opensn::SMMAcceleration

Public Functions

explicit DiscreteOrdinatesKEigenAcceleration(const InputParameters &params)
virtual ~DiscreteOrdinatesKEigenAcceleration() = default
void Initialize(PowerIterationKEigenSolver &solver)

Public initialize method, called by the power iteration solver at the start of each Execute().

Builds the acceleration data from the problem’s current runtime objects, so it must support repeated calls.

Calls the internal Initialize() method.

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

Appends one message for each requirement of this acceleration method that the problem violates.

The owning solver calls it from its CheckRequirements, so it runs collectively before Initialize() and before each execution. The default has no requirements.

inline const DiscreteOrdinatesProblem &GetProblem() const

The problem this acceleration method was created for.

virtual void Initialize() = 0

Initialization method for derived classes.

Must be overridden.

Called by the other Initialize() method that takes a solver.

virtual void PreExecute() = 0

Pre-execute method for derived classes.

Must be overridden.

Called by the owning solver at the beginning of its Execute().

virtual void PrePowerIteration() = 0

Pre-power iteration method for derived classes.

Must be overridden.

Called by the owning solver at the beginning of the power iteration loop after the fission source is set and the local moments are scaled.

virtual double PostPowerIteration() = 0

Post-power iteration method for derived classes.

Must be overridden.

Called by the owning solver at the end of the power iteration loop after transport is solved.

Returns the k-eigenvalue from the acceleration solve.

inline virtual bool AllowsPowerIterationConvergence() const

Return whether the most recent acceleration update permits the owning power iteration solver to declare convergence.

Acceleration schemes can override this when a guarded or rejected update should force at least one additional transport iteration.

inline virtual std::string GetPowerIterationConvergenceInfo() const

Optional compact convergence information appended to the owning power iteration status line.

Acceleration schemes that gate convergence should expose the active gate here so users can tell why PI is still iterating.

inline const std::string &GetName() const

Public Static Functions

static InputParameters GetInputParameters()

Protected Functions

void NodallyAveragedPWLDVector(const std::vector<double> &input, std::vector<double> &output) const

Takes an input vector that is the local version of a PWLD discrete space and then makes it continuous by applying nodal averages.

void CopyOnlyPhi0(const std::vector<double> &phi_in, std::vector<double> &phi_local)

Copies only the scalar moments from an lbs primary flux moments vector.

void ProjectBackPhi0(const std::vector<double> &input, std::vector<double> &output) const

Copies back only the scalar moments to a lbs primary flux vector.

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

Appends an error if an AAH groupset does one sweep per iteration (unstable for this method).

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

Appends an error if the problem has more than one groupset.

Protected Attributes

DiscreteOrdinatesProblem &do_problem_

The associated DiscreteOrdinatesProblem problem.

const double l_abs_tol_

Absolute residual tolerance from parameters.

const unsigned int max_iters_

Maximum allowable iterations from parameters.

const bool verbose_

Verbosity flag from parameters.

const std::string petsc_options_

PETSc options from parameters.

const int pi_max_its_

Maximum inner power iteration count, from parameters.

const double pi_k_tol_

k-eigenvalue tolerance for inner power iterations, from parameters

const std::vector<LBSGroupset> &groupsets_

Groupsets from the LBSProblem.

LBSGroupset &front_gs_

Front groupset from the LBSProblem.

std::vector<double> &q_moments_local_

Source moments vector from the LBSProblem.

std::vector<double> &phi_old_local_

Last updated flux vector from the LBSProblem.

std::vector<double> &phi_new_local_

Newest updated flux vector from the LBSProblem.

PowerIterationKEigenSolver *solver_

Associated PI solver, filled during Initialize()

std::shared_ptr<SpatialDiscretization> pwlc_ptr_ = nullptr

Underlying continuous discretization, if needed.

GhostInfo ghost_info_

Ghost information, needed with a continuous discretization.

std::shared_ptr<DiffusionSolver> diffusion_solver_ = nullptr

Underlying diffusion solver.

Protected Static Functions

static std::vector<uint64_t> MakePWLDGhostIndices(const SpatialDiscretization &pwld, const UnknownManager &uk_man)
static GhostInfo MakePWLDGhostInfo(const SpatialDiscretization &pwld, const UnknownManager &uk_man)
struct GhostInfo

Public Members

std::shared_ptr<VectorGhostCommunicator> vector_ghost_communicator = nullptr
std::map<uint64_t, uint64_t> ghost_global_id_2_local_map