Chi-Tech
lbs::SweepWGSContext< MatType, VecType, SolverType > Struct Template Reference

#include <sweep_wgs_context.h>

Inheritance diagram for lbs::SweepWGSContext< MatType, VecType, SolverType >:
lbs::WGSContext< MatType, VecType, SolverType > chi_math::LinearSolverContext< MatType, VecType >

Public Member Functions

 SweepWGSContext (DiscreteOrdinatesSolver &lbs_solver, LBSGroupset &groupset, const SetSourceFunction &set_source_function, int lhs_scope, int rhs_scope, bool log_info, std::shared_ptr< chi_mesh::sweep_management::SweepChunk > sweep_chunk)
 
void PreSetupCallback () override
 
void SetPreconditioner (SolverType &solver) override
 
std::pair< int64_t, int64_t > SystemSize () override
 
void ApplyInverseTransportOperator (int scope) override
 
void PostSolveCallback () override
 
void PreSetupCallback ()
 
void SetPreconditioner (KSP &solver)
 
std::pair< int64_t, int64_t > SystemSize ()
 
void ApplyInverseTransportOperator (int scope)
 
void PostSolveCallback ()
 
- Public Member Functions inherited from lbs::WGSContext< MatType, VecType, SolverType >
 WGSContext (LBSSolver &lbs_solver, LBSGroupset &groupset, const SetSourceFunction &set_source_function, int lhs_scope, int rhs_scope, bool log_info)
 
virtual void PreSetupCallback ()
 
virtual void SetPreconditioner (SolverType &solver)
 
virtual void PostSetupCallback ()
 
virtual void PreSolveCallback ()
 
int MatrixAction (MatType &matrix, VecType &action_vector, VecType &action) override
 
virtual std::pair< int64_t, int64_t > SystemSize ()=0
 
virtual void ApplyInverseTransportOperator (int scope)=0
 
virtual void PostSolveCallback ()
 
int MatrixAction (Mat &matrix, Vec &action_vector, Vec &action)
 
- Public Member Functions inherited from chi_math::LinearSolverContext< MatType, VecType >
virtual int MatrixAction (MatType &matrix, VecType &vector, VecType &action)
 
virtual ~LinearSolverContext ()=default
 

Data Fields

std::shared_ptr< chi_mesh::sweep_management::SweepChunksweep_chunk_
 
chi_mesh::sweep_management::SweepScheduler sweep_scheduler_
 
DiscreteOrdinatesSolverlbs_ss_solver_
 
- Data Fields inherited from lbs::WGSContext< MatType, VecType, SolverType >
LBSSolverlbs_solver_
 
LBSGroupsetgroupset_
 
const SetSourceFunctionset_source_function_
 
int lhs_src_scope_
 
int rhs_src_scope_
 
bool log_info_ = true
 
size_t counter_applications_of_inv_op_ = 0
 
- Data Fields inherited from chi_math::LinearSolverContext< MatType, VecType >
double rhs_norm = 0.0
 
double rhs_preconditioned_norm = 0.0
 
double custom_residual_scale = 1.0
 
ResidualScaleType residual_scale_type = ResidualScaleType::NONE
 

Detailed Description

template<class MatType, class VecType, class SolverType>
struct lbs::SweepWGSContext< MatType, VecType, SolverType >

Definition at line 15 of file sweep_wgs_context.h.

Constructor & Destructor Documentation

◆ SweepWGSContext()

template<class MatType , class VecType , class SolverType >
lbs::SweepWGSContext< MatType, VecType, SolverType >::SweepWGSContext ( DiscreteOrdinatesSolver lbs_solver,
LBSGroupset groupset,
const SetSourceFunction set_source_function,
int  lhs_scope,
int  rhs_scope,
bool  log_info,
std::shared_ptr< chi_mesh::sweep_management::SweepChunk sweep_chunk 
)
inline

Definition at line 22 of file sweep_wgs_context.h.

Member Function Documentation

◆ ApplyInverseTransportOperator() [1/2]

