Table Of Contents

Previous topic

simulation module

Next topic

optics module

This Page

collective module

The collective module needs to be described.

Classes

class Distributed_rectangular_grid

Public Functions

Distributed_rectangular_grid(std::vector< double > const & physical_size, std::vector< double > const & physical_offset, std::vector< int > const & grid_shape, bool periodic, int lower, int upper, Commxx_sptr comm_sptr, std::string const solver = “hockney”)

Distributed_rectangular_grid(Rectangular_grid_domain_sptr rectangular_grid_domain_sptr, int lower, int upper, Commxx_sptr comm_sptr, std::string const solver = “hockney”)

Distributed_rectangular_grid(Rectangular_grid_domain_sptr rectangular_grid_domain_sptr, int lower, int upper, std::vector< int > const & padded_shape, Commxx_sptr comm_sptr)

Rectangular_grid_domain const & get_domain()

int get_lower()

int get_upper()

int get_lower_guard()

int get_upper_guard()

std::vector< int > const & get_uppers()

std::vector< int > const & get_lengths()

MArray3d_ref const & get_grid_points()

MArray3d_ref & get_grid_points()

MArray2dc_ref const & get_grid_points_2dc()

MArray2dc_ref & get_grid_points_2dc()

MArray1d_ref const & get_grid_points_1d()

MArray1d_ref & get_grid_points_1d()

void set_normalization(double val)

double get_normalization()

Commxx const & get_comm()

Commxx_sptr get_comm_sptr()

void fill_guards()

class ECloudEFieldVORPAL2D

Public Functions

ECloudEFieldVORPAL2D()

ECloudEFieldVORPAL2D(const char * archiveName)

ECloudEFieldVORPAL2D(Commxx_sptr comm_sptr, const char * archiveName)

~ECloudEFieldVORPAL2D()

ECloudEFieldVORPAL2D(const ECloudEFieldVORPAL2D &)

bool loadFromFile(const char * archiveName)

double GetFieldEX(double x, double y, double dz)

double GetFieldEY(double x, double y, double dz)

bool loadSynergia(const char * archiveName, boost::shared_ptr< Rectangular_grid > sGridEx, boost::shared_ptr< Rectangular_grid > sGridEy)

bool loadSynergia(boost::shared_ptr< Rectangular_grid > sGridEx, boost::shared_ptr< Rectangular_grid > sGridEy)

void cleanup()

Commxx_sptr getComm()

std::string getVersion()

std::string getVORPALJobName()

int getVerticalChebychevOrder()

std::vector< YXScanAtdZ > getData()

double getYLow()

double getYUp()

int getNumPtDZ()

int getNumPtX()

int getNumChebCoef()

int getNumDoubles()

void loadOneScan(bool isEX, double dz, double x, double yLow, double yUp, size_t chebOrder, gsl_cheb_series * chebSerie)

void archiveIt(const char * fNameOut)

void setVersion(const char * c)

void setVORPALJobName(const char * c)

void setYLimits(double l, double u)

class YScanAtX

Public Functions

YScanAtX()

template < class Archive >
void serialize(Archive & ar, const unsigned int)

Public Members

double x

std::vector< double > coefChebEX

std::vector< double > coefChebEY

class YXScanAtdZ

Public Functions

YXScanAtdZ()

template < class Archive >
void serialize(Archive & ar, const unsigned int)

Public Members

double dz

std::vector< ECloudEFieldVORPAL2D::YScanAtX > data

class Ecloud_from_vorpal

Public Functions

Ecloud_from_vorpal(Commxx_sptr comm_sptr, const std::string & file_name_archive, const std::string aDeviceName = std::string(“all”))

Ecloud_from_vorpal()

void apply(Bunch & bunch, double time_step, Step & step, int verbosity, Logger & logger)

std::string get_field_name()

std::string get_file_name_archive()

size_t get_number_devices()

std::string get_device_name(size_t k = 0)

void add_device(const std::string & device)

void set_enhancing_factor(double f)

double get_enhancing_factor()

template < class Archive >
void save(Archive & ar, const unsigned int version)

template < class Archive >
void load(Archive & ar, const unsigned int version)

