Class CMFDAcceleration
Defined in File cmfd_acceleration.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public opensn::DiscreteOrdinatesKEigenAcceleration(Class DiscreteOrdinatesKEigenAcceleration)
Class Documentation
-
class CMFDAcceleration : public opensn::DiscreteOrdinatesKEigenAcceleration
Public Functions
-
explicit CMFDAcceleration(const InputParameters ¶ms)
-
~CMFDAcceleration() override
-
virtual void CheckRequirements(std::vector<std::string> &errors) const override
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.
-
virtual void Initialize() final
Initialization method for derived classes.
Must be overridden.
Called by the other Initialize() method that takes a solver.
-
virtual void PreExecute() final
Pre-execute method for derived classes.
Must be overridden.
Called by the owning solver at the beginning of its Execute().
-
virtual void PrePowerIteration() final
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() final
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 final
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.
-
virtual std::string GetPowerIterationConvergenceInfo() const final
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 virtual bool UsesSweepsPerUpdate() const final
Return whether this method runs the owning solver’s sweeps_per_update transport sweeps between its corrections.
Methods that return false ignore that setting.
-
inline const CMFDCoarseMesh &GetCoarseMesh() const
-
inline std::size_t GetNumCoarseCells() const
Global number of CMFD coarse cells; zero before Initialize().
-
std::vector<double> GetHomogenizedRemovalXS(uint64_t coarse_cell_global_id) const
Return the removal coefficients of the last assembled CMFD operator for one coarse cell.
Initialize(), which the owning solver calls at the start of each Execute(), assembles a volume-weighted operator; each active power iteration reassembles it from that iteration’s transport iterate before the correction is applied. Not collective.
- Parameters:
coarse_cell_global_id – Global id of a coarse cell owned by the calling rank.
- Throws:
std::invalid_argument – If the coarse cell is not owned by the calling rank.
std::logic_error – If called before Initialize().
- Returns:
One removal coefficient per CMFD energy group.
-
std::vector<double> GetHomogenizedDiffusionCoefficient(uint64_t coarse_cell_global_id) const
Return the diffusion coefficients of the last assembled CMFD operator for one coarse cell.
The operator lifecycle and exceptions are as for GetHomogenizedRemovalXS(). Not collective.
- Parameters:
coarse_cell_global_id – Global id of a coarse cell owned by the calling rank.
- Returns:
One diffusion coefficient per CMFD energy group.
-
std::vector<double> GetHomogenizedScatteringXS(uint64_t coarse_cell_global_id) const
Return the P0 transfer matrix of the last assembled CMFD operator for one coarse cell.
The operator lifecycle and exceptions are as for GetHomogenizedRemovalXS(). Not collective.
The matrix is condensed on demand from the cross-section objects of the last assembly, which the problem shares. Replacing the problem’s cross sections does not change it, but changing those objects in place does.
- Parameters:
coarse_cell_global_id – Global id of a coarse cell owned by the calling rank.
- Throws:
std::logic_error – If those objects no longer have the solver’s group count.
- Returns:
Row-major matrix whose entry [g, gp] is the transfer from coarse group gp to g. The diagonal is the within-group transfer, which the removal coefficient accounts for.
-
std::vector<double> GetHomogenizedProductionXS(uint64_t coarse_cell_global_id) const
Return the production matrix of the last assembled CMFD operator for one coarse cell.
The operator lifecycle and exceptions are as for GetHomogenizedRemovalXS(). Not collective.
The matrix is condensed on demand, as for GetHomogenizedScatteringXS().
- Parameters:
coarse_cell_global_id – Global id of a coarse cell owned by the calling rank.
- Throws:
std::logic_error – If those objects no longer have the solver’s group count.
- Returns:
Row-major matrix whose entry [g, gp] is the production in coarse group g per unit flux in coarse group gp, including delayed production when precursors are enabled.
-
inline unsigned int GetNumAppliedCorrections() const
Number of active CMFD corrections applied during the last power-iteration solve.
-
inline unsigned int GetNumSkippedCorrections() const
Number of active CMFD corrections skipped during the last power-iteration solve.
Public Static Functions
-
static InputParameters GetInputParameters()
-
static std::shared_ptr<CMFDAcceleration> Create(const ParameterBlock ¶ms)
-
explicit CMFDAcceleration(const InputParameters ¶ms)