Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
clvisc::CLVisc Class Reference

#include <JETSCAPE/blob/main/external_packages/clvisc_wrapper/include/clvisc.h>

+ Collaboration diagram for clvisc::CLVisc:

Public Member Functions

 CLVisc (const Config &cfg, std::string device_type, int device_id)
 
const Configget_config ()
 
template<typename ValueType >
void read_ini (const std::vector< ValueType > &ed)
 
template<typename ValueType >
void read_ini (const std::vector< ValueType > &ed, const std::vector< ValueType > &vx, const std::vector< ValueType > &vy, const std::vector< ValueType > &vz)
 
template<typename ValueType >
void read_ini (const std::vector< ValueType > &ed, const std::vector< ValueType > &vx, const std::vector< ValueType > &vy, const std::vector< ValueType > &vz, const std::vector< ValueType > &pi00, const std::vector< ValueType > &pi01, const std::vector< ValueType > &pi02, const std::vector< ValueType > &pi03, const std::vector< ValueType > &pi11, const std::vector< ValueType > &pi12, const std::vector< ValueType > &pi13, const std::vector< ValueType > &pi22, const std::vector< ValueType > &pi23, const std::vector< ValueType > &pi33)
 
template<typename ValueType >
void read_ini (const std::vector< ValueType > &ed, const std::vector< ValueType > &vx, const std::vector< ValueType > &vy, const std::vector< ValueType > &vz, const std::vector< ValueType > &pi00, const std::vector< ValueType > &pi01, const std::vector< ValueType > &pi02, const std::vector< ValueType > &pi03, const std::vector< ValueType > &pi11, const std::vector< ValueType > &pi12, const std::vector< ValueType > &pi13, const std::vector< ValueType > &pi22, const std::vector< ValueType > &pi23, const std::vector< ValueType > &pi33, const std::vector< ValueType > &bulk_pi, const std::vector< ValueType > &net_charge_baryon_, const std::vector< ValueType > &net_charge_electric, const std::vector< ValueType > &net_charge_strange)
 
void one_step ()
 
void evolve ()
 
 ~CLVisc ()
 

Public Attributes

BulkInfo bulkinfo_
 

Private Member Functions

void initialize_gpu_buffer_ ()
 
void israel_stewart_initialize_ ()
 
void update_udiff_ ()
 
void half_step_israel_stewart_ (int step)
 
void half_step_visc_ (int step)
 
void half_step_ (int step)
 

Private Attributes

Config cfg_
 
CLIdeal ideal_
 
OpenclBackend backend_
 
double tau0_
 
double tau_
 
size_t size_
 
std::string compile_option_
 
std::vector< cl_realh_shear_pi_
 
std::vector< cl_realh_bulk_pi_
 
std::vector< cl_real4h_net_charge_
 
cl::Buffer d_shear_pi_ [3]
 
cl::Buffer d_bulk_pi_ [3]
 
cl::Buffer d_net_charge_ [3]
 
cl::Buffer d_is_shear_pi_src_
 
cl::Buffer d_is_bulk_pi_src_
 
cl::Buffer d_udx_
 
cl::Buffer d_udy_
 
cl::Buffer d_udz_
 
cl::Buffer d_udiff_
 
cl::Buffer d_goodcell_
 
cl::Kernel kernel_is_initialize_
 
cl::Kernel kernel_is_src_christoffel_
 
cl::Kernel kernel_is_src_alongx_
 
cl::Kernel kernel_is_src_alongy_
 
cl::Kernel kernel_is_src_alongz_
 
cl::Kernel kernel_is_update_pimn_
 
cl::Kernel kernel_is_get_udiff_
 
cl::Kernel kernel_visc_src_christoffel_
 
cl::Kernel kernel_visc_kt_src_alongx_
 
cl::Kernel kernel_visc_kt_src_alongy_
 
cl::Kernel kernel_visc_kt_src_alongz_
 
cl::Kernel kernel_visc_update_ev_
 

Detailed Description

Definition at line 38 of file clvisc.h.

View newest version in sPHENIX GitHub at line 38 of file clvisc.h

Constructor & Destructor Documentation

CLVisc::CLVisc ( const Config cfg,
std::string  device_type,
int  device_id 
)
CLVisc::~CLVisc ( )