~Ecloud_from_vorpal()

class Fftw_rectangular_helper

Public Functions

Fftw_rectangular_helper(std::vector< int > const & grid_shape, Commxx_sptr comm_f_sptr)

Commxx_sptr get_comm_sptr()

void reset_comm_f(Commxx_sptr comm_sptr)

ptrdiff_t get_local_nx()

ptrdiff_t get_local_x_start()

void transform(MArray3d_ref & in, MArray3d_ref & out)

void inv_transform(MArray3d_ref & in, MArray3d_ref & out)

~Fftw_rectangular_helper()

class Impedance

Public Functions

Impedance()

Impedance(std::string const & wake_file, std::string const & wake_type, int const & zgrid, double const & orbit_length, double const & bunchsp, int const nstored_turns, bool full_machine = false, std::vector< int > wn = std::vector< int >())

Impedance(std::string const & wake_file, std::string const & wake_type, int const & zgrid, double const & orbit_length, int const & num_buckets, int const nstored_turns, bool full_machine = false, std::vector< int > wn = std::vector< int >())

Impedance(Impedance const & impedance)

Impedance * clone()

void set_z_grid(int const & zgrid)

int get_z_grid()

Wake_field_sptr get_wake_field_sptr()

double get_orbit_length()

double get_wake_factor()

double get_bunch_spacing()

int get_num_buckets()

std::vector< int > get_train_wave()

MArray1d_ref & get_xmom()

MArray1d_ref & get_ymom()

MArray1d_ref & get_zdensity()

MArray1int_ref & get_bin_partition()

MArray1d_ref const & get_xmom()

MArray1d_ref const & get_ymom()

MArray1d_ref const & get_zdensity()

MArray1int_ref const & get_bin_partition()

MArray1d_ref & get_xwake_leading()

MArray1d_ref const & get_xwake_leading()

MArray1d_ref & get_xwake_trailing()

MArray1d_ref const & get_xwake_trailing()

MArray1d_ref & get_ywake_leading()

MArray1d_ref const & get_ywake_leading()

MArray1d_ref & get_ywake_trailing()

MArray1d_ref const & get_ywake_trailing()

MArray1d_ref & get_zwake0()

MArray1d_ref const & get_zwake0()

std::list< std::vector< Bunch_properties > > & get_stored_vbunches()

bool is_full_machine()

int get_nstored_turns()

void apply(Bunch & bunch, double time_step, Step & step, int verbosity, Logger & logger)

void apply(Bunch_train & bunch_train, double time_step, Step & step, int verbosity, Train_diagnosticss const & per_operation_train_diagnosticss, Logger & logger)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Impedance()

class Rectangular_grid

Public Functions

Rectangular_grid(std::vector< double > const & physical_size, std::vector< double > const & physical_offset, std::vector< int > const & grid_shape, bool periodic_z, storage3d storage = boost::c_storage_order())

Rectangular_grid(Rectangular_grid_domain_sptr rectangular_grid_domain_sptr, storage3d storage = boost::c_storage_order())

Rectangular_grid_domain const & get_domain()

MArray3d_ref const & get_grid_points()

MArray3d_ref & get_grid_points()

MArray2dc_ref const & get_grid_points_2dc()

MArray2dc_ref & get_grid_points_2dc()

MArray1d_ref const & get_grid_points_1d()

MArray1d_ref & get_grid_points_1d()

void set_normalization(double val)

double get_normalization()

storage3d get_storage()

double get_interpolated(std::vector< double > location)

double get_interpolated_coord(double x, double y, double z)

class Rectangular_grid_domain

Public Functions

Rectangular_grid_domain(std::vector< double > const & physical_size, std::vector< double > const & physical_offset, std::vector< int > const & grid_shape, bool periodic_z)

Rectangular_grid_domain(std::vector< double > const & physical_size, std::vector< double > const & physical_offset, std::vector< int > const & grid_shape)

Rectangular_grid_domain(std::vector< double > const & physical_size, std::vector< int > const & grid_shape, bool periodic_z)

std::vector< double > const & get_physical_size()

std::vector< double > const & get_physical_offset()

std::vector< int > const & get_grid_shape()

std::vector< double > const & get_cell_size()

bool is_periodic()

std::vector< double > const & get_left()

bool get_leftmost_indices_offsets(double x, double y, double z, int & ix, int & iy, int & iz, double & offx, double & offy, double & offz)

void get_cell_coordinates(int ix, int iy, int iz, double & x, double & y, double & z)

class Space_charge_2d_bassetti_erskine

Public Functions

Space_charge_2d_bassetti_erskine()

void set_sigma(double sigma_x, double sigma_y, double sigma_cdt)

std::vector< double > normalized_efield(double x, double y)

void normalized_efield(double x, double y, double & E_x, double & E_y)

void apply(Bunch & bunch, double time_step, Step & step, int verbosity, Logger & logger)

~Space_charge_2d_bassetti_erskine()

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

class Space_charge_2d_open_hockney

Note: internal grid is stored in [z][y][x] order, but grid shape expects [x][y][z] order.

Public Type

Green_fn_type enum

Values:

  • pointlike = = 1 -
  • bruteforce = = 2 -

Charge_density_comm enum

Values:

  • reduce_scatter = = 1 -
  • charge_allreduce = = 2 -

E_force_comm enum

Values:

  • gatherv_bcast = = 1 -
  • allgatherv = = 2 -
  • e_force_allreduce = = 3 -
Public Functions

Space_charge_2d_open_hockney(Commxx_sptr comm_sptr, std::vector< int > const & grid_shape, bool need_state_conversion = true, bool periodic_z = false, double z_period = 0.0, bool grid_entire_period = false, double n_sigma = 8.0)

Space_charge_2d_open_hockney(Distributed_fft2d_sptr distributed_fft2d_sptr, bool need_state_conversion = true, bool periodic_z = false, double z_period = 0.0, bool grid_entire_period = false, double n_sigma = 8.0)

Note: Use Space_charge_2d_open_hockney::get_internal_grid_shape for Distributed_fft2d.

Space_charge_2d_open_hockney()

bool get_need_state_conversion()

double get_n_sigma()

void set_green_fn_type(Green_fn_type green_fn_type)

Green_fn_type get_green_fn_type()

void set_charge_density_comm(Charge_density_comm charge_density_comm)

Charge_density_comm get_charge_density_comm()

void set_e_force_comm(E_force_comm e_force_comm)

E_force_comm get_e_force_comm()

void auto_tune_comm(bool verbose = false)

void set_fixed_domain(Rectangular_grid_domain_sptr domain_sptr)

void update_domain(Bunch const & bunch)

Rectangular_grid_domain const & get_domain()

Rectangular_grid_domain_sptr get_doubled_domain_sptr()

Distributed_rectangular_grid_sptr get_global_charge_density2_reduce_scatter(Rectangular_grid const & local_charge_density, Commxx_sptr comm_sptr)

Returns global charge density on doubled grid in [C/m^3].

Distributed_rectangular_grid_sptr get_global_charge_density2_allreduce(Rectangular_grid const & local_charge_density, Commxx_sptr comm_sptr)

Returns global charge density on doubled grid in [C/m^3].

Rectangular_grid_sptr get_local_charge_density(Bunch const & bunch)

Returns local charge density on doubled grid in [C/m^3].

Distributed_rectangular_grid_sptr get_global_charge_density2(Rectangular_grid const & local_charge_density, Commxx_sptr comm_sptr)

Returns global charge density on doubled grid in [C/m^3].

Distributed_rectangular_grid_sptr get_green_fn2_pointlike()

Returns Green function on the doubled grid in [1/m^3].

Distributed_rectangular_grid_sptr get_green_fn2_brute_force()

Rectangular_grid_sptr get_global_electric_force2_gatherv_bcast(Distributed_rectangular_grid const & dist_force)

Rectangular_grid_sptr get_global_electric_force2_allgatherv(Distributed_rectangular_grid const & dist_force)

Rectangular_grid_sptr get_global_electric_force2_allreduce(Distributed_rectangular_grid const & dist_force)

Rectangular_grid_sptr get_global_electric_force2(Distributed_rectangular_grid const & dist_force)

void apply_kick(Bunch & bunch, Distributed_rectangular_grid const & rho2_1d, Rectangular_grid const & Fn, double delta_tau)

void apply(Bunch & bunch, double time_step, Step & step, int verbosity, Logger & logger)

void set_files(std::string const & xfile, std::string const & yfile)

template < class Archive >
void save(Archive & ar, const unsigned int version)

template < class Archive >
void load(Archive & ar, const unsigned int version)

~Space_charge_2d_open_hockney()

class Space_charge_3d_open_hockney

Note: internal grid is stored in [z][y][x] order, but grid shape expects [x][y][z] order.

Public Type

Green_fn_type enum

Values:

  • pointlike = = 1 -
  • linear = = 2 -

Charge_density_comm enum

Values:

  • reduce_scatter = = 1 -
  • charge_allreduce = = 2 -

E_field_comm enum

Values:

  • gatherv_bcast = = 1 -
  • allgatherv = = 2 -
  • e_field_allreduce = = 3 -
Public Functions

Space_charge_3d_open_hockney(std::vector< int > const & grid_shape, bool longitudinal_kicks = true, bool periodic_z = false, double z_period = 0.0, bool grid_entire_period = false, double n_sigma = 8.0)

Space_charge_3d_open_hockney(Commxx_divider_sptr commxx_divider_sptr, std::vector< int > const & grid_shape, bool longitudinal_kicks = true, bool periodic_z = false, double z_period = 0.0, bool grid_entire_period = false, double n_sigma = 8.0)

Space_charge_3d_open_hockney(Commxx_sptr comm_sptr, std::vector< int > const & grid_shape, bool longitudinal_kicks = true, bool periodic_z = false, double z_period = 0.0, bool grid_entire_period = false, double n_sigma = 8.0)

Deprecated. The comm_sptr argument is ignored.

Space_charge_3d_open_hockney()

Note: Use Space_charge_3d_open_hockney::get_internal_grid_shape for Distributed_fft3d.

jfa: unnecessary complication

void setup_communication(Commxx_sptr const & bunch_comm_sptr)

void setup_derived_communication()

double get_n_sigma()

void set_green_fn_type(Green_fn_type green_fn_type)

Green_fn_type get_green_fn_type()

void set_charge_density_comm(Charge_density_comm charge_density_comm)

Charge_density_comm get_charge_density_comm()

void set_e_field_comm(E_field_comm e_field_comm)

E_field_comm get_e_field_comm()

void auto_tune_comm(Bunch & bunch, bool verbose = false)

void set_fixed_domain(Rectangular_grid_domain_sptr domain_sptr)

void update_domain(Bunch const & bunch)

Rectangular_grid_domain const & get_domain()

Rectangular_grid_domain_sptr get_doubled_domain_sptr()

Distributed_rectangular_grid_sptr get_global_charge_density2_reduce_scatter(Rectangular_grid const & local_charge_density, Commxx_sptr comm_sptr)

Returns global charge density on doubled grid in [C/m^3].

Distributed_rectangular_grid_sptr get_global_charge_density2_allreduce(Rectangular_grid const & local_charge_density, Commxx_sptr comm_sptr)

Returns global charge density on doubled grid in [C/m^3].

Rectangular_grid_sptr get_local_charge_density(Bunch const & bunch)

Returns local charge density on original grid in [C/m^3].

Distributed_rectangular_grid_sptr get_global_charge_density2(Rectangular_grid const & local_charge_density, Commxx_sptr comm_sptr)

Returns global charge density on doubled grid in [C/m^3].

Distributed_rectangular_grid_sptr get_green_fn2_pointlike()

Returns Green function on the doubled grid in [1/m^3].

Distributed_rectangular_grid_sptr get_green_fn2_linear()

Distributed_rectangular_grid_sptr extract_scalar_field(Distributed_rectangular_grid const & scalar_field2)

Distributed_rectangular_grid_sptr get_electric_field_component(Distributed_rectangular_grid const & scalar_field, int component)

Returns component of electric field [V/m].

Parameters
  • scalar_field -

    the scalar field [V]

  • component -

    which component (0=x, 1=y, 2=z)

Rectangular_grid_sptr get_global_electric_field_component_gatherv_bcast(Distributed_rectangular_grid const & dist_field)

