#include <Solver_Fake.h>

Inheritance diagram for Solver_Fake:
Solver

A fake solver satisfying the Origen::Solver interface. More...

INTERFACE<<Origen::Solver>>

See Origen::Solver for details.

void set_continuous_loss (Vec_Dbl *lambda)
 
void set_transition_matrix (TransitionMatrixP *trx)
 
void set_source (Vec_Dbl *src)
 
void get_defaults (ScaleUtils::IO::DB &dc, bool force=false)
 
bool check_opts (ScaleUtils::IO::DB &dc, bool allow_missing=true)
 
void set_opts (const ScaleUtils::IO::DB &opts)
 
bool solve (const Vec_Dbl &in, double flux, double dt, Vec_Dbl *out)
 
const ScaleUtils::IO::DB & status () const
 
void clear ()
 

Public Member Functions

 Solver_Fake ()
 
virtual ~Solver_Fake ()
 

Private Member Functions

void set_continuous_loss_impl (Vec_Dbl *lambda)
 
void set_transition_matrix_impl (TransitionMatrixP *trx)
 
void set_source_impl (Vec_Dbl *src)
 
void set_opts_impl (const ScaleUtils::IO::DB &opts)
 
bool check_opts_impl (ScaleUtils::IO::DB &opts, bool allow_missing)
 
void get_defaults_impl (ScaleUtils::IO::DB &dc, const bool force)
 
bool solve_impl (const Vec_Dbl &in, double flux, double dt, Vec_Dbl *out)
 
const ScaleUtils::IO::DB & status_impl () const
 
void clear_impl ()
 

Private Attributes

Vec_Dbld_lambda
 
Vec_Dbld_src
 
TransitionMatrixPd_trx
 
ScaleUtils::IO::UP_DB d_status
 

Detailed Description

A fake solver satisfying the Origen::Solver interface.

See also
Origen::Solver
Examples:
tstMultiZoneDepleter.cpp, and tstSolver.cpp.

Constructor & Destructor Documentation

~Solver_Fake ( )
virtual

Member Function Documentation

void set_continuous_loss_impl ( Vec_Dbl lambda)
privatevirtual

Implements Solver.

References Solver_Fake::d_lambda.

void set_transition_matrix_impl ( TransitionMatrixP trx)
privatevirtual

Implements Solver.

References Solver_Fake::d_trx.

void set_source_impl ( Vec_Dbl src)
privatevirtual

Implements Solver.

References Solver_Fake::d_src.

void set_opts_impl ( const ScaleUtils::IO::DB &  opts)
privatevirtual

Implements Solver.

bool check_opts_impl ( ScaleUtils::IO::DB &  opts,
bool  allow_missing 
)
privatevirtual

Implements Solver.

void get_defaults_impl ( ScaleUtils::IO::DB &  dc,
const bool  force 
)
privatevirtual

Implements Solver.

bool solve_impl ( const Vec_Dbl in,
double  flux,
double  dt,
Vec_Dbl out 
)
privatevirtual
const ScaleUtils::IO::DB & status_impl ( ) const
privatevirtual

Implements Solver.

References Solver_Fake::d_status.

void clear_impl ( )
privatevirtual
void set_continuous_loss ( Vec_Dbl lambda)
inherited

Set continuous removal rates. The rates are defined by decays constants that decay the nuclide out of existence.

Parameters
[in]lambdaThe removal rates >= 0 [1/s] for each nuclide.
Examples:
tstSolver_cram.cpp, and tstSolver_matrex.cpp.

References Solver::set_continuous_loss_impl().

Referenced by Solver_Fake::clear_impl(), Solver_cram::clear_impl(), Solver_matrex::clear_impl(), and TEST().

void set_transition_matrix ( TransitionMatrixP trx)
inherited

Set an Origen TransitionMatrix (library data).

Parameters
[in]trxOrigen::TransitionMatrix containing the library data.
Examples:
exNEAMS.cpp, tstSolver_cram.cpp, and tstSolver_matrex.cpp.

References Solver::set_transition_matrix_impl().

Referenced by Solver_Fake::clear_impl(), Solver_cram::clear_impl(), Solver_matrex::clear_impl(), and TEST().