void lbs::SweepWGSContext< Mat, Vec, KSP >::ApplyInverseTransportOperator ( int  scope)
virtual

With a right-hand side built. This routine applies the inverse of the transport operator to this right-hand side.

Implements lbs::WGSContext< MatType, VecType, SolverType >.

Definition at line 107 of file sweep_wgs_context.cc.

◆ ApplyInverseTransportOperator() [2/2]

template<class MatType , class VecType , class SolverType >
void lbs::SweepWGSContext< MatType, VecType, SolverType >::ApplyInverseTransportOperator ( int  scope)
overridevirtual

This operation applies the inverse of the transform operator in the form Ay = x where the the vector x's underlying implementing is always LBS's q_moments_local vextor.

Implements lbs::WGSContext< MatType, VecType, SolverType >.

◆ PostSolveCallback() [1/2]

void lbs::SweepWGSContext< Mat, Vec, KSP >::PostSolveCallback ( )
virtual

This method implements an additional sweep for two reasons: The first is to compute balance parameters, and the second is to allow for the calculation of proper angular fluxes. The latter is needed because some krylov methods do not necessarily provide the true angular flux at each iteration.

Reimplemented from lbs::WGSContext< MatType, VecType, SolverType >.

Definition at line 130 of file sweep_wgs_context.cc.

◆ PostSolveCallback() [2/2]

template<class MatType , class VecType , class SolverType >
void lbs::SweepWGSContext< MatType, VecType, SolverType >::PostSolveCallback ( )
overridevirtual

◆ PreSetupCallback() [1/2]

void lbs::SweepWGSContext< Mat, Vec, KSP >::PreSetupCallback ( )
virtual

General print out of information.

Reimplemented from lbs::WGSContext< MatType, VecType, SolverType >.

Definition at line 21 of file sweep_wgs_context.cc.

◆ PreSetupCallback() [2/2]

template<class MatType , class VecType , class SolverType >
void lbs::SweepWGSContext< MatType, VecType, SolverType >::PreSetupCallback ( )
overridevirtual

◆ SetPreconditioner() [1/2]

void lbs::SweepWGSContext< Mat, Vec, KSP >::SetPreconditioner ( KSP &  solver)

Sets the preconditioner application function.

Definition at line 52 of file sweep_wgs_context.cc.

◆ SetPreconditioner() [2/2]

template<class MatType , class VecType , class SolverType >
void lbs::SweepWGSContext< MatType, VecType, SolverType >::SetPreconditioner ( SolverType solver)
overridevirtual

◆ SystemSize() [1/2]

std::pair< int64_t, int64_t > lbs::SweepWGSContext< Mat, Vec, KSP >::SystemSize ( )
virtual

For sweeping we add lagged angular fluxes to the size of the vectors.

Implements lbs::WGSContext< MatType, VecType, SolverType >.

Definition at line 72 of file sweep_wgs_context.cc.

◆ SystemSize() [2/2]

template<class MatType , class VecType , class SolverType >
std::pair< int64_t, int64_t > lbs::SweepWGSContext< MatType, VecType, SolverType >::SystemSize ( )
overridevirtual

Field Documentation

◆ lbs_ss_solver_

template<class MatType , class VecType , class SolverType >
DiscreteOrdinatesSolver& lbs::SweepWGSContext< MatType, VecType, SolverType >::lbs_ss_solver_

Definition at line 20 of file sweep_wgs_context.h.

◆ sweep_chunk_

template<class MatType , class VecType , class SolverType >
std::shared_ptr<chi_mesh::sweep_management::SweepChunk> lbs::SweepWGSContext< MatType, VecType, SolverType >::sweep_chunk_

Definition at line 17 of file sweep_wgs_context.h.

◆ sweep_scheduler_

template<class MatType , class VecType , class SolverType >
chi_mesh::sweep_management::SweepScheduler lbs::SweepWGSContext< MatType, VecType, SolverType >::sweep_scheduler_

Definition at line 18 of file sweep_wgs_context.h.


The documentation for this struct was generated from the following file: