nucmass_dz.h
Go to the documentation of this file.
1 /*
2  -------------------------------------------------------------------
3 
4  Copyright (C) 2006-2020, Andrew W. Steiner
5 
6  This file is part of O2scl.
7 
8  O2scl is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 3 of the License, or
11  (at your option) any later version.
12 
13  O2scl is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with O2scl. If not, see <http://www.gnu.org/licenses/>.
20 
21  -------------------------------------------------------------------
22 */
23 #ifndef O2SCL_DZ_MASS_H
24 #define O2SCL_DZ_MASS_H
25 
26 /** \file nucmass_dz.h
27  \brief File defining \ref o2scl::nucmass_dz_table and other classes
28 */
29 
30 #include <boost/numeric/ublas/vector.hpp>
31 #include <boost/numeric/ublas/matrix.hpp>
32 
33 #include <o2scl/nucmass.h>
34 #include <o2scl/tensor.h>
35 
36 #ifndef DOXYGEN_NO_O2NS
37 namespace o2scl {
38 #endif
39 
40  /** \brief Duflo-Zuker mass formula from tables
41 
42  The mass formulas from \ref Duflo95 as given in the
43  files <tt>du_zu_28.feb95</tt> and <tt>du_zu_10.feb96</tt>
44  as obtained from http://amdc.in2p3.fr/web/dz.html . These
45  data files have been reformatted for \o2 into HDF files
46  with names <tt>du_zu_95.o2</tt> and <tt>du_zu_96.o2</tt>.
47  */
49 
50  public:
51 
52  /** \brief Create a new mass formula object
53 
54  The string \c model is either <tt>"95"</tt>
55  or <tt>"96"</tt>.
56  */
57  nucmass_dz_table(std::string model="96", bool external=false);
58 
59  virtual ~nucmass_dz_table();
60 
61  /** \brief Return false if the mass formula does not include
62  specified nucleus
63  */
64  virtual bool is_included(int Z, int N);
65 
66  /// Given \c Z and \c N, return the mass excess in MeV
67  virtual double mass_excess(int Z, int N);
68 
69  /// Return the type, \c "nucmass_dz_table".
70  virtual const char *type() { return "nucmass_dz_table"; }
71 
72 #ifndef DOXYGEN_INTERNAL
73 
74  protected:
75 
76  /// Table containing the data
78 
79  /// The last table index for caching
80  int last;
81 
82 #endif
83 
84  };
85 
86  /** \brief The 10-parameter Duflo-Zuker mass formula
87 
88  This class is designed to provide essentially identical results
89  to the original 10-parameter Duflo-Zuker code (see \ref Duflo95)
90  at
91 
92  http://amdc.in2p3.fr/theory/du_zu_10.feb96fort
93 
94  The default values of \ref nucmass::m_neut and \ref
95  nucmass::m_prot are adjusted to make sure that the mass
96  excesses match the values given in the original.
97 
98  \future This appears to be limited for large nuclei because 'i'
99  becomes larger than imax and then statements like
100  noc[i][j]=moc-ju and noc[i+1][j]=ju become invalid. This needs
101  to be more carefully understood and documented. For now,
102  is_included() just arbitrarily chooses 240 as a maximum for N
103  and Z.
104  \comment
105  Are there any bound nuclei for which the arrays aren't
106  sufficient? Maybe not, in which case there isn't really a
107  problem.
108  \endcomment
109  \todo Document each field.
110  */
112 
113  public:
114 
119 
120 #ifndef DOXYGEN_INTERNAL
121 
122  protected:
123 
124  /** \name Workspace vectors used internally
125 
126  These are allocated in the class constructor.
127  */
128  //@{
129  /** \brief Desc
130 
131  Note that the first index is already 0 indexed in the DZ version
132  */
134 
135  /// Desc
137 
138  /// Desc
140 
141  /// Desc
143 
144  /// Desc
146 
147  /// Desc
149 
150  /// Desc
152 
153  /// Desc
155 
156  /// Desc
158 
159  /// Desc
161 
162  /// Desc
164 
165  /// Desc
167  //@}
168 
169 #endif
170 
171  public:
172 
173  nucmass_dz_fit();
174 
175  virtual ~nucmass_dz_fit();
176 
177  /// Coefficients
179 
180  /** \brief Return false if the mass formula does not include
181  specified nucleus
182  */
183  virtual bool is_included(int Z, int N);
184 
185  /// Return the type, \c "nucmass_dz_fit".
186  virtual const char *type() { return "nucmass_dz_fit"; }
187 
188  /// Fix parameters from an array for fitting
189  virtual int fit_fun(size_t nv, const ubvector &x);
190 
191  /// Fill array with guess from present values for fitting
192  virtual int guess_fun(size_t nv, ubvector &x);
193 
194  /** \brief Return the binding energy in MeV
195 
196  This function reproduces the original function called
197  <tt>mass10()</tt>, except that, to be consistent
198  with the other \o2 nuclear mass classes, it returns
199  the binding energy with the opposite sign from the
200  original.
201  */
202  virtual double binding_energy(int Z, int N);
203 
204  /** \brief Return the binding energy in MeV
205  */
206  virtual double binding_energy_d(double Z, double N);
207 
208  /** \brief Given \c Z and \c N, return the mass excess in MeV
209  */
210  virtual double mass_excess(int Z, int N);
211 
212  /** \brief Given \c Z and \c N, return the mass excess in MeV
213  */
214  virtual double mass_excess_d(double Z, double N);
215 
216  };
217 
218  /** \brief The 33-parameter Duflo-Zuker mass formula
219 
220  This class is designed to provide essentially identical results
221  to the original Duflo-Zuker code (see \ref Duflo95) at
222 
223  http://amdc.in2p3.fr/theory/dz31.f
224 
225  (Two parameters were added by Duflo and Zuker after the fact to
226  the original 31-parameter code, and still referred to as
227  <tt>dz31.f</tt>.)
228 
229  The default values of \ref nucmass::m_neut and \ref
230  nucmass::m_prot are adjusted to make sure that the mass
231  excesses match the values given in the original.
232 
233  \todo Document each field.
234 
235  Some explanations about the individual terms come from
236  \ref MendozaTemis10 and the work by
237  G. Bertsch at
238  http://www.phys.washington.edu/users/bertsch/duflo2.ps
239 
240  - <tt>a[0]</tt>: "Full master term". Density sqaured divided by
241  cube root of A. This is the master term which includes the bulk
242  energy from the liquid droplet model and the harmonic oscillator
243  effects
244  - <tt>a[2]</tt>: "Full spin-orbit term +"
245  - <tt>a[4]</tt>: "Full spin-orbit term -"
246  - <tt>a[6]</tt>: "Full cross term"
247  - <tt>a[8]</tt>: "Partial master term"
248  - <tt>a[10]</tt>: "Partial spin-orbit term +"
249  - <tt>a[12]</tt>: "Partial spin-orbit term -"
250  - <tt>a[14]</tt>: "S3", polarizability of the valence spin-orbit shell
251  - <tt>a[16]</tt>: "SQ", "QQM", a neutron-proton interaction
252  - <tt>a[18], a[19]</tt>: "D3" balance of monopole effects
253  - <tt>a[20], a[21], a[24], a[25]</tt>: "QQ+"/"QQ-", Quadrupole
254  terms, corresponding to filling equidistant Nilsson orbits
255  - <tt>a[22], a[23]</tt>: "D0", Loss of monopole and gain of quadrupole
256  energy for intruders
257  - <tt>a[26]</tt>: "TT", Symmetry energy
258  - <tt>a[28]</tt>: "SS"
259  - <tt>a[30]</tt>: "C", Coulomb energy
260  - <tt>a[31]</tt>: "P0", First pairing energy term
261  - <tt>a[32]</tt>: "P1", Second pairing energy term
262 
263  For odd parameters up to <tt>a[29]</tt>, the odd parameter is just
264  the preceeding even term divided by the cube root of A.
265 
266  Note that the original code states that, <tt>"for i even
267  a(i,program) =a(i-1,paper)*a(i,paper)"</tt>.
268  */
270 
271  public:
272 
277 
278 #ifndef DOXYGEN_INTERNAL
279 
280  protected:
281 
282  /** \name Workspace vectors used internally
283 
284  These are allocated in the class constructor.
285  */
286  //@{
287  ubvector dyda, fyda, fyd0, onps, oei, dei, op2, ym, op1;
288  ubvector shell, sshell;
289  tensor3<> op, onp, ot;
290  ubvector_int n4, nn, jup, jud, n2;
291  ubmatrix_int noc;
292  //@}
293 
294 #endif
295 
296  public:
297 
299 
300  virtual ~nucmass_dz_fit_33();
301 
302  /// Coefficients
304 
305  /// Return the type, \c "nucmass_dz_fit_33".
306  virtual const char *type() { return "nucmass_dz_fit_33"; }
307 
308  /// Fix parameters from an array for fitting
309  virtual int fit_fun(size_t nv, const ubvector &x);
310 
311  /// Fill array with guess from present values for fitting
312  virtual int guess_fun(size_t nv, ubvector &x);
313 
314  /** \brief Return false if the mass formula does not include
315  specified nucleus
316  */
317  virtual bool is_included(int Z, int N);
318 
319  /** \brief Return the binding energy in MeV
320 
321  This function reproduces the original function called
322  <tt>EMASSDZ()</tt>, except that, to be consistent
323  with the other \o2 nuclear mass classes, it returns
324  the binding energy with the opposite sign from the
325  original.
326  */
327  virtual double binding_energy(int Z, int N);
328 
329  /** \brief Return the binding energy in MeV
330  */
331  virtual double binding_energy_d(double Z, double N);
332 
333  /** \brief Given \c Z and \c N, return the mass excess in MeV
334  */
335  virtual double mass_excess(int Z, int N);
336 
337  /** \brief Given \c Z and \c N, return the mass excess in MeV
338  */
339  virtual double mass_excess_d(double Z, double N);
340 
341  };
342 
343 #ifndef DOXYGEN_NO_O2NS
344 }
345 #endif
346 
347 #endif
o2scl::nucmass_dz_fit::b
ubvector b
Coefficients.
Definition: nucmass_dz.h:178
o2scl::nucmass_dz_fit::binding_energy
virtual double binding_energy(int Z, int N)
Return the binding energy in MeV.
boost::numeric::ublas::matrix< double >
o2scl::nucmass_dz_fit::os
ubvector os
Desc.
Definition: nucmass_dz.h:157
o2scl::table
o2scl::nucmass_dz_fit::y
ubvector y
Desc.
Definition: nucmass_dz.h:136
o2scl::nucmass_dz_fit::dei
ubvector dei
Desc.
Definition: nucmass_dz.h:145
o2scl::nucmass_dz_fit_33::mass_excess_d
virtual double mass_excess_d(double Z, double N)
Given Z and N, return the mass excess in MeV.
boost::numeric::ublas::vector< double >
o2scl::nucmass_dz_fit_33::is_included
virtual bool is_included(int Z, int N)
Return false if the mass formula does not include specified nucleus.
o2scl::nucmass_dz_fit_33::fit_fun
virtual int fit_fun(size_t nv, const ubvector &x)
Fix parameters from an array for fitting.
o2scl::nucmass_dz_fit::op
ubvector op
Desc.
Definition: nucmass_dz.h:154
o2scl::nucmass_dz_table::is_included
virtual bool is_included(int Z, int N)
Return false if the mass formula does not include specified nucleus.
o2scl::nucmass_dz_fit_33::binding_energy
virtual double binding_energy(int Z, int N)
Return the binding energy in MeV.
o2scl::nucmass_dz_fit::mass_excess_d
virtual double mass_excess_d(double Z, double N)
Given Z and N, return the mass excess in MeV.
o2scl::nucmass_dz_fit::guess_fun
virtual int guess_fun(size_t nv, ubvector &x)
Fill array with guess from present values for fitting.
o2scl::nucmass_dz_table::data
table data
Table containing the data.
Definition: nucmass_dz.h:77
o2scl::nucmass_dz_fit::is_included
virtual bool is_included(int Z, int N)
Return false if the mass formula does not include specified nucleus.
o2scl::nucmass_dz_fit::onp
tensor3 onp
Desc.
Definition: nucmass_dz.h:133
o2scl::nucmass_dz_fit::binding_energy_d
virtual double binding_energy_d(double Z, double N)
Return the binding energy in MeV.
o2scl::nucmass_dz_fit::n2
ubvector_int n2
Desc.
Definition: nucmass_dz.h:163
o2scl::nucmass_dz_fit::fit_fun
virtual int fit_fun(size_t nv, const ubvector &x)
Fix parameters from an array for fitting.
o2scl::nucmass_fit_base
Fittable mass formula [abstract base].
Definition: nucmass.h:375
o2scl::nucmass_dz_fit::dyda
ubvector dyda
Desc.
Definition: nucmass_dz.h:160
o2scl::nucmass_dz_fit_33::mass_excess
virtual double mass_excess(int Z, int N)
Given Z and N, return the mass excess in MeV.
o2scl::nucmass_dz_table::mass_excess
virtual double mass_excess(int Z, int N)
Given Z and N, return the mass excess in MeV.
o2scl::nucmass_dz_fit_33
The 33-parameter Duflo-Zuker mass formula.
Definition: nucmass_dz.h:269
o2scl::tensor3
o2scl::nucmass_dz_fit::type
virtual const char * type()
Return the type, "nucmass_dz_fit".
Definition: nucmass_dz.h:186
o2scl::nucmass_dz_fit::qx
ubvector qx
Desc.
Definition: nucmass_dz.h:148
o2scl::nucmass_dz_table
Duflo-Zuker mass formula from tables.
Definition: nucmass_dz.h:48
o2scl::nucmass_dz_fit::oei
ubvector oei
Desc.
Definition: nucmass_dz.h:142
o2scl::nucmass_dz_fit_33::guess_fun
virtual int guess_fun(size_t nv, ubvector &x)
Fill array with guess from present values for fitting.
o2scl::nucmass_dz_fit_33::type
virtual const char * type()
Return the type, "nucmass_dz_fit_33".
Definition: nucmass_dz.h:306
o2scl::nucmass_table
Tabulated nuclear masses [abstract base].
Definition: nucmass.h:330
o2scl::nucmass_dz_table::last
int last
The last table index for caching.
Definition: nucmass_dz.h:80
o2scl::nucmass_dz_fit::noc
ubmatrix_int noc
Desc.
Definition: nucmass_dz.h:166
o2scl::nucmass_dz_fit::dx
ubvector dx
Desc.
Definition: nucmass_dz.h:151
o2scl::nucmass_dz_table::type
virtual const char * type()
Return the type, "nucmass_dz_table".
Definition: nucmass_dz.h:70
o2scl::nucmass_dz_table::nucmass_dz_table
nucmass_dz_table(std::string model="96", bool external=false)
Create a new mass formula object.
o2scl::nucmass_dz_fit_33::a
ubvector a
Coefficients.
Definition: nucmass_dz.h:303
o2scl::nucmass_dz_fit::pp
ubvector pp
Desc.
Definition: nucmass_dz.h:139
o2scl::nucmass_dz_fit::mass_excess
virtual double mass_excess(int Z, int N)
Given Z and N, return the mass excess in MeV.
o2scl::nucmass_dz_fit
The 10-parameter Duflo-Zuker mass formula.
Definition: nucmass_dz.h:111
o2scl::nucmass_dz_fit_33::binding_energy_d
virtual double binding_energy_d(double Z, double N)
Return the binding energy in MeV.

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).