Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:20:03

0001 /*******************************************************************************
0002  * Copyright (c) The JETSCAPE Collaboration, 2018
0003  *
0004  * Modular, task-based framework for simulating all aspects of heavy-ion collisions
0005  * 
0006  * For the list of contributors see AUTHORS.
0007  *
0008  * Report issues at https://github.com/JETSCAPE/JETSCAPE/issues
0009  *
0010  * or via email to bugs.jetscape@gmail.com
0011  *
0012  * Distributed under the GNU General Public License 3.0 (GPLv3 or later).
0013  * See COPYING for details.
0014  ******************************************************************************/
0015 
0016 #ifndef HYDROFROMFILE_H
0017 #define HYDROFROMFILE_H
0018 
0019 #include "FluidDynamics.h"
0020 #include "Hydroinfo_MUSIC.h"
0021 
0022 #include <string>
0023 
0024 #ifdef USE_HDF5
0025 #include "Hydroinfo_h5.h"
0026 #endif
0027 
0028 using namespace Jetscape;
0029 
0030 class HydroFromFile : public FluidDynamics {
0031   // this is wrapper class for MUSIC so that it can be used as a external
0032   // library for the JETSCAPE integrated framework
0033 private:
0034   int flag_read_in_multiple_hydro_;
0035   int hydro_event_idx_;
0036 
0037   int load_viscous_;
0038   int hydro_type_;
0039 
0040   int nskip_tau_;
0041   double T_c_;
0042 
0043 #ifdef USE_HDF5
0044   HydroinfoH5 *hydroinfo_h5_ptr;
0045 #endif
0046   Hydroinfo_MUSIC *hydroinfo_MUSIC_ptr;
0047 
0048   double PreEq_tau0_;
0049   double PreEq_tauf_;
0050   Hydroinfo_MUSIC *hydroinfo_PreEq_ptr;
0051 
0052   // Allows the registration of the module so that it is available to be used by the Jetscape framework.
0053   static RegisterJetScapeModule<HydroFromFile> reg;
0054 
0055 public:
0056   HydroFromFile();
0057   ~HydroFromFile();
0058 
0059   //! clean up hydro event
0060   void clean_hydro_event();
0061 
0062   //! This function initials hydro parameters and read in a hydro event
0063   void InitializeHydro(Parameter parameter_list);
0064 
0065   //! This function load a VISHNew hydro event
0066   void read_in_hydro_event(string VISH_filename, int buffer_size,
0067                            int load_viscous);
0068 
0069   //! This function load a MUSIC hydro event
0070   void read_in_hydro_event(string input_file, string hydro_ideal_file,
0071                            int nskip_tau);
0072 
0073   //! This function load a PreEq event and a MUSIC hydro event
0074   void read_in_hydro_event(string input_file, string preEq_file,
0075                            string hydro_ideal_file,
0076                            int nskip_tau);
0077 
0078   //! This function is a dummy function
0079   void EvolveHydro();
0080 
0081   //! This function provide fluid cell information at a given
0082   //! space-time point
0083   void GetHydroInfo(Jetscape::real t, Jetscape::real x, Jetscape::real y,
0084                     Jetscape::real z,
0085                     std::unique_ptr<FluidCellInfo> &fluid_cell_info_ptr);
0086 
0087   double GetEventPlaneAngle();
0088   void set_hydro_event_idx(int idx_in) { hydro_event_idx_ = idx_in; };
0089   int get_hydro_event_idx() { return (hydro_event_idx_); };
0090   void GetHyperSurface(Jetscape::real T_cut,
0091                        SurfaceCellInfo *surface_list_ptr){};
0092 };
0093 
0094 #endif // HYDROFROMFILE_H