void set_source ( Vec_Dbl src)
inherited

Set constant source term.

Parameters
[in]srcThe source terms for each nuclide [(units of n0 in Solver::solve()) per second].
Examples:
tstSolver_cram.cpp, and tstSolver_matrex.cpp.

References Solver::set_source_impl().

Referenced by Solver_Fake::clear_impl(), Solver_cram::clear_impl(), Solver_matrex::clear_impl(), and TEST().

void get_defaults ( ScaleUtils::IO::DB &  dc,
bool  force = false 
)
inherited

Get default solver opts.

Note
The options are solver specific. See the appropriate solver subclass for list of opts.
Parameters
[out]dcA SCALE DataContainer where to write the opts.
[in]forceIf true, any values already in dc will be overwritten. If false, only parameters without any value in dc are set. Optional (default = false).
Examples:
tstSolver_cram.cpp, and tstSolver_matrex.cpp.

References Solver::get_defaults_impl().

Referenced by Solver_cram::clear_impl(), Solver_matrex::clear_impl(), Solver_cram::Solver_cram(), Solver_matrex::Solver_matrex(), and TEST().

bool check_opts ( ScaleUtils::IO::DB &  opts,
bool  allow_missing = true 
)
inherited

Check that a set of solver options is valid. This does not quarantee that the results will be accurate, only that the solver can be run with the opts.

Note
The options are solver specific. See the appropriate solver subclass for list of opts.
Parameters
[in,out]optsIn: the solver opts. out: any error messages about the opts.
[in]allow_missingWhether opts is allowed to miss options without prompting an error. Optional (default = true).
Returns
true if the check is passed, false if the check fails.
Note
Any errors will be written to opts.
Examples:
tstSolver_cram.cpp, and tstSolver_matrex.cpp.

References Solver::check_opts_impl().

Referenced by Solver_cram::set_opts_impl(), Solver_matrex::set_opts_impl(), Solver_cram::solve_impl(), Solver_matrex::solve_impl(), and TEST().

void set_opts ( const ScaleUtils::IO::DB &  dc)
inherited

Set solver opts. Dies if you try to set incorrect values, so use Solver::check_opts() first if you want to be sure. Any options that are not specified in opts will be left to their earlier values (all are set to defaults by the constructor and by Solver::clear().

Note
The options are solver specific. See the appropriate solver subclass for list of opts.
Parameters
[in]dcThe new solver opts. Any option not specified will be left untouched.
Examples:
tstSolver_cram.cpp, and tstSolver_matrex.cpp.

References Solver::set_opts_impl().

Referenced by TEST().

bool solve ( const Vec_Dbl in,
double  flux,
double  dt,
Vec_Dbl out 
)
inherited

Perform a single depletion calculation. TransitionMatrix must be set.

Note
Concentration units. "in" can have any units directly proportional to the number of atoms. The solver does not care about scaling. "out" will be in the same units. Make sure that the source term is in the correct units. Valid units include [1], [1/cm3], [1/bcm], [mol], etc.
Parameters
[in]inInitial concentrations or abundances [see the note].
[in]fluxNeutron flux density [1/cm2s].
[in]dtStep length [s].
[out]outFinal concentrations or abundances [same units as "in"].
Returns
true on success or false on failure.
Examples:
exNEAMS.cpp, tstSolver.cpp, tstSolver_cram.cpp, and tstSolver_matrex.cpp.

References Solver::solve_impl().

Referenced by TEST().

const ScaleUtils::IO::DB & status ( ) const
inherited

Return current solver options and possible error messages from Solver::solve(). Note, however, that the solver kernels do not actually send any error messages as of yet and instead terminate the process.

Note
The options are solver specific. See the appropriate solver subclass for list of opts.
Returns
the options and error messages.
Examples:
tstSolver_cram.cpp, and tstSolver_matrex.cpp.

References Solver::status_impl().

Referenced by TEST().

void clear ( )
inherited

Clear all data returning the solver option to the state it had right after constructor. All solver options get default values.

Note
This never needs to be called for memory management or other similar reasons.
Examples:
exNEAMS.cpp.

References Solver::clear_impl().

Referenced by TEST().

Member Data Documentation

ScaleUtils::IO::UP_DB d_status
private

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