Definition at line 351 of file clvisc.cc.

View newest version in sPHENIX GitHub at line 351 of file clvisc.cc

Member Function Documentation

void CLVisc::evolve ( )

Definition at line 313 of file clvisc.cc.

View newest version in sPHENIX GitHub at line 313 of file clvisc.cc

References clvisc::BulkInfo::add_data(), backend_, bulkinfo_, cfg_, d_bulk_pi_, clvisc::CLIdeal::d_ev_, d_shear_pi_, clvisc::OpenclBackend::enqueue_copy(), clvisc::CLIdeal::eos_table_, check_license::err(), ErrorMessage(), ideal_, israel_stewart_initialize_(), clvisc::CLIdeal::max_energy_density(), clvisc::Config::ntskip, one_step(), clvisc::CLIdeal::predict_first_step(), size_, tau0_, tau_, Acts::Test::time, and update_udiff_().

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const Config& clvisc::CLVisc::get_config ( )
inline

Definition at line 114 of file clvisc.h.

View newest version in sPHENIX GitHub at line 114 of file clvisc.h

References cfg_.

void CLVisc::half_step_ ( int  step)
private

Definition at line 239 of file clvisc.cc.

View newest version in sPHENIX GitHub at line 239 of file clvisc.cc

References half_step_israel_stewart_(), and half_step_visc_().

Referenced by one_step().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CLVisc::half_step_israel_stewart_ ( int  step)
private

Definition at line 126 of file clvisc.cc.

View newest version in sPHENIX GitHub at line 126 of file clvisc.cc

References backend_, clvisc::Config::block_size, cfg_, clvisc::CLIdeal::d_ev_, d_goodcell_, d_is_shear_pi_src_, d_shear_pi_, d_udiff_, d_udx_, d_udy_, d_udz_, clvisc::OpenclBackend::enqueue_run(), clvisc::CLIdeal::eos_table_, ideal_, kernel_is_src_alongx_, kernel_is_src_alongy_, kernel_is_src_alongz_, kernel_is_src_christoffel_, kernel_is_update_pimn_, cl::NullRange, clvisc::Config::nx, clvisc::Config::ny, clvisc::Config::nz, cl::Kernel::setArg(), size_, and tau_.

Referenced by half_step_().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CLVisc::half_step_visc_ ( int  step)
private

Definition at line 186 of file clvisc.cc.

View newest version in sPHENIX GitHub at line 186 of file clvisc.cc

References backend_, clvisc::Config::block_size, cfg_, clvisc::CLIdeal::d_ev_, d_shear_pi_, clvisc::CLIdeal::d_src_, clvisc::OpenclBackend::enqueue_run(), clvisc::CLIdeal::eos_table_, ideal_, kernel_visc_kt_src_alongx_, kernel_visc_kt_src_alongy_, kernel_visc_kt_src_alongz_, kernel_visc_src_christoffel_, kernel_visc_update_ev_, cl::NullRange, clvisc::Config::nx, clvisc::Config::ny, clvisc::Config::nz, cl::Kernel::setArg(), size_, and tau_.

Referenced by half_step_().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CLVisc::initialize_gpu_buffer_ ( )
private

Definition at line 80 of file clvisc.cc.

View newest version in sPHENIX GitHub at line 80 of file clvisc.cc

References backend_, clvisc::OpenclBackend::CreateBuffer(), clvisc::OpenclBackend::CreateBufferByCopyVector(), d_bulk_pi_, d_goodcell_, d_is_bulk_pi_src_, d_is_shear_pi_src_, d_net_charge_, d_shear_pi_, d_udiff_, d_udx_, d_udy_, d_udz_, h_bulk_pi_, h_net_charge_, h_shear_pi_, i, and size_.

Referenced by read_ini().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CLVisc::israel_stewart_initialize_ ( )
private

Definition at line 107 of file clvisc.cc.

View newest version in sPHENIX GitHub at line 107 of file clvisc.cc

References backend_, clvisc::CLIdeal::d_ev_, d_goodcell_, d_shear_pi_, d_udiff_, clvisc::OpenclBackend::enqueue_run(), clvisc::CLIdeal::eos_table_, ideal_, kernel_is_initialize_, cl::NullRange, cl::Kernel::setArg(), size_, and tau_.

