hdf_eos_io.h
Go to the documentation of this file.
1 /*
2  -------------------------------------------------------------------
3 
4  Copyright (C) 2006-2018, 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_EOS_IO_H
24 #define O2SCL_HDF_EOS_IO_H
25 
26 /** \file hdf_eos_io.h
27  \brief HDF input of the \o2 EOS data files
28 */
29 
30 #ifdef O2SCL_UBUNTU_HDF5
31 #include <hdf5/serial/hdf5.h>
32 #else
33 #include <hdf5.h>
34 #endif
35 
36 #include <o2scl/constants.h>
37 #include <o2scl/hdf_file.h>
38 #include <o2scl/lib_settings.h>
39 #include <o2scl/eos_had_apr.h>
40 #include <o2scl/eos_had_skyrme.h>
41 #include <o2scl/eos_had_rmf.h>
42 #include <o2scl/eos_had_gogny.h>
43 
44 /** \brief Additional functions to read and write EOS data to HDF5 files
45  */
46 namespace o2scl_hdf {
47 
48  /** \brief Read the Gogny EOS from a data file
49 
50  If \c external is <tt>false</tt> (the default), then the model
51  (either <tt>d1n</tt> or <tt>d1s</tt> is loaded from the \o2 data
52  directory in file <tt>gogny.o2</tt>. Otherwise, the parameter \c
53  model is taken to be the full pathname of the HDF5 file
54  containing the EOS model data to be loaded.
55  */
56  void gogny_load(o2scl::eos_had_gogny &ge, std::string model,
57  std::string filename="");
58 
59  /** \brief Input a \ref o2scl::eos_had_rmf object from an HDF file
60 
61  If \c external is <tt>false</tt> (the default), then the model
62  is loaded from the \o2 data directory <tt>rmfdata</tt> with the
63  suffix <tt>.o2</tt>. Otherwise, the parameter \c model is
64  taken to be the full pathname of the HDF5 file containing
65  the EOS model data to be loaded.
66  */
67  void rmf_load(o2scl::eos_had_rmf &rmf, std::string model,
68  bool external=false);
69 
70  /** \brief Input a \ref o2scl::eos_had_skyrme object from an HDF file
71 
72  If \c external is <tt>false</tt> (the default), then the model
73  is loaded from the \o2 data directory <tt>skdata</tt> with the
74  suffix <tt>.o2</tt>. Otherwise, the parameter \c model is
75  taken to be the full pathname of the HDF5 file containing
76  the EOS model data to be loaded.
77  */
78  void skyrme_load(o2scl::eos_had_skyrme &sk, std::string model,
79  bool external=false);
80 
81  /** \brief Write a \ref o2scl::eos_had_skyrme object to an HDF file
82  */
83  void skyrme_write(hdf_file &hf, o2scl::eos_had_skyrme &sk,
84  std::string name);
85 
86  /** \brief Write a \ref o2scl::eos_had_skyrme object to an HDF file
87  in the \o2 data directory
88  */
89  void skyrme_write(o2scl::eos_had_skyrme &sk, std::string model);
90 
91  /** \brief Return a pointer to an eos_had_base object
92  from two strings specifying type and name
93  */
94  o2scl::eos_had_base *eos_had_strings(std::string type,
95  std::string name="");
96 
97  /** \brief List EOSs understood by \ref eos_had_strings() .
98  */
99  void eos_had_strings_list();
100 
101 }
102 
103 #endif
104 
105 
void rmf_load(o2scl::eos_had_rmf &rmf, std::string model, bool external=false)
Input a o2scl::eos_had_rmf object from an HDF file.
o2scl::eos_had_base * eos_had_strings(std::string type, std::string name="")
Return a pointer to an eos_had_base object from two strings specifying type and name.
Relativistic mean field theory EOS.
Definition: eos_had_rmf.h:298
void skyrme_load(o2scl::eos_had_skyrme &sk, std::string model, bool external=false)
Input a o2scl::eos_had_skyrme object from an HDF file.
void eos_had_strings_list()
List EOSs understood by eos_had_strings() .
Additional functions to read and write EOS data to HDF5 files.
Hadronic equation of state [abstract base].
Definition: eos_had_base.h:324
Skyrme hadronic equation of state.
void gogny_load(o2scl::eos_had_gogny &ge, std::string model, std::string filename="")
Read the Gogny EOS from a data file.
void skyrme_write(hdf_file &hf, o2scl::eos_had_skyrme &sk, std::string name)
Write a o2scl::eos_had_skyrme object to an HDF file.

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