MURE
Loading...
Searching...
No Matches
NuclearChart.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 _NuclearChart_
20#define _NuclearChart_
21
27#include <fstream> // for std
28#include <map> // for map, map<>::mapped_type
29#include <string> // for string
30#include <vector> // for vector
31
32using namespace std;
33
35
48{
49 public:
51 NuclearChart(string Name = "test", int maxN = 170, int maxZ = 120);
54
59 void setval(int inpN, int inpZ, float val)
60 {
61 if ((inpN < fMaxN) && (inpZ < fMaxZ))
62 {
63 fMendeleiev[inpN][inpZ] = val;
64 }
65 }
67
71 float getval(int inpN, int inpZ)
72 {
73 if ((inpN < fMaxN) && (inpZ < fMaxZ))
74 {
75 return fMendeleiev[inpN][inpZ];
76 }
77 else
78 {
79 return ( - 1);
80 }
81 }
82 void DumpChart();
83 void DumpDriplines();
84
85 private:
86 string fName;
87 map < int, map < int, float > > fMendeleiev;
88 int fMaxZ;
89 int fMaxN;
90 vector < float > fBuffer;
91
92};
93#endif
A NuclearChart is a 2 dimensional array of nuclei up to maximum N &Z.
Definition NuclearChart.hxx:48
void DumpDriplines()
Dump drip lines.
Definition NuclearChart.cxx:82
void DumpChart()
Dump the Mendelev matrix.
Definition NuclearChart.cxx:60
void setval(int inpN, int inpZ, float val)
Give a value to the Mendeleiev Matrix.
Definition NuclearChart.hxx:59
vector< float > fBuffer
a buffer to write
Definition NuclearChart.hxx:90
string fName
file name where to write
Definition NuclearChart.hxx:86
float getval(int inpN, int inpZ)
returns the value of the Medelev Matrix
Definition NuclearChart.hxx:71
~NuclearChart()
Definition NuclearChart.cxx:53
int fMaxN
Maximum N value of the matrix.
Definition NuclearChart.hxx:89
map< int, map< int, float > > fMendeleiev
matrix of all nuclei
Definition NuclearChart.hxx:87
int fMaxZ
Maximum Z value of the matrix.
Definition NuclearChart.hxx:88
the namespace of the Standard C++

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