Chi-Tech
lbs::DiffusionDFEMSolver Class Reference

#include <lbsMIP_solver.h>

Inheritance diagram for lbs::DiffusionDFEMSolver:
lbs::LBSSolver chi_physics::Solver ChiObject

Public Member Functions

 DiffusionDFEMSolver (const chi::InputParameters &params)
 
 ~DiffusionDFEMSolver () override
 
void Initialize () override
 
void InitializeWGSSolvers () override
 
- Public Member Functions inherited from lbs::LBSSolver
 LBSSolver (const std::string &text_name)
 
 LBSSolver (const chi::InputParameters &params)
 
 LBSSolver (const LBSSolver &)=delete
 
LBSSolveroperator= (const LBSSolver &)=delete
 
virtual ~LBSSolver ()=default
 
size_t GetSourceEventTag () const
 
double LastRestartWrite () const
 
double & LastRestartWrite ()
 
lbs::OptionsOptions ()
 
const lbs::OptionsOptions () const
 
void SetOptions (const chi::InputParameters &params)
 
void SetBoundaryOptions (const chi::InputParameters &params)
 
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::SpatialDiscretizationSpatialDiscretization () const
 
const std::vector< UnitCellMatrices > & GetUnitCellMatrices () const
 
const chi_mesh::MeshContinuumGrid () const
 
const std::vector< lbs::CellLBSView > & GetCellTransportViews () const
 
std::map< uint64_t, BoundaryPreference > & BoundaryPreferences ()
 
const chi_math::UnknownManagerUnknownManager () 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 &params)
 
virtual ~Solver ()=default
 
std::string TextName () const
 
BasicOptionsGetBasicOptions ()
 
const BasicOptionsGetBasicOptions () const
 
std::vector< std::shared_ptr< FieldFunctionGridBased > > & GetFieldFunctions ()
 
const std::vector< std::shared_ptr< FieldFunctionGridBased > > & GetFieldFunctions () const
 
TimeStepperGetTimeStepper ()
 
const TimeStepperGetTimeStepper () const
 
virtual void Initialize ()
 
virtual void Execute ()
 
virtual void Step ()
 
virtual void Advance ()
 
virtual chi::ParameterBlock GetInfo (const chi::ParameterBlock &params) const
 
virtual void SetProperties (const chi::ParameterBlock &params)
 
chi::ParameterBlock GetInfoWithPreCheck (const chi::ParameterBlock &params) const
 
- Public Member Functions inherited from ChiObject
 ChiObject ()
 
 ChiObject (const chi::InputParameters &params)
 
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 ()
 

Data Fields

std::vector< MIPSolverPtrgs_mip_solvers_
 

Protected Types

typedef std::shared_ptr< acceleration::DiffusionMIPSolverMIPSolverPtr
 
- Protected Types inherited from lbs::LBSSolver
typedef chi_mesh::sweep_management::CellFaceNodalMapping CellFaceNodalMapping
 

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
 
- 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 inherited from lbs::LBSSolver
static void CleanUpWGDSA (LBSGroupset &groupset)
 
static void CleanUpTGDSA (LBSGroupset &groupset)
 
- Protected Attributes inherited from lbs::LBSSolver
size_t source_event_tag_ = 0
 
double last_restart_write_ = 0.0
 
lbs::Options options_
 
size_t num_moments_ = 0
 
size_t num_groups_ = 0
 
size_t num_precursors_ = 0
 
size_t max_precursors_per_material_ = 0
 
std::vector< LBSGroupgroups_
 
std::vector< LBSGroupsetgroupsets_
 
std::vector< PointSourcepoint_sources_
 
std::map< int, XSPtrmatid_to_xs_map_
 
std::map< int, IsotropicSrcPtrmatid_to_src_map_
 
std::shared_ptr< chi_math::SpatialDiscretizationdiscretization_ = nullptr
 
chi_mesh::MeshContinuumPtr grid_ptr_
 
std::vector< CellFaceNodalMappinggrid_nodal_mappings_
 
MPILocalCommSetPtr grid_local_comm_set_ = nullptr
 
GridFaceHistogramPtr grid_face_histogram_ = nullptr
 
std::vector< UnitCellMatricesunit_cell_matrices_
 
std::map< uint64_t, UnitCellMatricesunit_ghost_cell_matrices_
 
std::vector< lbs::CellLBSViewcell_transport_views_
 
std::map< uint64_t, BoundaryPreferenceboundary_preferences_
 
std::map< uint64_t, std::shared_ptr< SweepBndry > > sweep_boundaries_
 
chi_math::UnknownManager flux_moments_uk_man_
 
size_t max_cell_dof_count_ = 0
 
uint64_t local_node_count_ = 0
 
uint64_t glob_node_count_ = 0
 
std::vector< double > q_moments_local_
 
std::vector< double > ext_src_moments_local_
 
std::vector< double > phi_new_local_
 
std::vector< double > phi_old_local_
 
std::vector< std::vector< double > > psi_new_local_
 
std::vector< double > precursor_new_local_
 
SetSourceFunction active_set_source_function_
 
std::vector< AGSLinSolverPtrags_solvers_
 
std::vector< LinSolvePtrwgs_solvers_
 
AGSLinSolverPtr primary_ags_solver_
 
std::map< std::pair< size_t, size_t >, size_t > phi_field_functions_local_map_
 
size_t power_gen_fieldfunc_local_handle_ = 0
 
std::shared_ptr< const chi_math::TimeIntegrationtime_integration_ = nullptr
 
- Protected Attributes inherited from chi_physics::Solver
BasicOptions basic_options_
 
std::vector< std::shared_ptr< FieldFunctionGridBased > > field_functions_
 
std::shared_ptr< TimeSteppertimestepper_ = nullptr
 

Detailed Description

Definition at line 9 of file lbsMIP_solver.h.

Member Typedef Documentation

◆ MIPSolverPtr

Definition at line 12 of file lbsMIP_solver.h.

Constructor & Destructor Documentation

◆ DiffusionDFEMSolver()

lbs::DiffusionDFEMSolver::DiffusionDFEMSolver ( const chi::InputParameters params)
explicit

Definition at line 29 of file lbsMIP_solver.cc.

◆ ~DiffusionDFEMSolver()

lbs::DiffusionDFEMSolver::~DiffusionDFEMSolver ( )
override

Destructor to cleanup TGDSA

Definition at line 37 of file lbsMIP_solver.cc.

Member Function Documentation

◆ GetInputParameters()

chi::InputParameters lbs::DiffusionDFEMSolver::GetInputParameters ( )
static

Definition at line 16 of file lbsMIP_solver.cc.

◆ Initialize()

void lbs::DiffusionDFEMSolver::Initialize ( )
overridevirtual

Initializing.

Reimplemented from lbs::LBSSolver.

Definition at line 45 of file lbsMIP_solver.cc.

◆ InitializeWGSSolvers()

void lbs::DiffusionDFEMSolver::InitializeWGSSolvers ( )
overridevirtual

Initializes Within-GroupSet solvers.

Reimplemented from lbs::LBSSolver.

Definition at line 67 of file lbsMIP_solver.cc.

Field Documentation

◆ gs_mip_solvers_

std::vector<MIPSolverPtr> lbs::DiffusionDFEMSolver::gs_mip_solvers_

Definition at line 15 of file lbsMIP_solver.h.


The documentation for this class was generated from the following files: