src/ESRLib/CubicSys.cc
/* This function sets up a static list of ions that are available for being
   a cubic system.  The list is shared by all cubic systems delcared in a GAMMA
   program. A non-zero value of the ion number (NIons) indicates that the list
   has been initialized so that one may avoid repeated initializations. The
   ion array, CubicIons, is first allocated and set to contain empty ions. Then
   we loop over the available magnetic ions and fill up CubicIons with
   appropriate values.                                                       */
This function sets up a static list of ions that are available for being
a cubic system.  The list is shared by all cubic systems delcared in a GAMMA
program. A non-zero value of the ion number (NIons) indicates that the list
has been initialized so that one may avoid repeated initializations. The
ion array, CubicIons, is first allocated and set to contain empty ions. Then
we loop over the available magnetic ions and fill up CubicIons with
appropriate values.
This function sets up a static list of ions that are available for being a cubic system . The list is shared by all cubic systems delcared in a GAMMA program . A non - zero value of the ion number ( NIons ) indicates that the list has been initialized so that one may avoid repeated initializations . The ion array CubicIons is first allocated and set to contain empty ions . Then we loop over the available magnetic ions and fill up CubicIons with appropriate values .
void CubicSys::SetIonList()
  {
  NIons = 11;					
  int i=0;					
  CubicIons = new MagIon[11];			
  MagIon* MI = CubicIons;			
  for(; i<NIons; i++, MI++)			
    MI = new MagIon(); 				
  int Spins[11] = {  6,  9, 10,  9,  6, 13, 16, 17, 16, 13, 8 };
  int Charges[11] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 };
  int Numbers[11] = { 58, 59, 60, 61, 62, 65, 66, 67, 68, 69, 70 };
  int Masses[11] = { 140, 141, 144, 145, 150, 159, 162, 165, 168, 169, 173 };
  double Weights[11] = { 140.12,   140.9077, 144.24,   145.0,  150.36, 
                         158.9245, 160.50,   164.9304, 167.26, 168.9342,
                         173.04 };
  string Names[11] = { "Cerium",  "Praseodymium", "Neodymium", 
                                                  "Promethium", "Samarium",
                       "Terbium", "Dysprosium",   "Holmium",    "Erbium",
                                                  "Thulium",    "Ytterbium" };
  string Elements[11] = { "Ce", "Pr", "Nd", "Pm", "Sm",
                          "Tb", "Dy", "Ho", "Er", "Tm", "Yb" };
  double gJValues[11] = { 6.0/7.0, 4.0/5.0, 8.0/11.0, 3.0/5.0, 2.0/7.0,
                          3.0/2, 4.0/3.0, 5.0/4.0,  6.0/5.0, 7.0/6.0, 8.0/7.0 };
  double betaValues[11] = { 6.3492e-3, -7.3462e-4, -2.9111e-4,  4.0755e-4,
                            2.5012e-3,  1.2244e-4, -5.9200e-5, -3.3300e-5,
                            4.4400e-5,  1.6325e-4,  1.7316e-3 };
  double gammaValues[11] = { 0.0,        6.0994e-5, -3.7988e-5,  6.0781e-5,
                             0.0,       -1.1212e-6,  1.0350e-6, -1.2937e-6,
                             2.0699e-6, -5.6061e-6,  1.4800e-4 };
  for(i=0, MI=CubicIons; i<NIons; i++, MI++)	
    {
    MI->_HS          = Spins[i]; 		
    MI->_number      = Numbers[i]; 		
    MI->_charge      = Charges[i];		
    MI->_mass        = Masses[i]; 		
    MI->_weight      = Weights[i]; 		
    MI->_name        = Names[i];		
    MI->_element     = Elements[i];		
    MI->_gJ          = gJValues[i];		
    MI->_beta        = betaValues[i];           
    MI->_gamma       = gammaValues[i];          
    MI->_symbol      = MI->_element 
                     + Gdec(MI->_charge);
    if(MI->_charge > 0) MI->_symbol += "+";
    if(MI->_charge < 0) MI->_symbol += "-";
    }
  }
