hdf_nucmass_io.h
Go to the documentation of this file.
1 /*
2  -------------------------------------------------------------------
3 
4  Copyright (C) 2006-2017, 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_HDF_NUCMASS_IO_H
24 #define O2SCL_HDF_NUCMASS_IO_H
25 
26 /** \file hdf_nucmass_io.h
27  \brief File for HDF input of the \ref o2scl::nucmass_ame and
28  \ref o2scl::nucmass_mnmsk data files
29 */
30 
31 #include <hdf5.h>
32 #include <hdf5_hl.h>
33 
34 #include <o2scl/constants.h>
35 #include <o2scl/hdf_file.h>
36 #include <o2scl/lib_settings.h>
37 #include <o2scl/nucmass.h>
38 #include <o2scl/nucmass_ame.h>
39 #include <o2scl/nucmass_hfb.h>
40 #include <o2scl/nucmass_frdm.h>
41 
42 #ifndef DOXYGEN_NO_O2NS
43 
44 // While ideally we would leave this o2scl_hdf namespace in the
45 // documentation, Doxygen seems to get confused with the o2scl_hdf
46 // documentation already in the parent O2scl library.
47 // For now, we leave the o2scl_hdf namespace in
48 
49 namespace o2scl_hdf {
50 #endif
51 
52  /** \brief Read data for \ref o2scl::nucmass_ame from an HDF table
53  specified in a file
54 
55  There are five data sets, selected by the specification of the
56  \c version string
57  - "95rmd" - "Recommended" data from \ref Audi95 (ame95rmd.o2)
58  - "95exp" - "Experimental" data from \ref Audi95 (ame95exp.o2)
59  - "03round" - "Rounded" data from \ref Audi03 (ame03round.o2)
60  - "03" - Data from \ref Audi03 (ame03.o2)
61  - "12" - Data from \ref Audi12 (ame12.o2)
62 
63  If any string other than these five is used, the error handler
64  is called. If a data file has not been loaded, then
65  nucmass_ame::is_loaded() returns false.
66 
67  \comment
68  On ubuntu/doxygen-1.8.11, \ref o2scl_hdf fails here.
69  \endcomment
70  \note This function is in the o2scl_hdf namespace,
71  see \ref hdf_nucmass_io.h .
72  */
73  void ame_load(o2scl::nucmass_ame &ame, std::string file_name,
74  std::string table_name);
75 
76  /** \brief Read an AME mass table from the \o2 internal data files
77 
78  There are five data sets, selected by the specification of the
79  \c version string
80  - "95rmd" - "Recommended" data from \ref Audi95 (ame95rmd.o2)
81  - "95exp" - "Experimental" data from \ref Audi95 (ame95exp.o2)
82  - "03round" - "Rounded" data from \ref Audi03 (ame03round.o2)
83  - "03" - Data from \ref Audi03 (ame03.o2)
84  - "12" - Data from \ref Audi12 (ame12.o2, default)
85 
86  If any string other than these five is used, the error handler
87  is called. If a data file has not been loaded, then
88  nucmass_ame::is_loaded() returns false.
89 
90  \comment
91  On ubuntu/doxygen-1.8.11, \ref o2scl_hdf fails here.
92  \endcomment
93  \note This function is in the o2scl_hdf namespace,
94  see \ref hdf_nucmass_io.h .
95  */
96  void ame_load(o2scl::nucmass_ame &ame, std::string name="12");
97 
98  /** \brief Read data for \ref o2scl::nucmass_mnmsk from an HDF table
99 
100  \comment
101  On ubuntu/doxygen-1.8.11, \ref o2scl_hdf fails here.
102  \endcomment
103  \note This function is in the o2scl_hdf namespace,
104  see \ref hdf_nucmass_io.h .
105 
106  \todo Switch to the same 'external' file mechanism used in
107  hdf_eos_io.h.
108  */
109  void mnmsk_load(o2scl::nucmass_mnmsk &mnmsk, std::string dir="");
110 
111  /** \brief Read data for \ref o2scl::nucmass_hfb from an HDF table
112 
113  Valid values of \c model at present are 2, 8, and 14, corresponding
114  to the HFB2 (\ref Goriely02), HFB8 (\ref Samyn04), and HFB14
115  (\ref Goriely07). If a number other than these three is given,
116  the error handler is called.
117 
118  \comment
119  On ubuntu/doxygen-1.8.11, \ref o2scl_hdf fails here.
120  \endcomment
121  \note This function is in the o2scl_hdf namespace,
122  see \ref hdf_nucmass_io.h .
123 
124  \todo Switch to the same 'external' file mechanism used in
125  hdf_eos_io.h.
126  */
127  void hfb_load(o2scl::nucmass_hfb &hfb, size_t model=14, std::string dir="");
128 
129  /** \brief Read data for \ref o2scl::nucmass_hfb from an HDF table
130 
131  Valid values of \c model at present are 17 and 21, corresponding
132  to the HFB17 (\ref Goriely02) and HFB21 (\ref Samyn04). If a
133  number other than these two is given, the error handler is
134  called.
135 
136  \comment
137  On ubuntu/doxygen-1.8.11, \ref o2scl_hdf fails here.
138  \endcomment
139  \note This function is in the o2scl_hdf namespace,
140  see \ref hdf_nucmass_io.h .
141 
142  \todo Switch to the same 'external' file mechanism used in
143  hdf_eos_io.h.
144  */
145  void hfb_sp_load(o2scl::nucmass_hfb_sp &hfb, size_t model=21,
146  std::string dir="");
147 
148 #ifndef DOXYGEN_NO_O2NS
149 }
150 #endif
151 
152 #endif
Mass formula from Moller, Nix, Myers, Swiatecki and Kratz.
Definition: nucmass_frdm.h:284
void mnmsk_load(o2scl::nucmass_mnmsk &mnmsk, std::string dir="")
Read data for o2scl::nucmass_mnmsk from an HDF table.
Masses from the Atomic Mass Evaluation.
Definition: nucmass_ame.h:123
HFB Mass formula with spin and parity information.
Definition: nucmass_hfb.h:157
void ame_load(o2scl::nucmass_ame &ame, std::string file_name, std::string table_name)
Read data for o2scl::nucmass_ame from an HDF table specified in a file.
HFB Mass formula.
Definition: nucmass_hfb.h:49
void hfb_load(o2scl::nucmass_hfb &hfb, size_t model=14, std::string dir="")
Read data for o2scl::nucmass_hfb from an HDF table.
void hfb_sp_load(o2scl::nucmass_hfb_sp &hfb, size_t model=21, std::string dir="")
Read data for o2scl::nucmass_hfb from an HDF table.

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