MURE
Loading...
Searching...
No Matches
BatemanSolver.hxx
Go to the documentation of this file.
1/*
2 This file is part of MURE,
3 Copyright (C) 2007-2021 MURE developers.
4
5 MURE is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 MURE is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with MURE. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef _BatemanSolver_
20#define _BatemanSolver_
21#include <iosfwd>
27using namespace std;
28
29//-----------------------------------------------------------------------------//
30
32// matrix exponential method
42//________________________________________________________________________
43
45{
46 public:
48 BatemanSolver(const BatemanSolver &BS);
49 virtual ~BatemanSolver();
50
56
65 virtual void Solve(double *N0, double **Matrix, int N, double t1, double t2) = 0;
66
68 {
69 return fNVar;
70 }
72 {
73 fNVar = N;
74 }
75
76 void SetPrecision(double eps = 1e-5)
77 {
78 fPrecision = eps;
79 }
80
82
89 {
91 }
93
95
101 void SetXe135EquilibriumIndex(int Te135, int I135, int Xe135)
102 {
103 fIdxTe135 = Te135;
104 fIdxI135 = I135;
105 fIdxXe135 = Xe135;
106 }
107
108 protected:
109 int fNVar;
110 double fPrecision;
111 double fTmin;
116};
117#endif
Base class of Bateman-type solvers like Runge-Kutta or CRAM or any other.
Definition BatemanSolver.hxx:45
void SetXe135EquilibriumIndex(int Te135, int I135, int Xe135)
Set index (position) in EvolvingSystem::fEvolvingAtoms vector for Te-135, I-135 and Xe-135.
Definition BatemanSolver.hxx:101
void SetPrecision(double eps=1e-5)
Definition BatemanSolver.hxx:76
double fTmin
The lowest value of the decay constant considered.
Definition BatemanSolver.hxx:111
void SetForbidNegativeValue()
Forbid negative value during integration.
Definition BatemanSolver.hxx:88
void SetNumberOfEquations(int N)
Definition BatemanSolver.hxx:71
virtual ~BatemanSolver()
Destructor.
Definition BatemanSolver.cxx:55
int fIdxTe135
index of Te-135 in the fEvolvingAtoms array
Definition BatemanSolver.hxx:113
int fIdxI135
index of I-135 in the fEvolvingAtoms array
Definition BatemanSolver.hxx:114
int fIdxXe135
index of Xe-135 in the fEvolvingAtoms array
Definition BatemanSolver.hxx:115
int GetNumberOfEquationSize()
Definition BatemanSolver.hxx:67
BatemanSolver()
Normal constructor.
Definition BatemanSolver.cxx:32
int fNVar
The size of the composition vector and /or number of ZAIs involved.
Definition BatemanSolver.hxx:109
virtual void Solve(double *N0, double **Matrix, int N, double t1, double t2)=0
Abstract method to Solve Bateman equation : must be overriden.
bool fIsNegativeValueAllowed
Definition BatemanSolver.hxx:112
double fPrecision
Precision of the solution.
Definition BatemanSolver.hxx:110
the namespace of the Standard C++

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