From 8f06be1281dccda558e5068d28c1ee3e49451912 Mon Sep 17 00:00:00 2001 From: Lorenzo Figini Date: Mon, 25 Aug 2014 13:40:44 +0000 Subject: [PATCH] fixed the computation of beam polarization at launch (used if the beam hits the wall before crossing the plasma) --- src/gray.f | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/gray.f b/src/gray.f index d4804e3..ed56d1c 100644 --- a/src/gray.f +++ b/src/gray.f @@ -3933,6 +3933,7 @@ c parameter(jmx=31,kmx=36,zero=0.0d0,izero=0,one=1.0d0) parameter(pi=3.14159265358979d0,cvdr=pi/180.0d0) dimension ywrk0(ndim,jmx,kmx),ypwrk0(ndim,jmx,kmx) + dimension ytmp(ndim),yptmp(ndim) dimension xc0(ndimm,jmx,kmx),du10(ndimm,jmx,kmx) dimension dffiu(jmx),ddffiu(jmx) dimension grad2(jmx,kmx),dgrad2v(ndimm,jmx,kmx) @@ -4159,6 +4160,9 @@ c ypwrk0(5,j,k) = dgr2y/an0/2.0d0 ypwrk0(6,j,k) = dgr2z/an0/2.0d0 c + ytmp=ywrk0(:,j,k) + yptmp=ypwrk0(:,j,k) + call fwork(ytmp,yptmp) call pol_limit(ext(j,k,0),eyt(j,k,0)) c grad2(j,k)=gr2 @@ -4217,6 +4221,7 @@ c parameter(jmx=31,kmx=36,zero=0.0d0,izero=0,one=1.0d0) parameter(pi=3.14159265358979d0,cvdr=pi/180.0d0) dimension ywrk0(ndim,jmx,kmx),ypwrk0(ndim,jmx,kmx) + dimension ytmp(ndim),yptmp(ndim) dimension xc0(ndimm,jmx,kmx),du10(ndimm,jmx,kmx) dimension dffiu(jmx),ddffiu(jmx) dimension grad2(jmx,kmx),dgrad2v(ndimm,jmx,kmx) @@ -4320,6 +4325,9 @@ c ypwrk0(5,j,k) = 0.0d0 ypwrk0(6,j,k) = 0.0d0 c + ytmp=ywrk0(:,j,k) + yptmp=ypwrk0(:,j,k) + call fwork(ytmp,yptmp) call pol_limit(ext(j,k,0),eyt(j,k,0)) c do iv=1,3 @@ -4376,6 +4384,7 @@ c parameter(jmx=31,kmx=36,zero=0.0d0,izero=0,one=1.0d0) parameter(pi=3.14159265358979d0,cvdr=pi/180.0d0) dimension ywrk0(ndim,jmx,kmx),ypwrk0(ndim,jmx,kmx) + dimension ytmp(ndim),yptmp(ndim) dimension yyrfl(jmx,kmx,ndim) dimension xc0(ndimm,jmx,kmx),du10(ndimm,jmx,kmx) dimension dffiu(jmx),ddffiu(jmx) @@ -4423,6 +4432,9 @@ c ypwrk0(5,j,k) = 0.0d0 ypwrk0(6,j,k) = 0.0d0 c + ytmp=ywrk0(:,j,k) + yptmp=ypwrk0(:,j,k) + call fwork(ytmp,yptmp) call pol_limit(ext(j,k,0),eyt(j,k,0)) c do iv=1,3