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