Chi-Tech
|
#include <lbs_discrete_ordinates_solver.h>
Public Member Functions | |
DiscreteOrdinatesSolver (const chi::InputParameters ¶ms) | |
const std::string & | SweepType () const |
virtual | ~DiscreteOrdinatesSolver () override |
std::pair< size_t, size_t > | GetNumPhiIterativeUnknowns () override |
void | Initialize () override |
void | ScalePhiVector (PhiSTLOption which_phi, double value) override |
void | SetGSPETScVecFromPrimarySTLvector (LBSGroupset &groupset, Vec x, PhiSTLOption which_phi) override |
void | SetPrimarySTLvectorFromGSPETScVec (LBSGroupset &groupset, Vec x_src, PhiSTLOption which_phi) override |
void | GSScopedCopyPrimarySTLvectors (LBSGroupset &groupset, PhiSTLOption from_which_phi, PhiSTLOption to_which_phi) override |
void | SetMultiGSPETScVecFromPrimarySTLvector (const std::vector< int > &gs_ids, Vec x, PhiSTLOption which_phi) override |
void | SetPrimarySTLvectorFromMultiGSPETScVecFrom (const std::vector< int > &gs_ids, Vec x_src, PhiSTLOption which_phi) override |
void | ZeroOutflowBalanceVars (LBSGroupset &groupset) |
void | ComputeBalance () |
std::vector< double > | ComputeLeakage (int groupset_id, uint64_t boundary_id) const |
Public Member Functions inherited from lbs::LBSSolver | |
LBSSolver (const std::string &text_name) | |
LBSSolver (const chi::InputParameters ¶ms) | |
LBSSolver (const LBSSolver &)=delete | |
LBSSolver & | operator= (const LBSSolver &)=delete |
virtual | ~LBSSolver ()=default |
size_t | GetSourceEventTag () const |
double | LastRestartWrite () const |
double & | LastRestartWrite () |
lbs::Options & | Options () |
const lbs::Options & | Options () const |
void | SetOptions (const chi::InputParameters ¶ms) |
void | SetBoundaryOptions (const chi::InputParameters ¶ms) |
size_t | NumMoments () const |
size_t | NumGroups () const |
size_t | NumPrecursors () const |
size_t | GetMaxPrecursorsPerMaterial () const |
void | AddGroup (int id) |
const std::vector< LBSGroup > & | Groups () const |
void | AddGroupset () |
std::vector< LBSGroupset > & | Groupsets () |
const std::vector< LBSGroupset > & | Groupsets () const |
void | AddPointSource (PointSource psrc) |
void | ClearPointSources () |
const std::vector< PointSource > & | PointSources () const |
const std::map< int, XSPtr > & | GetMatID2XSMap () const |
const std::map< int, IsotropicSrcPtr > & | GetMatID2IsoSrcMap () const |
const chi_math::SpatialDiscretization & | SpatialDiscretization () const |
const std::vector< UnitCellMatrices > & | GetUnitCellMatrices () const |
const chi_mesh::MeshContinuum & | Grid () const |
const std::vector< lbs::CellLBSView > & | GetCellTransportViews () const |
std::map< uint64_t, BoundaryPreference > & | BoundaryPreferences () |
const chi_math::UnknownManager & | UnknownManager () const |
size_t | LocalNodeCount () const |
size_t | GlobalNodeCount () const |
std::vector< double > & | QMomentsLocal () |
const std::vector< double > & | QMomentsLocal () const |
std::vector< double > & | ExtSrcMomentsLocal () |
const std::vector< double > & | ExtSrcMomentsLocal () const |
std::vector< double > & | PhiOldLocal () |
const std::vector< double > & | PhiOldLocal () const |
std::vector< double > & | PhiNewLocal () |
const std::vector< double > & | PhiNewLocal () const |
std::vector< double > & | PrecursorsNewLocal () |
const std::vector< double > & | PrecursorsNewLocal () const |
std::vector< VecDbl > & | PsiNewLocal () |
const std::vector< VecDbl > & | PsiNewLocal () const |
const std::map< uint64_t, std::shared_ptr< SweepBndry > > & | SweepBoundaries () const |
SetSourceFunction | GetActiveSetSourceFunction () const |
AGSLinSolverPtr | GetPrimaryAGSSolver () |
std::vector< LinSolvePtr > & | GetWGSSolvers () |
WGSContext< Mat, Vec, KSP > & | GetWGSContext (int groupset_id) |
virtual std::pair< size_t, size_t > | GetNumPhiIterativeUnknowns () |
size_t | MapPhiFieldFunction (size_t g, size_t m) const |
size_t | GetHandleToPowerGenFieldFunc () const |
void | Initialize () override |
void | InitMaterials () |
void | InitializePointSources () |
void | InitWGDSA (LBSGroupset &groupset, bool vaccum_bcs_are_dirichlet=true) |
std::vector< double > | WGSCopyOnlyPhi0 (const LBSGroupset &groupset, const std::vector< double > &phi_in) |
void | GSProjectBackPhi0 (const LBSGroupset &groupset, const std::vector< double > &input, std::vector< double > &output) |
void | AssembleWGDSADeltaPhiVector (const LBSGroupset &groupset, const std::vector< double > &phi_in, std::vector< double > &delta_phi_local) |
void | DisAssembleWGDSADeltaPhiVector (const LBSGroupset &groupset, const std::vector< double > &delta_phi_local, std::vector< double > &ref_phi_new) |
void | AssembleTGDSADeltaPhiVector (const LBSGroupset &groupset, const std::vector< double > &phi_in, std::vector< double > &delta_phi_local) |
void | DisAssembleTGDSADeltaPhiVector (const LBSGroupset &groupset, const std::vector< double > &delta_phi_local, std::vector< double > &ref_phi_new) |
void | WriteRestartData (const std::string &folder_name, const std::string &file_base) |
void | ReadRestartData (const std::string &folder_name, const std::string &file_base) |
void | WriteGroupsetAngularFluxes (const LBSGroupset &groupset, const std::string &file_base) |
void | ReadGroupsetAngularFluxes (LBSGroupset &groupset, const std::string &file_base) |
std::vector< double > | MakeSourceMomentsFromPhi () |
void | WriteFluxMoments (const std::string &file_base, const std::vector< double > &flux_moments) |
void | ReadFluxMoments (const std::string &file_base, std::vector< double > &flux_moments, bool single_file=false) |
void | UpdateFieldFunctions () |
void | SetPhiFromFieldFunctions (PhiSTLOption which_phi, const std::vector< size_t > &m_indices, const std::vector< size_t > &g_indices) |
double | ComputeFissionProduction (const std::vector< double > &phi) |
double | ComputeFissionRate (const std::vector< double > &phi) |
void | ComputePrecursors () |
virtual void | SetPhiVectorScalarValues (std::vector< double > &phi_vector, double value) |
virtual void | ScalePhiVector (PhiSTLOption which_phi, double value) |
virtual void | SetGSPETScVecFromPrimarySTLvector (LBSGroupset &groupset, Vec x, PhiSTLOption which_phi) |
virtual void | SetPrimarySTLvectorFromGSPETScVec (LBSGroupset &groupset, Vec x_src, PhiSTLOption which_phi) |
virtual void | GSScopedCopyPrimarySTLvectors (LBSGroupset &groupset, const std::vector< double > &x_src, std::vector< double > &y) |
virtual void | GSScopedCopyPrimarySTLvectors (LBSGroupset &groupset, PhiSTLOption from_which_phi, PhiSTLOption to_which_phi) |
virtual void | SetGroupScopedPETScVecFromPrimarySTLvector (int first_group_id, int last_group_id, Vec x, const std::vector< double > &y) |
virtual void | SetPrimarySTLvectorFromGroupScopedPETScVec (int first_group_id, int last_group_id, Vec x_src, std::vector< double > &y) |
virtual void | SetMultiGSPETScVecFromPrimarySTLvector (const std::vector< int > &gs_ids, Vec x, PhiSTLOption which_phi) |
virtual void | SetPrimarySTLvectorFromMultiGSPETScVecFrom (const std::vector< int > &gs_ids, Vec x_src, PhiSTLOption which_phi) |
Public Member Functions inherited from chi_physics::Solver | |
Solver (std::string in_text_name) | |
Solver (std::string in_text_name, std::initializer_list< BasicOption > in_options) | |
Solver (const chi::InputParameters ¶ms) | |
virtual | ~Solver ()=default |
std::string | TextName () const |
BasicOptions & | GetBasicOptions () |
const BasicOptions & | GetBasicOptions () const |
std::vector< std::shared_ptr< FieldFunctionGridBased > > & | GetFieldFunctions () |
const std::vector< std::shared_ptr< FieldFunctionGridBased > > & | GetFieldFunctions () const |
TimeStepper & | GetTimeStepper () |
const TimeStepper & | GetTimeStepper () const |
virtual void | Initialize () |
virtual void | Execute () |
virtual void | Step () |
virtual void | Advance () |
virtual chi::ParameterBlock | GetInfo (const chi::ParameterBlock ¶ms) const |
virtual void | SetProperties (const chi::ParameterBlock ¶ms) |
chi::ParameterBlock | GetInfoWithPreCheck (const chi::ParameterBlock ¶ms) const |
Public Member Functions inherited from ChiObject | |
ChiObject () | |
ChiObject (const chi::InputParameters ¶ms) | |
void | SetStackID (size_t stack_id) |
size_t | StackID () const |
virtual void | PushOntoStack (std::shared_ptr< ChiObject > &new_object) |
virtual | ~ChiObject ()=default |
Static Public Member Functions | |
static chi::InputParameters | GetInputParameters () |
Static Public Member Functions inherited from lbs::LBSSolver | |
static chi::InputParameters | GetInputParameters () |
static chi::InputParameters | OptionsBlock () |
static chi::InputParameters | BoundaryOptionsBlock () |
Static Public Member Functions inherited from chi_physics::Solver | |
static chi::InputParameters | GetInputParameters () |
Static Public Member Functions inherited from ChiObject | |
static chi::InputParameters | GetInputParameters () |
Protected Types | |
typedef chi_mesh::sweep_management::SweepChunk | SweepChunk |
typedef std::shared_ptr< chi_math::AngularQuadrature > | AngQuadPtr |
typedef std::pair< UniqueSOGroupings, DirIDToSOMap > | SwpOrderGroupingInfo |
typedef std::shared_ptr< chi_mesh::sweep_management::SPDS > | SPDS_ptr |
typedef std::vector< SPDS_ptr > | SPDS_ptrs |
typedef chi_mesh::sweep_management::FLUDSCommonData | FLUDSCommonData |
typedef std::unique_ptr< FLUDSCommonData > | FLUDSCommonDataPtr |
typedef std::vector< FLUDSCommonDataPtr > | FLUDSCommonDataPtrs |
Protected Types inherited from lbs::LBSSolver | |
typedef chi_mesh::sweep_management::CellFaceNodalMapping | CellFaceNodalMapping |
Protected Member Functions | |
DiscreteOrdinatesSolver (const std::string &text_name) | |
void | InitializeWGSSolvers () override |
void | InitializeSweepDataStructures () |
void | InitFluxDataStructures (LBSGroupset &groupset) |
void | ResetSweepOrderings (LBSGroupset &groupset) |
virtual std::shared_ptr< SweepChunk > | SetSweepChunk (LBSGroupset &groupset) |
Protected Member Functions inherited from lbs::LBSSolver | |
virtual void | PerformInputChecks () |
void | PrintSimHeader () |
virtual void | InitializeSpatialDiscretization () |
void | ComputeUnitIntegrals () |
void | InitializeGroupsets () |
void | ComputeNumberOfMoments () |
virtual void | InitializeParrays () |
void | InitializeFieldFunctions () |
void | InitializeBoundaries () |
virtual void | InitializeSolverSchemes () |
virtual void | InitializeWGSSolvers () |
void | InitTGDSA (LBSGroupset &groupset) |
Static Protected Member Functions | |
static std::pair< UniqueSOGroupings, DirIDToSOMap > | AssociateSOsAndDirections (const chi_mesh::MeshContinuum &grid, const chi_math::AngularQuadrature &quadrature, AngleAggregationType agg_type, lbs::GeometryType lbs_geo_type) |
Static Protected Member Functions inherited from lbs::LBSSolver | |
static void | CleanUpWGDSA (LBSGroupset &groupset) |
static void | CleanUpTGDSA (LBSGroupset &groupset) |
Additional Inherited Members | |
Public Types inherited from lbs::LBSSolver | |
typedef std::shared_ptr< AGSLinearSolver< Mat, Vec, KSP > > | AGSLinSolverPtr |
typedef std::shared_ptr< chi_math::LinearSolver< Mat, Vec, KSP > > | LinSolvePtr |
Base class for Discrete Ordinates solvers. This class mostly establishes utilities related to sweeping. From here we can derive a steady-state, transient, adjoint, and k-eigenvalue solver.
Definition at line 14 of file lbs_discrete_ordinates_solver.h.
|
protected |
Definition at line 19 of file lbs_discrete_ordinates_solver.h.
|
protected |
Definition at line 26 of file lbs_discrete_ordinates_solver.h.
|
protected |
Definition at line 27 of file lbs_discrete_ordinates_solver.h.
|
protected |
Definition at line 28 of file lbs_discrete_ordinates_solver.h.
|
protected |
Definition at line 23 of file lbs_discrete_ordinates_solver.h.
|
protected |
Definition at line 24 of file lbs_discrete_ordinates_solver.h.
Definition at line 17 of file lbs_discrete_ordinates_solver.h.
|
protected |
Definition at line 21 of file lbs_discrete_ordinates_solver.h.
|
explicit |
Static registration based constructor.
Definition at line 41 of file lbsDO_00_constrdestraccesors.cc.
|
explicitprotected |
Definition at line 10 of file lbsDO_00_constrdestraccesors.cc.
|
overridevirtual |
Destructor for LBS
Definition at line 51 of file lbsDO_00_constrdestraccesors.cc.
|
staticprotected |
This routine groups angle-indices to groups sharing the same sweep ordering. It also takes geometry into account.
Lambda to convert indices and push it onto unq_so_grps.
Definition at line 41 of file lbsDO_sweepdata_00a_assSOs.cc.
void lbs::DiscreteOrdinatesSolver::ComputeBalance | ( | ) |
Compute balance.
Definition at line 23 of file lbsDO_balance.cc.
std::vector< double > lbs::DiscreteOrdinatesSolver::ComputeLeakage | ( | int | groupset_id, |
uint64_t | boundary_id | ||
) | const |
Computes the angular flux based leakage from boundary surfaces.
groupset_id | The groupset for which to compute the leakage. |
boundary_id | uint64_t The boundary-id for which to perform the integration. |
Definition at line 11 of file lbsDO_compute_leakage.cc.
|
static |
Definition at line 16 of file lbsDO_00_constrdestraccesors.cc.
|
overridevirtual |
Gets the local and global number of iterative unknowns. This normally is only the flux moments, however, the sweep based solvers might include delayed angular fluxes in this number.
Reimplemented from lbs::LBSSolver.
Definition at line 66 of file lbsDO_00_constrdestraccesors.cc.
|
overridevirtual |
Assembles a vector for a given groupset from a source vector.
Reimplemented from lbs::LBSSolver.
Definition at line 153 of file lbsDO_07_vectorassembly.cc.
|
protected |
Initializes fluds_ data structures.
Definition at line 26 of file lbsDO_sweepdata_00b_initFLUDS.cc.
|
overridevirtual |
Initialize the solver.
Reimplemented from lbs::LBSSolver.
Reimplemented in lbs::DiscreteOrdinatesAdjointSolver.
Definition at line 14 of file lbsDO_01_main_initialize.cc.
|
protected |
This routine initializes basic sweep datastructures that are agnostic of the number of groups and essentially the groupsets. The routine rebuilds the data structures i) quadrature_unq_so_grouping_map_
, ii) quadrature_spds_map_
and iii) quadrature_fluds_templates_map_
. i) is a mapping, per quadrature, to a collection of angle-index-sets where all the angles in a particular angleset share the same sweep ordering. ii) is a mapping, per quadrature, to a collection of SPDSs where each SPDS mirrors an angle-index-set in i) iii) is again a mapping, per quadrature, to a collection of Template FLUDS where each FLUDS mirrors a SPDS in ii).
The Template FLUDS can be scaled with number of angles and groups which provides us with the angle-set-subset- and groupset-subset capability.
Definition at line 42 of file lbsDO_sweepdata_00.cc.
|
overrideprotectedvirtual |
Initializes Within-GroupSet solvers.
Reimplemented from lbs::LBSSolver.
Definition at line 41 of file lbsDO_01_main_initialize.cc.
|
protected |
Clears all the sweep orderings for a groupset in preperation for another.
Definition at line 16 of file lbsDO_sweepdata_00c_cleanup.cc.
|
overridevirtual |
Scales a flux moment vector. For sweep methods the delayed angular fluxes will also be scaled.
Reimplemented from lbs::LBSSolver.
Definition at line 9 of file lbsDO_07_vectorassembly.cc.
|
overridevirtual |
Assembles a vector for a given groupset from a source vector.
Reimplemented from lbs::LBSSolver.
Definition at line 46 of file lbsDO_07_vectorassembly.cc.
|
overridevirtual |
Assembles a PETSc vector from multiple groupsets.
Reimplemented from lbs::LBSSolver.
Definition at line 206 of file lbsDO_07_vectorassembly.cc.
|
overridevirtual |
Assembles a vector for a given groupset from a source vector.
Reimplemented from lbs::LBSSolver.
Definition at line 100 of file lbsDO_07_vectorassembly.cc.
|
overridevirtual |
Disassembles a multiple Groupset PETSc vector STL vectors.
Reimplemented from lbs::LBSSolver.
Definition at line 265 of file lbsDO_07_vectorassembly.cc.
|
protectedvirtual |
Sets up the sweek chunk for the given discretization method.
Reimplemented in lbs::DiscreteOrdinatesCurvilinearSolver.
Definition at line 13 of file lbsDO_sweepdata_00d_setswpchunk.cc.
|
inline |
Definition at line 46 of file lbs_discrete_ordinates_solver.h.
void lbs::DiscreteOrdinatesSolver::ZeroOutflowBalanceVars | ( | LBSGroupset & | groupset | ) |
Zeroes all the outflow data-structures required to compute balance.
Definition at line 14 of file lbsDO_balance.cc.
|
protected |
Definition at line 33 of file lbs_discrete_ordinates_solver.h.
|
protected |
Definition at line 32 of file lbs_discrete_ordinates_solver.h.
|
protected |
Definition at line 31 of file lbs_discrete_ordinates_solver.h.
|
protected |
Definition at line 36 of file lbs_discrete_ordinates_solver.h.
|
protected |
Definition at line 35 of file lbs_discrete_ordinates_solver.h.