MURE
Loading...
Searching...
No Matches
Public Member Functions | List of all members
BatemanSolver Class Referenceabstract

Base class of Bateman-type solvers like Runge-Kutta or CRAM or any other. More...

#include <BatemanSolver.hxx>

Inheritance diagram for BatemanSolver:
CRAMSolver RKSolver

Public Member Functions

 BatemanSolver ()
 Normal constructor.
 
 BatemanSolver (const BatemanSolver &BS)
 Copy constructor.
 
virtual ~BatemanSolver ()
 Destructor.
 

Mains methods of the BatemanSolver

int fNVar
 The size of the composition vector and /or number of ZAIs involved.
 
double fPrecision
 Precision of the solution.
 
double fTmin
 The lowest value of the decay constant considered.
 
bool fIsNegativeValueAllowed
 
int fIdxTe135
 index of Te-135 in the fEvolvingAtoms array
 
int fIdxI135
 index of I-135 in the fEvolvingAtoms array
 
int fIdxXe135
 index of Xe-135 in the fEvolvingAtoms array
 
virtual void Solve (double *N0, double **Matrix, int N, double t1, double t2)=0
 Abstract method to Solve Bateman equation : must be overriden.
 
int GetNumberOfEquationSize ()
 
void SetNumberOfEquations (int N)
 
void SetPrecision (double eps=1e-5)
 
void SetForbidNegativeValue ()
 Forbid negative value during integration.
 
void SetXe135EquilibriumIndex (int Te135, int I135, int Xe135)
 Set index (position) in EvolvingSystem::fEvolvingAtoms vector for Te-135, I-135 and Xe-135.
 

Detailed Description

Base class of Bateman-type solvers like Runge-Kutta or CRAM or any other.

This class is a base class thatsolves system of 1st order of differential equations.

\[ \frac{d\vec{Y}}{dt}=A\vec{Y}\]

The differential equations are built in RKSolver::BuildEqns or CRAM::BuildEqns ; the method MUST be defined in the derived classes.

Author
kernie
Version
1.0

Constructor & Destructor Documentation

◆ BatemanSolver() [1/2]

BatemanSolver::BatemanSolver ( )

Normal constructor.

◆ BatemanSolver() [2/2]

BatemanSolver::BatemanSolver ( const BatemanSolver BS)

Copy constructor.

◆ ~BatemanSolver()

BatemanSolver::~BatemanSolver ( )
virtual

Destructor.

Member Function Documentation

◆ GetNumberOfEquationSize()

int BatemanSolver::GetNumberOfEquationSize ( )
inline

< return the number of equations.

◆ SetForbidNegativeValue()

void BatemanSolver::SetForbidNegativeValue ( )
inline

Forbid negative value during integration.

For some quantities (such as nuclei composition), negative values are forbidden. But, due to integration step and very fast variation of the integrated variables Runge-Kutta wil produce very small negative value. This method is used to force negative value to be zero.

< set to zero if negative

◆ SetNumberOfEquations()

void BatemanSolver::SetNumberOfEquations ( int  N)
inline

◆ SetPrecision()

void BatemanSolver::SetPrecision ( double  eps = 1e-5)
inline

< set RK precision to change the integration step

◆ SetXe135EquilibriumIndex()

void BatemanSolver::SetXe135EquilibriumIndex ( int  Te135,
int  I135,
int  Xe135 
)
inline

Set index (position) in EvolvingSystem::fEvolvingAtoms vector for Te-135, I-135 and Xe-135.

These index are used in RKSolver and set in EvolutiveSystem

Parameters
Te135: position of the Te-135 in EvolvingSystem::fEvolvingAtoms
I135: position of the I-135 in EvolvingSystem::fEvolvingAtoms
Xe135: position of the Xe-135 in EvolvingSystem::fEvolvingAtoms

◆ Solve()

virtual void BatemanSolver::Solve ( double *  N0,
double **  Matrix,
int  N,
double  t1,
double  t2 
)
pure virtual

Abstract method to Solve Bateman equation : must be overriden.

For a given vector

\[\vec{N_0}\]

of initial composition and a given matrix NxN, integrate Bateman equation from t1 to t2.

Parameters
N0: initial composition vector
Matrix: matrix of Bateman eqs
N: initial composition vector
t1: initial time
t2: final time

Implemented in CRAMSolver, and RKSolver.

Member Data Documentation

◆ fIdxI135

int BatemanSolver::fIdxI135
protected

index of I-135 in the fEvolvingAtoms array

◆ fIdxTe135

int BatemanSolver::fIdxTe135
protected

index of Te-135 in the fEvolvingAtoms array

◆ fIdxXe135

int BatemanSolver::fIdxXe135
protected

index of Xe-135 in the fEvolvingAtoms array

◆ fIsNegativeValueAllowed

bool BatemanSolver::fIsNegativeValueAllowed
protected

◆ fNVar

int BatemanSolver::fNVar
protected

The size of the composition vector and /or number of ZAIs involved.

◆ fPrecision

double BatemanSolver::fPrecision
protected

Precision of the solution.

◆ fTmin

double BatemanSolver::fTmin
protected

The lowest value of the decay constant considered.


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

MURE Project, documentation generated by Doxygen 1.9.7 - Fri Jan 19 2024