diff --git a/back_up_tracy-3.5.sh b/back_up_tracy-3.5.sh deleted file mode 100755 index 1ff4af0f59519d1f14259754d5ca167f71c9d396..0000000000000000000000000000000000000000 --- a/back_up_tracy-3.5.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -time=`date --iso-8601` - -dir=`pwd` - -tracy="tracy-3.5" - -# set home directory -cd "$dir/$tracy" - -# clean up directory -make distclean - -rm -rf autom4te.cache -rm -rf aclocal.m4 -rm -rf bin/* -rm -rf tracy/bin/* - -cd $dir - -fname="back_up_$tracy.$time.tgz" -cmd_str="tar -czf $fname "back_up_$tracy.sh" "make_$tracy.sh" $tracy" -echo "$cmd_str" -`$cmd_str` diff --git a/lattice/example/soleil/Example_input.prm b/lattice/example/soleil/Example_input.prm deleted file mode 100644 index c03d692bf0dbaf5b831dbde9458905b36e87be51..0000000000000000000000000000000000000000 --- a/lattice/example/soleil/Example_input.prm +++ /dev/null @@ -1,205 +0,0 @@ -#******************************************************************* -# 15 March 2010 -# File for checking TRacy is running well -# -# input script to set the file and bool flag -# -# comments: -# 1) The rules to define commands are described in the tracy mannual. -# -# 2) Test verison for the development of Tracy 3, always the nearest -# input file verison. -# -# 12/2011 Jianfeng Zhang -# -#****************************************************************** - -#================================================ -# mandatory parts -#================================================ - -# relative directory of the files in the script - in_dir /home/zhang/codes/TracyIII/lattice/ - -# lattice file must be wihout .lat extension - lat_file soleil_120cor - -# H-corrector name in lattice file - h_corr HCM -# V-corrector name in lattice file - v_corr VCM -# girder start symbol - gs GS -# girder end symbol - ge GE -# BPM name in lattice file - bpm_name BPM -# skew quadrupole - qt QT - -#====================================== -# GLOBAL PARAMETER PART -#====================================== - -# Activate quadrupole Fringefield - QuadFringeOnFlag - -# Deactivate quadrupole Fringefield - QuadFringeOffFlag - -# VACCUUM CHAMBER PART -# read vacuum chamber from chamber_file - ReadChamberFlag example_Chamber.dat - -# set RF voltage, if false, then use the definition value -# of RF cavity in the lattice - RFvoltageFlag 3000000 - -#====================================== -#specific for SOLEIL lattice -#====================================== - -# read the multipole field error, and add -# the corresponding components of the element - multipole_file multipole_error_fullquad.dat -# files for looking for the multipole field errors of -# correctors and skew quadrupoles, which are integrated in the sextupoles - fic_hcorr corh.txt - fic_vcorr corv.txt - fic_skew corqt.txt - - ReadMultipoleFlag - - -# file of source of coupling; only works for SOLEIL lattice - virtualskewquad_file virtual_skew_quad_currents.txt - -#### Virtual Skew quadrupole FACTORY -# read the virtual setting of skew quadrupoles from a file - ReadVirtualSkewquadFlag - -# add random rotation error to the two half quadrupoles -# to introduce coupling into the lattice - ErrorCoupling2Flag 0 0.0007 - -# fit tune for the lattice with each quadrupole is cut into two pieces -# name, flag, tuned quadrople,tuned quadrople,targetnudx targetnudz - FitTune4Flag qp7a qp7b qp9a qp9b 18.202 10.317 - -#================================================= -## general command (NOT machine dependent) -#================================================= - - - - -# Read the multipole field errors, and replacement the corresponding components -# of the element. -ReadfefileFlag dip.fe - -# read the misalignment error from a file - ReadaefileFlag soleil1.ae - -##################### -# orbit correction - CODCorrectFlag - -#parameters used to do orbit correction -# file to specify which correctors are used for H orbit correction - hcorr_file hcorr_56nom.state -# file to specify which correctors are used for V orbit correction - vcorr_file vcorr_56nom.state - -#number of iterations for orbit correction, should NOT small than 1 -n_orbit 5 -#number of singular values in H-plane, must be not larger than the number of correctors used for orbit correction -nwh 60 -#number of singular values in V-plane, must be not larger than the number of correctors used for orbit correction -nwv 60 - - - - - - - -# print the twiss paramters to a file - PrintTwissFlag twisstest.out - -# print close orbit to a file - PrintCODFlag testcod.out - -#print coordinates tracking around COD at each element to a file - PrintTrackFlag tracktest.out 0.001 0.000 0.0 0.0 0.0 0.0 50 - - -# tune obtained by tracking - TuneTracFlag - -# chromaticity obtained by tracking - ChromTracFlag - -# fit tune for the lattice with full quadrupoles - FitTuneFlag q7 q9 18.202 10.317 - -# fit chromaticity - FitChromFlag sx9 sx10 2.0 2.6 - -# tune shift with amplitude - AmplitudeTuneShiftFlag nudxtest.out nudztest.out 50 30 516 0.035 0.02 0.0 - -# tune shift with energy - EnergyTuneShiftFlag nudptest.out 31 1026 0.06 - -# frequency map analysis for on momentum particle - FmapFlag fmaptest.out 31 21 516 0.025 0.005 0.0 true - -# frequency map analysis for off momentum particle - FmapdpFlag fmapdptest.out 101 121 1026 25e-3 0.06 0.3e-3 true - - -# add random rotation error to the full quadrupole -# to introduce coupling into the lattice - ErrorCouplingFlag 0 0.0007 - -# calcualte the coupling factor in the lattice - CouplingFlag - -# calculate momentum acceptance - MomentumAccFlag momacctest.out 6D 1 189 0.01 0.05 100 -0.01 -0.05 100 1026 0.0002 - -# calculate phase space - PhaseSpaceFlag phasetest.out 6D 1e-6 0.0 1e-6 0.0 0.012 0.0 1000 false - - -#=============================================== -### OTHER (for debug ......) -#=============================================== -# calculate induced amplitude - InducedAmplitudeFlag - -# specific for test - CodeComparaisonFlag - -# calculate Eta function - EtaFlag - - -#================================================ -# TO BE UPDATED -#=============================================== - -### Touschek lifetime -# calculate Touschek lifetime -# TouschekFlag -# Intra Beam Scattering -# IBSFlag -# Track momentum acceptance and then get Touschek lifetime -# TousTrackFlag - -# print girder -#PrintGirderFlag testgirder.out - - - - diff --git a/make_for_gcc.sh b/make_for_gcc.sh deleted file mode 100755 index a09b231356d371a7a5447f393dd93329818bce59..0000000000000000000000000000000000000000 --- a/make_for_gcc.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -#=================================================== -# script to compile non-parallel version tracy -#=================================================== - - -# not sh since on Ubuntu sh is not bash -set -x # for debugging - -if [ $# -ne 1 ] -then # affiche l'usage - echo "Missing parameter" - echo "Use: $0 debug for debug" - echo "Use: $0 opt for optimization result" - exit 1 -fi - - - -dir=`pwd` -#NUM_REC="$dir/num_rec" - -#INSTALL="/usr/bin/install" - -TRACY="tracy" - -cd "$dir/$TRACY" - -# CVS file is inside, do not erase -#rm -rf autom4te.cache -rm -rf aclocal.m4 - -make distclean - -./bootstrap - -if [ $1 == "debug" ] -then - F77=gfortran ./configure --prefix=$dir/$TRACY/tracy FFLAGS="-g -O2 -Wall -fbounds-check" CFLAGS="-g -O2 -Wall -fno-implicit-templates" CXXFLAGS="-g -O2 -Wall -fno-implicit-templates" -fi - -if [ $1 == "opt" ] -then -./configure --prefix=$dir/$TRACY/tracy FFLAGS="-O2 -Wall -fbounds-check" CFLAGS="-O2 -Wall -fno-implicit-templates" CXXFLAGS="-O2 -Wall -fno-implicit-templates" -fi - -make -make install diff --git a/make_for_isei.sh b/make_for_isei.sh deleted file mode 100755 index 3d54e724d460ff1d52679e8808e31e6093da5e71..0000000000000000000000000000000000000000 --- a/make_for_isei.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -dir=`pwd` - -#NUM_REC="$dir/num_rec" - -#INSTALL="/usr/bin/install" - -TRACY="tracy" - -cd "$dir/$TRACY" - -export TRACY_LIB="$dir/tracy" -export NUM_REC="/usr/local/applications/physmach/recipes_c-ansi" - -rm -rf autom4te.cache -rm -rf aclocal.m4 - -make distclean - -./bootstrap -FFLAGS="-O2 -Wall -fbounds-check" CXXFLAGS="-O2 -Wall -fno-implicit-templates" CC=icc F77=ifort CXX=icc ./configure --prefix=$dir/$TRACY/tracy - -make -make install diff --git a/make_tracy-3.5.sh b/make_tracy-3.5.sh deleted file mode 100755 index c001fdaa50b7e49d25fdfa0d6dcec3b15764ee2f..0000000000000000000000000000000000000000 --- a/make_tracy-3.5.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -dir=`pwd` - -#NUM_REC="$dir/num_rec" - -#INSTALL="/usr/bin/install" - -TRACY="tracy" - -cd "$dir/$TRACY" - -rm -rf autom4te.cache -rm -rf aclocal.m4 - -make distclean - -./bootstrap -./configure --prefix=$dir/$TRACY/tracy - -make -make install diff --git a/tracy/tracy/src/t2elem.cc b/tracy/tracy/src/t2elem.cc index a28630b51593d85787c1a4be5b05ee71d34338a7..a6ec5c6a6e3d2583ac2526503ec04f1edccd75d1 100644 --- a/tracy/tracy/src/t2elem.cc +++ b/tracy/tracy/src/t2elem.cc @@ -2893,26 +2893,11 @@ int GetnKid(const int Fnum1) { none Comments: - example: - long FORLIM = GetnKid(ElemIndex("CH")); // get number of CH - // search element position for Family CH - for(k=1;k<FORLIM;k++){ - fprintf(stdout, "elem %d is at position %ld \n", k, Elem_GetPos(ElemIndex("CH"), k)); - } - - - 21/12/2011 Jianfeng Zhang@ soleil - Add warning message: when call Elem_GetPos(), the kid index knum1 start from 1 !!!!! ****************************************************************************/ long Elem_GetPos(const int Fnum1, const int Knum1) { long int loc; - - if(Knum1 < 1){ - cout << "Elem_GetPos: kid index of the family starts from 1 !!!" << endl; - cout << "Element: " << ElemFam[Fnum1 - 1].ElemF.PName << "with Fnum: " <<Fnum1<<" Knum: "<<Knum1<<endl; - exit_(1); - } + if (ElemFam[Fnum1 - 1].nKid != 0) loc = ElemFam[Fnum1 - 1].KidList[Knum1 - 1]; else {