Referenced by evolve().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CLVisc::one_step ( )

Definition at line 244 of file clvisc.cc.

View newest version in sPHENIX GitHub at line 244 of file clvisc.cc

References cfg_, clvisc::Config::dt, half_step_(), and tau_.

Referenced by evolve().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename ValueType >
void CLVisc::read_ini ( const std::vector< ValueType > &  ed)

Definition at line 252 of file clvisc.cc.

View newest version in sPHENIX GitHub at line 252 of file clvisc.cc

References h_bulk_pi_, h_net_charge_, h_shear_pi_, ideal_, initialize_gpu_buffer_(), clvisc::CLIdeal::read_ini(), and size_.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename ValueType >
void CLVisc::read_ini ( const std::vector< ValueType > &  ed,
const std::vector< ValueType > &  vx,
const std::vector< ValueType > &  vy,
const std::vector< ValueType > &  vz 
)

Definition at line 262 of file clvisc.cc.

View newest version in sPHENIX GitHub at line 262 of file clvisc.cc

References h_bulk_pi_, h_net_charge_, h_shear_pi_, ideal_, initialize_gpu_buffer_(), clvisc::CLIdeal::read_ini(), and size_.

+ Here is the call graph for this function:

template<typename ValueType >
void CLVisc::read_ini ( const std::vector< ValueType > &  ed,
const std::vector< ValueType > &  vx,
const std::vector< ValueType > &  vy,
const std::vector< ValueType > &  vz,
const std::vector< ValueType > &  pi00,
const std::vector< ValueType > &  pi01,
const std::vector< ValueType > &  pi02,
const std::vector< ValueType > &  pi03,
const std::vector< ValueType > &  pi11,
const std::vector< ValueType > &  pi12,
const std::vector< ValueType > &  pi13,
const std::vector< ValueType > &  pi22,
const std::vector< ValueType > &  pi23,
const std::vector< ValueType > &  pi33 
)

Definition at line 276 of file clvisc.cc.

View newest version in sPHENIX GitHub at line 276 of file clvisc.cc

References h_bulk_pi_, h_net_charge_, h_shear_pi_, i, ideal_, initialize_gpu_buffer_(), clvisc::CLIdeal::read_ini(), and size_.

+ Here is the call graph for this function:

template<typename ValueType >
void clvisc::CLVisc::read_ini ( const std::vector< ValueType > &  ed,
const std::vector< ValueType > &  vx,
const std::vector< ValueType > &  vy,
const std::vector< ValueType > &  vz,
const std::vector< ValueType > &  pi00,
const std::vector< ValueType > &  pi01,
const std::vector< ValueType > &  pi02,
const std::vector< ValueType > &  pi03,
const std::vector< ValueType > &  pi11,
const std::vector< ValueType > &  pi12,
const std::vector< ValueType > &  pi13,
const std::vector< ValueType > &  pi22,
const std::vector< ValueType > &  pi23,
const std::vector< ValueType > &  pi33,
const std::vector< ValueType > &  bulk_pi,
const std::vector< ValueType > &  net_charge_baryon_,
const std::vector< ValueType > &  net_charge_electric,
const std::vector< ValueType > &  net_charge_strange 
)
void CLVisc::update_udiff_ ( )
private

Definition at line 118 of file clvisc.cc.

View newest version in sPHENIX GitHub at line 118 of file clvisc.cc

References backend_, clvisc::CLIdeal::d_ev_, d_udiff_, clvisc::OpenclBackend::enqueue_run(), ideal_, kernel_is_get_udiff_, cl::NullRange, cl::Kernel::setArg(), and size_.

Referenced by evolve().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

OpenclBackend clvisc::CLVisc::backend_
private

Definition at line 44 of file clvisc.h.

View newest version in sPHENIX GitHub at line 44 of file clvisc.h

Referenced by CLVisc(), evolve(), half_step_israel_stewart_(), half_step_visc_(), initialize_gpu_buffer_(), israel_stewart_initialize_(), and update_udiff_().

BulkInfo clvisc::CLVisc::bulkinfo_

Definition at line 112 of file clvisc.h.

View newest version in sPHENIX GitHub at line 112 of file clvisc.h

Referenced by evolve().

Config clvisc::CLVisc::cfg_
private

Definition at line 41 of file clvisc.h.

View newest version in sPHENIX GitHub at line 41 of file clvisc.h

Referenced by evolve(), get_config(), half_step_israel_stewart_(), half_step_visc_(), and one_step().

std::string clvisc::CLVisc::compile_option_
private

Definition at line 54 of file clvisc.h.

View newest version in sPHENIX GitHub at line 54 of file clvisc.h

Referenced by CLVisc().

cl::Buffer clvisc::CLVisc::d_bulk_pi_[3]
private

Definition at line 66 of file clvisc.h.

View newest version in sPHENIX GitHub at line 66 of file clvisc.h

Referenced by evolve(), and initialize_gpu_buffer_().

cl::Buffer clvisc::CLVisc::d_goodcell_
private

Definition at line 78 of file clvisc.h.

View newest version in sPHENIX GitHub at line 78 of file clvisc.h

Referenced by half_step_israel_stewart_(), initialize_gpu_buffer_(), and israel_stewart_initialize_().

cl::Buffer clvisc::CLVisc::d_is_bulk_pi_src_
private

Definition at line 71 of file clvisc.h.

View newest version in sPHENIX GitHub at line 71 of file clvisc.h

Referenced by initialize_gpu_buffer_().

cl::Buffer clvisc::CLVisc::d_is_shear_pi_src_
private

Definition at line 70 of file clvisc.h.

View newest version in sPHENIX GitHub at line 70 of file clvisc.h

Referenced by half_step_israel_stewart_(), and initialize_gpu_buffer_().

cl::Buffer clvisc::CLVisc::d_net_charge_[3]
private

Definition at line 67 of file clvisc.h.

View newest version in sPHENIX GitHub at line 67 of file clvisc.h

Referenced by initialize_gpu_buffer_().

cl::Buffer clvisc::CLVisc::d_shear_pi_[3]
private

Definition at line 65 of file clvisc.h.

View newest version in sPHENIX GitHub at line 65 of file clvisc.h

Referenced by evolve(), half_step_israel_stewart_(), half_step_visc_(), initialize_gpu_buffer_(), and israel_stewart_initialize_().

cl::Buffer clvisc::CLVisc::d_udiff_
private

Definition at line 75 of file clvisc.h.

View newest version in sPHENIX GitHub at line 75 of file clvisc.h

Referenced by half_step_israel_stewart_(), initialize_gpu_buffer_(), israel_stewart_initialize_(), and update_udiff_().

cl::Buffer clvisc::CLVisc::d_udx_
private

Definition at line 72 of file clvisc.h.

View newest version in sPHENIX GitHub at line 72 of file clvisc.h

Referenced by half_step_israel_stewart_(), and initialize_gpu_buffer_().

cl::Buffer clvisc::CLVisc::d_udy_
private

Definition at line 73 of file clvisc.h.

View newest version in sPHENIX GitHub at line 73 of file clvisc.h

Referenced by half_step_israel_stewart_(), and initialize_gpu_buffer_().

cl::Buffer clvisc::CLVisc::d_udz_
private

Definition at line 74 of file clvisc.h.

View newest version in sPHENIX GitHub at line 74 of file clvisc.h

Referenced by half_step_israel_stewart_(), and initialize_gpu_buffer_().

std::vector<cl_real> clvisc::CLVisc::h_bulk_pi_
private

Definition at line 60 of file clvisc.h.

View newest version in sPHENIX GitHub at line 60 of file clvisc.h

Referenced by initialize_gpu_buffer_(), and read_ini().

std::vector<cl_real4> clvisc::CLVisc::h_net_charge_
private

Definition at line 63 of file clvisc.h.

View newest version in sPHENIX GitHub at line 63 of file clvisc.h

Referenced by initialize_gpu_buffer_(), and read_ini().

std::vector<cl_real> clvisc::CLVisc::h_shear_pi_
private

Definition at line 58 of file clvisc.h.

View newest version in sPHENIX GitHub at line 58 of file clvisc.h

Referenced by initialize_gpu_buffer_(), and read_ini().

CLIdeal clvisc::CLVisc::ideal_
private

Definition at line 43 of file clvisc.h.

View newest version in sPHENIX GitHub at line 43 of file clvisc.h