void CubicSys :: SetIonList ( ) { NIons = 11 ; int i = 0 ; CubicIons = new MagIon [ 11 ] ; MagIon * MI = CubicIons ; for ( ; i < NIons ; i ++ , MI ++ ) MI = new MagIon ( ) ; int Spins [ 11 ] = { 6 , 9 , 10 , 9 , 6 , 13 , 16 , 17 , 16 , 13 , 8 } ; int Charges [ 11 ] = { 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 } ; int Numbers [ 11 ] = { 58 , 59 , 60 , 61 , 62 , 65 , 66 , 67 , 68 , 69 , 70 } ; int Masses [ 11 ] = { 140 , 141 , 144 , 145 , 150 , 159 , 162 , 165 , 168 , 169 , 173 } ; double Weights [ 11 ] = { 140.12 , 140.9077 , 144.24 , 145.0 , 150.36 , 158.9245 , 160.50 , 164.9304 , 167.26 , 168.9342 , 173.04 } ; string Names [ 11 ] = { " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " } ; string Elements [ 11 ] = { " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " } ; double gJValues [ 11 ] = { 6.0 / 7.0 , 4.0 / 5.0 , 8.0 / 11.0 , 3.0 / 5.0 , 2.0 / 7.0 , 3.0 / 2 , 4.0 / 3.0 , 5.0 / 4.0 , 6.0 / 5.0 , 7.0 / 6.0 , 8.0 / 7.0 } ; double betaValues [ 11 ] = { 6.3492e-3 , -7.3462e-4 , -2.9111e-4 , 4.0755e-4 , 2.5012e-3 , 1.2244e-4 , -5.9200e-5 , -3.3300e-5 , 4.4400e-5 , 1.6325e-4 , 1.7316e-3 } ; double gammaValues [ 11 ] = { 0.0 , 6.0994e-5 , -3.7988e-5 , 6.0781e-5 , 0.0 , -1.1212e-6 , 1.0350e-6 , -1.2937e-6 , 2.0699e-6 , -5.6061e-6 , 1.4800e-4 } ; for ( i = 0 , MI = CubicIons ; i < NIons ; i ++ , MI ++ ) { MI -> _HS = Spins [ i ] ; MI -> _number = Numbers [ i ] ; MI -> _charge = Charges [ i ] ; MI -> _mass = Masses [ i ] ; MI -> _weight = Weights [ i ] ; MI -> _name = Names [ i ] ; MI -> _element = Elements [ i ] ; MI -> _gJ = gJValues [ i ] ; MI -> _beta = betaValues [ i ] ; MI -> _gamma = gammaValues [ i ] ; MI -> _symbol = MI -> _element + Gdec ( MI -> _charge ) ; if ( MI -> _charge > 0 ) MI -> _symbol += " " ; if ( MI -> _charge < 0 ) MI -> _symbol += " " ; } }
This function sets up a static list of ions that are available for being
a cubic system.
This function sets up a static list of ions that are available for being a cubic system .
// Set # magnetic ions we know  // Temp looping variable // Allocate array for 'em // Pointer to 1st magnetic ion // Loop over all magnetic ions // and set them to default /*        An array of known magnetic ion spin Hilbert spaces (2*I+1)         */ /*                        An array of magnetic ion charges                  */ /*     An array of known magnetic ion atomic numbers (58=Ce, 59=Pr, ...)     */ /*   An array of known magnetic ion atomic masses  (133=Ce, 141=Pr, ...)     */ /*  Array of known magnetic ion ave. at. weights (Ce = 140.12 g/mole, ...)   */ /*                  An array of known magnetic ion names                     */ /*                      Array of magnetic ion elements                       */ // Loop all magnetic ions // Set spin Hilbert space // Set the atomic number // Set the ion charges // Set the atomic mass // Set the atomic weights // Set the magnetic ion name  // Set the magnetic ion element // Set the g scaling factor // Set the beta value // Set the gamma value