Rectangular_grid_sptr get_global_electric_field_component_allgatherv(Distributed_rectangular_grid const & dist_field)

Rectangular_grid_sptr get_global_electric_field_component_allreduce(Distributed_rectangular_grid const & dist_field)

Rectangular_grid_sptr get_global_electric_field_component(Distributed_rectangular_grid const & dist_field)

void apply_kick(Bunch & bunch, Rectangular_grid const & En, double delta_tau, int component)

void apply(Bunch & bunch, double time_step, Step & step, int verbosity, Logger & logger)

template < class Archive >
void save(Archive & ar, const unsigned int version)

template < class Archive >
void load(Archive & ar, const unsigned int version)

~Space_charge_3d_open_hockney()

class Space_charge_rectangular

Public Functions

Space_charge_rectangular(Commxx_sptr comm_f_sptr, std::vector< double > const & pipe_size, std::vector< int > const & grid_shape, bool equally_spread)

Space_charge_rectangular(std::vector< double > const & pipe_size, std::vector< int > const & grid_shape)

Space_charge_rectangular()

void set_fftw_helper(Commxx_sptr comm_sptr, bool equally_spread)

Commxx_sptr get_comm_sptr()

std::vector< double > get_pipe_size()

std::vector< int > get_grid_shape()

Rectangular_grid_domain const & get_domain()

Fftw_rectangular_helper_sptr get_fftw_helper_sptr()

Rectangular_grid_sptr get_charge_density(Bunch const & bunch)

Rectangular_grid_sptr get_En(Distributed_rectangular_grid & phi_local, int component)

std::vector< Rectangular_grid_sptr > get_Efield(Rectangular_grid & rho, Bunch const & bunch, int max_component)

void apply_kick(Bunch & bunch, Rectangular_grid const & En, double time_step, int component)

void apply(Bunch & bunch, double time_step, Step & step, int verbosity, Logger & logger)

template < class Archive >
void save(Archive & ar, const unsigned int version)

template < class Archive >
void load(Archive & ar, const unsigned int version)

~Space_charge_rectangular()

class Wake_field

Public Functions

Wake_field()

Wake_field(std::string const & wake_file, std::string const & wake_type)

std::string get_wake_type()

std::string get_wake_file_name()

MArray1d_ref const get_z_coord()

MArray1d_ref const get_xw_lead()

MArray1d_ref const get_xw_trail()

MArray1d_ref const get_yw_lead()

MArray1d_ref const get_yw_trail()

MArray1d_ref const get_z_wake()

int get_istart()

double get_zstart()

double get_delta_z()

void multiply_xw_lead(double mltp)

void multiply_xw_trail(double mltp)

void multiply_yw_lead(double mltp)

void multiply_yw_trail(double mltp)

void multiply_z_wake(double mltp)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Wake_field()

Warning

doxygenclass: Cannot find class “YScanAtX” in doxygen xml output for project “project0” from directory: xml

Warning

doxygenclass: Cannot find class “YXScanAtdZ” in doxygen xml output for project “project0” from directory: xml

Typedefs

typedef boost::shared_ptr< Distributed_rectangular_grid > Distributed_rectangular_grid_sptr

typedef boost::shared_ptr< Ecloud_from_vorpal > Ecloud_from_vorpal_sptr

typedef boost::shared_ptr< Fftw_rectangular_helper > Fftw_rectangular_helper_sptr

typedef boost::shared_ptr< Impedance > Impedance_sptr

typedef boost::shared_ptr< Rectangular_grid_domain > Rectangular_grid_domain_sptr

typedef boost::shared_ptr< Rectangular_grid > Rectangular_grid_sptr

typedef boost::shared_ptr< Space_charge_2d_bassetti_erskine > Space_charge_2d_bassetti_erskine_sptr

typedef boost::shared_ptr< Space_charge_2d_open_hockney > Space_charge_2d_open_hockney_sptr

typedef boost::shared_ptr< Space_charge_3d_open_hockney > Space_charge_3d_open_hockney_sptr

typedef boost::shared_ptr< Space_charge_rectangular > Space_charge_rectangular_sptr