Referenced by CLVisc(), evolve(), half_step_israel_stewart_(), half_step_visc_(), israel_stewart_initialize_(), read_ini(), and update_udiff_().

cl::Kernel clvisc::CLVisc::kernel_is_get_udiff_
private

Definition at line 87 of file clvisc.h.

View newest version in sPHENIX GitHub at line 87 of file clvisc.h

Referenced by CLVisc(), and update_udiff_().

cl::Kernel clvisc::CLVisc::kernel_is_initialize_
private

Definition at line 81 of file clvisc.h.

View newest version in sPHENIX GitHub at line 81 of file clvisc.h

Referenced by CLVisc(), and israel_stewart_initialize_().

cl::Kernel clvisc::CLVisc::kernel_is_src_alongx_
private

Definition at line 83 of file clvisc.h.

View newest version in sPHENIX GitHub at line 83 of file clvisc.h

Referenced by CLVisc(), and half_step_israel_stewart_().

cl::Kernel clvisc::CLVisc::kernel_is_src_alongy_
private

Definition at line 84 of file clvisc.h.

View newest version in sPHENIX GitHub at line 84 of file clvisc.h

Referenced by CLVisc(), and half_step_israel_stewart_().

cl::Kernel clvisc::CLVisc::kernel_is_src_alongz_
private

Definition at line 85 of file clvisc.h.

View newest version in sPHENIX GitHub at line 85 of file clvisc.h

Referenced by CLVisc(), and half_step_israel_stewart_().

cl::Kernel clvisc::CLVisc::kernel_is_src_christoffel_
private

Definition at line 82 of file clvisc.h.

View newest version in sPHENIX GitHub at line 82 of file clvisc.h

Referenced by CLVisc(), and half_step_israel_stewart_().

cl::Kernel clvisc::CLVisc::kernel_is_update_pimn_
private

Definition at line 86 of file clvisc.h.

View newest version in sPHENIX GitHub at line 86 of file clvisc.h

Referenced by CLVisc(), and half_step_israel_stewart_().

cl::Kernel clvisc::CLVisc::kernel_visc_kt_src_alongx_
private

Definition at line 91 of file clvisc.h.

View newest version in sPHENIX GitHub at line 91 of file clvisc.h

Referenced by CLVisc(), and half_step_visc_().

cl::Kernel clvisc::CLVisc::kernel_visc_kt_src_alongy_
private

Definition at line 92 of file clvisc.h.

View newest version in sPHENIX GitHub at line 92 of file clvisc.h

Referenced by CLVisc(), and half_step_visc_().

cl::Kernel clvisc::CLVisc::kernel_visc_kt_src_alongz_
private

Definition at line 93 of file clvisc.h.

View newest version in sPHENIX GitHub at line 93 of file clvisc.h

Referenced by CLVisc(), and half_step_visc_().

cl::Kernel clvisc::CLVisc::kernel_visc_src_christoffel_
private

Definition at line 90 of file clvisc.h.

View newest version in sPHENIX GitHub at line 90 of file clvisc.h

Referenced by CLVisc(), and half_step_visc_().

cl::Kernel clvisc::CLVisc::kernel_visc_update_ev_
private

Definition at line 94 of file clvisc.h.

View newest version in sPHENIX GitHub at line 94 of file clvisc.h

Referenced by CLVisc(), and half_step_visc_().

size_t clvisc::CLVisc::size_
private

Definition at line 53 of file clvisc.h.

View newest version in sPHENIX GitHub at line 53 of file clvisc.h

Referenced by CLVisc(), evolve(), half_step_israel_stewart_(), half_step_visc_(), initialize_gpu_buffer_(), israel_stewart_initialize_(), read_ini(), and update_udiff_().

double clvisc::CLVisc::tau0_
private

Definition at line 47 of file clvisc.h.

View newest version in sPHENIX GitHub at line 47 of file clvisc.h

Referenced by CLVisc(), and evolve().

double clvisc::CLVisc::tau_
private

Definition at line 51 of file clvisc.h.

View newest version in sPHENIX GitHub at line 51 of file clvisc.h

Referenced by CLVisc(), evolve(), half_step_israel_stewart_(), half_step_visc_(), israel_stewart_initialize_(), and one_step().


The documentation for this class was generated from the following files: