All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
hdf_nucmass_io.h
Go to the documentation of this file.
1 /*
2  -------------------------------------------------------------------
3 
4  Copyright (C) 2006-2014, 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 \o2 \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  \note This function is in the \ref o2scl_hdf namespace.
68  */
69  void ame_load(o2scl::nucmass_ame &ame, std::string file_name,
70  std::string table_name);
71 
72  /** \brief Read an AME mass table from the \o2 internal data files
73 
74  There are five data sets, selected by the specification of the
75  \c version string
76  - "95rmd" - "Recommended" data from \ref Audi95 (ame95rmd.o2)
77  - "95exp" - "Experimental" data from \ref Audi95 (ame95exp.o2)
78  - "03round" - "Rounded" data from \ref Audi03 (ame03round.o2)
79  - "03" - Data from \ref Audi03 (ame03.o2)
80  - "12" - Data from \ref Audi12 (ame12.o2, default)
81 
82  If any string other than these five is used, the error handler
83  is called. If a data file has not been loaded, then
84  nucmass_ame::is_loaded() returns false.
85 
86  \note This function is in the \ref o2scl_hdf namespace.
87  */
88  void ame_load(o2scl::nucmass_ame &ame, std::string name="12");
89 
90  /** \brief Read data for \ref o2scl::nucmass_mnmsk from an HDF table
91 
92  \note This function is in the \ref o2scl_hdf namespace.
93 
94  \todo Switch to the same 'external' file mechanism used in
95  hdf_eos_io.h.
96  */
97  void mnmsk_load(o2scl::nucmass_mnmsk &mnmsk, std::string dir="");
98 
99  /** \brief Read data for \ref o2scl::nucmass_hfb from an HDF table
100 
101  Valid values of \c model at present are 2, 8, and 14, corresponding
102  to the HFB2 (\ref Goriely02), HFB8 (\ref Samyn04), and HFB14
103  (\ref Goriely07). If a number other than these three is given,
104  the error handler is called.
105 
106  \note This function is in the \ref o2scl_hdf namespace.
107 
108  \todo Switch to the same 'external' file mechanism used in
109  hdf_eos_io.h.
110  */
111  void hfb_load(o2scl::nucmass_hfb &hfb, size_t model=14, std::string dir="");
112 
113  /** \brief Read data for \ref o2scl::nucmass_hfb from an HDF table
114 
115  Valid values of \c model at present are 17 and 21, corresponding
116  to the HFB17 (\ref Goriely02) and HFB21 (\ref Samyn04). If a
117  number other than these two is given, the error handler is
118  called.
119 
120  \note This function is in the \ref o2scl_hdf namespace.
121 
122  \todo Switch to the same 'external' file mechanism used in
123  hdf_eos_io.h.
124  */
125  void hfb_sp_load(o2scl::nucmass_hfb_sp &hfb, size_t model=21,
126  std::string dir="");
127 
128 #ifndef DOXYGEN_NO_O2NS
129 }
130 #endif
131 
132 #endif
Mass formula from Moller, Nix, Myers, Swiatecki and Kratz.
Definition: nucmass_frdm.h:284
Masses from the Atomic Mass Evaluation.
Definition: nucmass_ame.h:123
HFB Mass formula with spin and parity information.
Definition: nucmass_hfb.h:157
HFB Mass formula.
Definition: nucmass_hfb.h:49

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).
Hosted at Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads..