OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Public Types | Public Member Functions | Private Attributes | List of all members
MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type > Class Template Reference

This class generates the matrices for the one turn matrix of a cyclotron. More...

#include <MapGenerator.h>

Public Types

typedef Value_type value_type
 Type of variables. More...
 
typedef Size_type size_type
 Type for specifying sizes. More...
 
typedef Series_type series_type
 Type of truncated power series. More...
 
typedef Map_type map_type
 Type of a map. More...
 
typedef Hamiltonian_type hamiltonian_type
 Type of the Hamiltonian. More...
 
typedef Space_charge_type space_charge_type
 Type of the Hamiltonian representing the space charge. More...
 
typedef boost::numeric::ublas::matrix< value_typematrix_type
 Type for specifying matrices. More...
 
typedef std::vector< value_typevector_type
 Type for specifying vectors. More...
 

Public Member Functions

 MapGenerator (size_type)
 Initialize. More...
 
matrix_type generateMap (const series_type &, value_type, size_type)
 Generates a map based on the Hamiltonian for a given angle. More...
 
void combine (std::vector< matrix_type > &, std::vector< matrix_type > &)
 Combine given maps. More...
 
matrix_type combine (std::vector< matrix_type > &maps)
 
matrix_type getMap ()
 Returns the one turn map. More...
 
std::pair< value_type, value_typecomputeTunes (const matrix_type &map)
 

Private Attributes

size_type nMaps_m
 Number of maps. More...
 
matrix_type Mturn_m
 One-turn matrix. More...
 

Detailed Description

template<typename Value_type, typename Size_type, typename Series_type, typename Map_type, typename Hamiltonian_type, typename Space_charge_type>
class MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >

This class generates the matrices for the one turn matrix of a cyclotron.

Definition at line 30 of file MapGenerator.h.

Member Typedef Documentation

◆ hamiltonian_type

template<typename Value_type , typename Size_type , typename Series_type , typename Map_type , typename Hamiltonian_type , typename Space_charge_type >
typedef Hamiltonian_type MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::hamiltonian_type

Type of the Hamiltonian.

Definition at line 42 of file MapGenerator.h.

◆ map_type

template<typename Value_type , typename Size_type , typename Series_type , typename Map_type , typename Hamiltonian_type , typename Space_charge_type >
typedef Map_type MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::map_type

Type of a map.

Definition at line 40 of file MapGenerator.h.

◆ matrix_type

template<typename Value_type , typename Size_type , typename Series_type , typename Map_type , typename Hamiltonian_type , typename Space_charge_type >
typedef boost::numeric::ublas::matrix<value_type> MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::matrix_type

Type for specifying matrices.

Definition at line 47 of file MapGenerator.h.

◆ series_type

template<typename Value_type , typename Size_type , typename Series_type , typename Map_type , typename Hamiltonian_type , typename Space_charge_type >
typedef Series_type MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::series_type

Type of truncated power series.

Definition at line 38 of file MapGenerator.h.

◆ size_type

template<typename Value_type , typename Size_type , typename Series_type , typename Map_type , typename Hamiltonian_type , typename Space_charge_type >
typedef Size_type MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::size_type

Type for specifying sizes.

Definition at line 36 of file MapGenerator.h.

◆ space_charge_type

template<typename Value_type , typename Size_type , typename Series_type , typename Map_type , typename Hamiltonian_type , typename Space_charge_type >
typedef Space_charge_type MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::space_charge_type

Type of the Hamiltonian representing the space charge.

Definition at line 44 of file MapGenerator.h.

◆ value_type

template<typename Value_type , typename Size_type , typename Series_type , typename Map_type , typename Hamiltonian_type , typename Space_charge_type >
typedef Value_type MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::value_type

Type of variables.

Definition at line 34 of file MapGenerator.h.

◆ vector_type

template<typename Value_type , typename Size_type , typename Series_type , typename Map_type , typename Hamiltonian_type , typename Space_charge_type >
typedef std::vector<value_type> MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::vector_type

Type for specifying vectors.

Definition at line 49 of file MapGenerator.h.

Constructor & Destructor Documentation

◆ MapGenerator()

template<typename Value_type , typename Size_type , typename Series_type , typename Map_type , typename Hamiltonian_type , typename Space_charge_type >
MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::MapGenerator ( size_type  nMaps)

Initialize.

Parameters
nMapsis the number of maps

Definition at line 115 of file MapGenerator.h.

Member Function Documentation

◆ combine() [1/2]

template<typename Value_type , typename Size_type , typename Series_type , typename Map_type , typename Hamiltonian_type , typename Space_charge_type >
void MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::combine ( std::vector< matrix_type > &  Mscs,
std::vector< matrix_type > &  Mcycs 
)

Combine given maps.

Combines the space charge maps (for each angle one) and the cyclotron maps (for each angle one) to the ont turn map, taking lists of maps

Parameters
Mscsis a list of space charge maps (the higher the index, the higher the angle)
Mcycsis a list of cyclotron maps (the higher the index, the higher the angle)

Definition at line 168 of file MapGenerator.h.

◆ combine() [2/2]

template<typename Value_type , typename Size_type , typename Series_type , typename Map_type , typename Hamiltonian_type , typename Space_charge_type >
MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::matrix_type MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::combine ( std::vector< matrix_type > &  maps)

Combine given container of maps.

Parameters
mapsto be combined.

Definition at line 197 of file MapGenerator.h.

References prod().

Here is the call graph for this function:

◆ computeTunes()

template<typename Value_type , typename Size_type , typename Series_type , typename Map_type , typename Hamiltonian_type , typename Space_charge_type >
std::pair< Value_type, Value_type > MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::computeTunes ( const matrix_type map)

Compute the radial and vertical tune from the map.

Parameters
mapfrom where to compute the tunes.
Returns
the radial and vertical tunes (in this order)

Definition at line 246 of file MapGenerator.h.

References abs(), acos(), arg(), Physics::u_two_pi, and value_type().

Here is the call graph for this function:

◆ generateMap()

template<typename Value_type , typename Size_type , typename Series_type , typename Map_type , typename Hamiltonian_type , typename Space_charge_type >
MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::matrix_type MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::generateMap ( const series_type H,
value_type  ds,
size_type  order 
)

Generates a map based on the Hamiltonian for a given angle.

Parameters
Hrepresents the Hamiltonian
dsis the step size (angle dependent)
orderis the truncation order of the Taylor series of the exponential function

Definition at line 136 of file MapGenerator.h.

References ExpMap().

Here is the call graph for this function:

◆ getMap()

template<typename Value_type , typename Size_type , typename Series_type , typename Map_type , typename Hamiltonian_type , typename Space_charge_type >
MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::matrix_type MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::getMap

Returns the one turn map.

Definition at line 228 of file MapGenerator.h.

Member Data Documentation

◆ Mturn_m

template<typename Value_type , typename Size_type , typename Series_type , typename Map_type , typename Hamiltonian_type , typename Space_charge_type >
matrix_type MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::Mturn_m
private

One-turn matrix.

Definition at line 94 of file MapGenerator.h.

◆ nMaps_m

template<typename Value_type , typename Size_type , typename Series_type , typename Map_type , typename Hamiltonian_type , typename Space_charge_type >
size_type MapGenerator< Value_type, Size_type, Series_type, Map_type, Hamiltonian_type, Space_charge_type >::nMaps_m
private

Number of maps.

Definition at line 92 of file MapGenerator.h.


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