Skip to content

Commit

Permalink
Small cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpersson committed Jun 8, 2020
1 parent 05e7050 commit 7f106f1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
5 changes: 1 addition & 4 deletions libs/DISTlib/source/distgeneration.c
Expand Up @@ -252,7 +252,6 @@ void createcoordinates(int index, double start, double stop, int length, int ty
tmp = randray(start, stop);

dist->incoord[i]->coord[index] = tmp;
//printf("%f \n", sqrt(tmp/2));
}
}
else
Expand Down Expand Up @@ -313,7 +312,6 @@ double randray(double mu, double sigma){


void allocateincoord(int linecount){
printf("allllocating \n");
dist->incoord = (struct coordinates**)malloc(linecount*sizeof(struct coordinates*));
dist->outcoord = (struct coordinates**)malloc(linecount*sizeof(struct coordinates*));
dist->totincoord = linecount;
Expand All @@ -335,14 +333,13 @@ void allocateincoord(int linecount){

}
dist->isallocated =1;
printf("allllocating2 \n");
}
void deallocateincoord(void){


free(dist->incoord);
free(dist->outcoord);
//dist->ref->typeused = (int*)malloc(dim*sizeof(int));
dist->isallocated =0;
dist->isallocated = 0;
dist->totincoord = -1;
}
10 changes: 5 additions & 5 deletions src/twiss.f90
Expand Up @@ -3465,8 +3465,8 @@ SUBROUTINE tmmap(code,fsec,ftrk,orbit,fmap,ek,re,te,fcentre,dl)

case (code_rfmultipole)
call tmrfmult(fsec,ftrk,orbit,fmap,ek,re,te)
case (code_changerefpc)
call tmchenergy(ftrk,orbit,fmap,ek,re, te)
case (code_changerefp0)
call tmchp0(ftrk,orbit,fmap,ek,re, te)
case default !--- anything else:
! nil (23, 28, 34)

Expand Down Expand Up @@ -6321,7 +6321,7 @@ SUBROUTINE tmdrf(fsec,ftrk,orbit,fmap,dl,ek,re,te)

end SUBROUTINE tmdrf

SUBROUTINE tmchenergy(ftrk,orbit,fmap,ek,re, te)
SUBROUTINE tmchp0(ftrk,orbit,fmap,ek,re, te)
use twisslfi
use twiss_elpfi
use twissbeamfi, only : deltap, pc, gamma, energy, beta
Expand Down Expand Up @@ -6372,7 +6372,7 @@ SUBROUTINE tmchenergy(ftrk,orbit,fmap,ek,re, te)
if(ftrk) call tmtrak(ek,re,te,orbit,orbit)


end SUBROUTINE tmchenergy
end SUBROUTINE tmchp0


SUBROUTINE tmrf(fsec,ftrk,fcentre,orbit,fmap,el,ds,ek,re,te)
Expand Down Expand Up @@ -6490,7 +6490,7 @@ SUBROUTINE tmrf(fsec,ftrk,fcentre,orbit,fmap,el,ds,ek,re,te)
call tmcat(fsec,re,te,rw,tw,re,te)


! call tmchenergy(ftrk,orbit,fmap,ek_ch,re_ch, te_ch)
! call tmchp0(ftrk,orbit,fmap,ek_ch,re_ch, te_ch)
!call tmcat(fsec,re_ch,te_ch,re,te,re,te)


Expand Down
2 changes: 1 addition & 1 deletion src/util.f90
Expand Up @@ -111,7 +111,7 @@ module code_constfi
integer, parameter :: code_nllens = 42
integer, parameter :: code_rfmultipole = 43
integer, parameter :: code_collimator = 44
integer, parameter :: code_changerefpc = 45
integer, parameter :: code_changerefp0 = 45
end module code_constfi

module aperture_enums
Expand Down

0 comments on commit 7f106f1

Please sign in to comment.