RE: lattice and magnetic field

From: Chrysostomos Valderanis <Chrysostomos.Valderanis_at_cern.ch>
Date: Thu, 5 Aug 2010 07:35:49 +0200

So, let me explain the code. If I understand correctly in your version
of the code you call the GEOL2N routine every time the MAGFLD routine is called.
In my version of the code I call ~50times the GEON2L routine in the begining and never again.
So I believe that my version is:
a. faster in the long term
b. consistent with the idea of putting GEON2R calls also in the begining. This technique is advertised in
http://www.fluka.org/content/course/NEA/lectures/Lattice.pdf page11

In any way since I am a newcomer to fluka, I would love to hear what are the best practices
in this case from people who have done this before.

Thank you for your help,
Makis
________________________________

From: Santana, Mario [mailto:msantana_at_slac.stanford.edu]
Sent: Wed 04/08/2010 21:10
To: Chrysostomos Valderanis; fluka-discuss_at_fluka.org
Subject: RE: lattice and magnetic field

I am not sure if, like its inverse function (GEOL2N), GEON2L has 4
parameters instead of the 3 that it used to have, if so, that could well
be the reason for the crashes.
In any case, I don't understand the value of all the code that you write
and which I copy further down. Why don't you just obtain the
corresponding lattice name and use that in the IF THEN structure that
defines the field? e.g.

       CALL GEOL2N(MLATTC,LATNAM,IRTLAT,Ierr)lat
       IF ((LATNAM.EQ."B3TaEL ").AND.(...)) THEN
         B=3D 0.103775493E+1
         BTX=3D 0.00000000000000E+0
         BTY=3D-0.10000000000000E+1
         BTZ=3D 0.00000000000000E+0
       ELSEIF ((LATNAM.EQ."B3TbEL ").AND.(...)) THEN
         B=3D 0.103775493E+1
         BTX=3D 0.00000000000000E+0
         BTY=3D-0.10000000000000E+1
         BTZ=3D 0.00000000000000E+0
...
        ENDIF

Of if it was easier to use numbers (like for example, if you had
alternating quads and you want to use the MOD function to tell if they
are odd or even numbers to determine the sign of the field), why can't
you just use MLATTC?
Maybe I am completely missing something, but I have the impression that
the example above will solve your problem.

Mario

-------------------------------------------------------------------------=

----
This was the routine that you attached:
        SUBROUTINE MAGFLD (X,Y,Z,BTX,BTY,BTZ,B,NREG,IDISC)
        INCLUDE '(DBLPRC)'
        INCLUDE '(DIMPAR)'
        INCLUDE '(IOUNIT)'
        INCLUDE '(LTCLCM)'
        LOGICAL ISFIRST
         INTEGER NAMEP(350 )
         INTEGER NAMEL(350 )
        DATA ISFIRST /.TRUE./
             SAVE ISFIRST,NAMEP,NAMEL
        IDISC=3D0
                                          IF (ISFIRST) THEN
         CALL GEON2L("B3TaEL  ",NAMEL(  1 ),IERR)
         CALL GEON2L("B3TbEL  ",NAMEL(  2 ),IERR)
         CALL GEON2L("B1EL    ",NAMEL(  3 ),IERR)
         CALL GEON2L("B11EL   ",NAMEL(  4 ),IERR)
         CALL GEON2L("Q2EL    ",NAMEL(  5 ),IERR)
         CALL GEON2L("Q1EL    ",NAMEL(  6 ),IERR)
         CALL GEON2L("Q3EL    ",NAMEL(  9 ),IERR)
         CALL GEON2L("B2aEL   ",NAMEL( 10 ),IERR)
         CALL GEON2L("B2bEL   ",NAMEL( 11 ),IERR)
         CALL GEON2L("B2cEL   ",NAMEL( 12 ),IERR)
         CALL GEON2L("B3aEL   ",NAMEL( 14 ),IERR)
         CALL GEON2L("B3bEL   ",NAMEL( 15 ),IERR)
         CALL GEON2L("B3cEL   ",NAMEL( 16 ),IERR)
         CALL GEON2L("Q4EL    ",NAMEL( 17 ),IERR)
         CALL GEON2L("Q5EL    ",NAMEL( 18 ),IERR)
         CALL GEON2L("Q6aEL   ",NAMEL( 20 ),IERR)
         CALL GEON2L("Q7aEL   ",NAMEL( 21 ),IERR)
         CALL GEON2L("Q8aEL   ",NAMEL( 22 ),IERR)
         CALL GEON2L("Q8bEL   ",NAMEL( 26 ),IERR)
         CALL GEON2L("Q7bEL   ",NAMEL( 27 ),IERR)
         CALL GEON2L("Q6bEL   ",NAMEL( 28 ),IERR)
         CALL GEON2L("Q9aEL   ",NAMEL( 29 ),IERR)
         CALL GEON2L("Q10aEL  ",NAMEL( 30 ),IERR)
         CALL GEON2L("B4aEL   ",NAMEL( 31 ),IERR)
         CALL GEON2L("B4bEL   ",NAMEL( 32 ),IERR)
         CALL GEON2L("B4cEL   ",NAMEL( 33 ),IERR)
         CALL GEON2L("B5aEL   ",NAMEL( 34 ),IERR)
         CALL GEON2L("B5bEL   ",NAMEL( 35 ),IERR)
         CALL GEON2L("B5cEL   ",NAMEL( 36 ),IERR)
         CALL GEON2L("Q10bEL  ",NAMEL( 37 ),IERR)
         CALL GEON2L("Q9bEL   ",NAMEL( 38 ),IERR)
         CALL GEON2L("Q11EL   ",NAMEL( 40 ),IERR)
         CALL GEON2L("B6EL    ",NAMEL( 41 ),IERR)
         CALL GEON2L("Q13EL   ",NAMEL( 43 ),IERR)
         CALL GEON2L("Q14EL   ",NAMEL( 44 ),IERR)
         CALL GEON2L("Q15EL   ",NAMEL( 45 ),IERR)
         CALL GEON2L("Q16EL   ",NAMEL( 46 ),IERR)
         CALL GEON2L("Q17EL   ",NAMEL( 47 ),IERR)
         CALL GEON2L("Q18EL   ",NAMEL( 48 ),IERR)
         CALL GEON2R("MTNH0VA ",NAMEP( 1),IERR)
         CALL GEON2R("MSNH0VA ",NAMEP( 2),IERR)
         CALL GEON2R("MBNH0VA ",NAMEP( 3),IERR)
         CALL GEON2R("MBNV0VA ",NAMEP( 4),IERR)
         CALL GEON2R("QNLQ0VA ",NAMEP( 5),IERR)
         CALL GEON2R("QWLQ0VA ",NAMEP( 6),IERR)
         CALL GEON2R("QSLQ0VA ",NAMEP( 7),IERR)
          ISFIRST =3D .FALSE.
       END IF
       IF((MLATTC.EQ.NAMEL( 1)).AND.(NREG.EQ.NAMEP( 1))) THEN
         B=3D 0.103775493E+1
         BTX=3D 0.00000000000000E+0
         BTY=3D-0.10000000000000E+1
         BTZ=3D 0.00000000000000E+0
        ENDIF
       IF((MLATTC.EQ.NAMEL( 2)).AND.(NREG.EQ.NAMEP( 1))) THEN
         B=3D 0.103775493E+1
         BTX=3D 0.00000000000000E+0
         BTY=3D-0.10000000000000E+1
         BTZ=3D 0.00000000000000E+0
        ENDIF
       IF((MLATTC.EQ.NAMEL( 3)).AND.(NREG.EQ.NAMEP( 2))) THEN
         B=3D 0.583737146E+0
         BTX=3D 0.00000000000000E+0
         BTY=3D-0.10000000000000E+1
         BTZ=3D 0.00000000000000E+0
        ENDIF
       IF((MLATTC.EQ.NAMEL( 4)).AND.(NREG.EQ.NAMEP( 2))) THEN
         B=3D 0.000000000E+0
         BTX=3D 0.00000000000000E+0
         BTY=3D-0.10000000000000E+1
         BTZ=3D 0.00000000000000E+0
        ENDIF
       IF((MLATTC.EQ.NAMEL( 5)).AND.(NREG.EQ.NAMEP( 5))) THEN
         B=3D 0.000000000E+0
         BTX=3D 0.10000000000000E+1
         BTY=3D 0.00000000000000E+0
         BTZ=3D 0.00000000000000E+0
        ENDIF
       IF((MLATTC.EQ.NAMEL( 6)).AND.(NREG.EQ.NAMEP( 7))) THEN
         B=3D 0.000000000E+0
         BTX=3D 0.10000000000000E+1
         BTY=3D 0.00000000000000E+0
         BTZ=3D 0.00000000000000E+0
        ENDIF
       IF((MLATTC.EQ.NAMEL( 9)).AND.(NREG.EQ.NAMEP( 5))) THEN
         B=3D 0.000000000E+0
         BTX=3D 0.10000000000000E+1
         BTY=3D 0.00000000000000E+0
         BTZ=3D 0.00000000000000E+0
        ENDIF
       IF((MLATTC.EQ.NAMEL(10)).AND.(NREG.EQ.NAMEP( 4))) THEN
         B=3D 0.912097630E+0
         BTX=3D 0.10000000000000E+1
         BTY=3D 0.00000000000000E+0
         BTZ=3D 0.00000000000000E+0
        ENDIF
       IF((MLATTC.EQ.NAMEL(11)).AND.(NREG.EQ.NAMEP( 4))) THEN
         B=3D 0.912097630E+0
         BTX=3D 0.10000000000000E+1
         BTY=3D 0.00000000000000E+0
         BTZ=3D 0.00000000000000E+0
        ENDIF
       IF((MLATTC.EQ.NAMEL(12)).AND.(NREG.EQ.NAMEP( 4))) THEN
         B=3D 0.912097630E+0
         BTX=3D 0.10000000000000E+1
         BTY=3D 0.00000000000000E+0
         BTZ=3D 0.00000000000000E+0
        ENDIF
       IF((MLATTC.EQ.NAMEL(14)).AND.(NREG.EQ.NAMEP( 4))) THEN
         B=3D 0.912097630E+0
         BTX=3D 0.10000000000000E+1
         BTY=3D 0.00000000000000E+0
         BTZ=3D 0.00000000000000E+0
        ENDIF
       IF((MLATTC.EQ.NAMEL(15)).AND.(NREG.EQ.NAMEP( 4))) THEN
         B=3D 0.912097630E+0
         BTX=3D 0.10000000000000E+1
         BTY=3D 0.00000000000000E+0
         BTZ=3D 0.00000000000000E+0
        ENDIF
       IF((MLATTC.EQ.NAMEL(16)).AND.(NREG.EQ.NAMEP( 4))) THEN
         B=3D 0.912097630E+0
         BTX=3D 0.10000000000000E+1
         BTY=3D 0.00000000000000E+0
         BTZ=3D 0.00000000000000E+0
        ENDIF
       IF((MLATTC.EQ.NAMEL(17)).AND.(NREG.EQ.NAMEP( 5))) THEN
         B=3D 0.000000000E+0
         BTX=3D 0.10000000000000E+1
         BTY=3D 0.00000000000000E+0
         BTZ=3D 0.00000000000000E+0
        ENDIF
       IF((MLATTC.EQ.NAMEL(18)).AND.(NREG.EQ.NAMEP( 5))) THEN
         B=3D 0.000000000E+0
         BTX=3D 0.10000000000000E+1
         BTY=3D 0.00000000000000E+0
         BTZ=3D 0.00000000000000E+0
        ENDIF
C      IF((MLATTC.EQ.NAMEL(20)).AND.(NREG.EQ.NAMEP( 6))) THEN
C        B=3D 0.000000000E+0
C        BTX=3D 0.10000000000000E+1
C        BTY=3D 0.00000000000000E+0
C        BTZ=3D 0.00000000000000E+0
C       ENDIF
C      IF((MLATTC.EQ.NAMEL(21)).AND.(NREG.EQ.NAMEP( 5))) THEN
C        B=3D 0.000000000E+0
C        BTX=3D 0.10000000000000E+1
C        BTY=3D 0.00000000000000E+0
C        BTZ=3D 0.00000000000000E+0
C       ENDIF
C      IF((MLATTC.EQ.NAMEL(22)).AND.(NREG.EQ.NAMEP( 5))) THEN
C        B=3D 0.000000000E+0
C        BTX=3D 0.10000000000000E+1
C        BTY=3D 0.00000000000000E+0
C        BTZ=3D 0.00000000000000E+0
C       ENDIF
C      IF((MLATTC.EQ.NAMEL(26)).AND.(NREG.EQ.NAMEP( 5))) THEN
C        B=3D 0.000000000E+0
C        BTX=3D 0.10000000000000E+1
C        BTY=3D 0.00000000000000E+0
C        BTZ=3D 0.00000000000000E+0
C       ENDIF
C      IF((MLATTC.EQ.NAMEL(27)).AND.(NREG.EQ.NAMEP( 5))) THEN
C        B=3D 0.000000000E+0
C        BTX=3D 0.10000000000000E+1
C        BTY=3D 0.00000000000000E+0
C        BTZ=3D 0.00000000000000E+0
C       ENDIF
C      IF((MLATTC.EQ.NAMEL(28)).AND.(NREG.EQ.NAMEP( 6))) THEN
C        B=3D 0.000000000E+0
C        BTX=3D 0.10000000000000E+1
C        BTY=3D 0.00000000000000E+0
C        BTZ=3D 0.00000000000000E+0
C       ENDIF
C      IF((MLATTC.EQ.NAMEL(29)).AND.(NREG.EQ.NAMEP( 5))) THEN
C        B=3D 0.000000000E+0
C        BTX=3D 0.10000000000000E+1
C        BTY=3D 0.00000000000000E+0
C        BTZ=3D 0.00000000000000E+0
C       ENDIF
C      IF((MLATTC.EQ.NAMEL(30)).AND.(NREG.EQ.NAMEP( 5))) THEN
C        B=3D 0.000000000E+0
C        BTX=3D 0.10000000000000E+1
C        BTY=3D 0.00000000000000E+0
C        BTZ=3D 0.00000000000000E+0
C       ENDIF
C     IF((MLATTC.EQ.NAMEL(31)).AND.(NREG.EQ.NAMEP( 4))) THEN
C        B=3D 0.912097630E+0
C        BTX=3D-0.10000000000000E+1
C        BTY=3D 0.00000000000000E+0
C       BTZ=3D 0.00000000000000E+0
C       ENDIF
C      IF((MLATTC.EQ.NAMEL(32)).AND.(NREG.EQ.NAMEP( 4))) THEN
C       B=3D 0.912097630E+0
C        BTX=3D-0.10000000000000E+1
C        BTY=3D 0.00000000000000E+0
C        BTZ=3D 0.00000000000000E+0
C       ENDIF
C      IF((MLATTC.EQ.NAMEL(33)).AND.(NREG.EQ.NAMEP( 4))) THEN
C        B=3D 0.912097630E+0
C        BTX=3D-0.10000000000000E+1
C        BTY=3D 0.00000000000000E+0
C        BTZ=3D 0.00000000000000E+0
C       ENDIF
C      IF((MLATTC.EQ.NAMEL(34)).AND.(NREG.EQ.NAMEP( 4))) THEN
C        B=3D 0.912097630E+0
C        BTX=3D-0.10000000000000E+1
C        BTY=3D 0.00000000000000E+0
C        BTZ=3D 0.00000000000000E+0
C       ENDIF
C      IF((MLATTC.EQ.NAMEL(35)).AND.(NREG.EQ.NAMEP( 4))) THEN
C        B=3D 0.912097630E+0
C        BTX=3D-0.10000000000000E+1
C        BTY=3D 0.00000000000000E+0
C        BTZ=3D 0.00000000000000E+0
C       ENDIF
C      IF((MLATTC.EQ.NAMEL(36)).AND.(NREG.EQ.NAMEP( 4))) THEN
C         B=3D 0.912097630E+0
C         BTX=3D-0.10000000000000E+1
C         BTY=3D 0.00000000000000E+0
C         BTZ=3D 0.00000000000000E+0
C        ENDIF
C       IF((MLATTC.EQ.NAMEL(37)).AND.(NREG.EQ.NAMEP( 5))) THEN
C         B=3D 0.000000000E+0
C         BTX=3D 0.10000000000000E+1
C         BTY=3D 0.00000000000000E+0
C         BTZ=3D 0.00000000000000E+0
C        ENDIF
C       IF((MLATTC.EQ.NAMEL(38)).AND.(NREG.EQ.NAMEP( 5))) THEN
C         B=3D 0.000000000E+0
C         BTX=3D 0.10000000000000E+1
C         BTY=3D 0.00000000000000E+0
C         BTZ=3D 0.00000000000000E+0
C        ENDIF
C       IF((MLATTC.EQ.NAMEL(40)).AND.(NREG.EQ.NAMEP( 5))) THEN
C         B=3D 0.000000000E+0
C         BTX=3D 0.10000000000000E+1
C         BTY=3D 0.00000000000000E+0
C         BTZ=3D 0.00000000000000E+0
C        ENDIF
C       IF((MLATTC.EQ.NAMEL(41)).AND.(NREG.EQ.NAMEP( 3))) THEN
C         B=3D 0.800553800E+0
C         BTX=3D 0.00000000000000E+0
C         BTY=3D-0.10000000000000E+1
C         BTZ=3D 0.00000000000000E+0
C        ENDIF
C       IF((MLATTC.EQ.NAMEL(43)).AND.(NREG.EQ.NAMEP( 5))) THEN
C         B=3D 0.000000000E+0
C         BTX=3D 0.10000000000000E+1
C         BTY=3D 0.00000000000000E+0
C         BTZ=3D 0.00000000000000E+0
C        ENDIF
C       IF((MLATTC.EQ.NAMEL(44)).AND.(NREG.EQ.NAMEP( 6))) THEN
C         B=3D 0.000000000E+0
C         BTX=3D 0.10000000000000E+1
C         BTY=3D 0.00000000000000E+0
C         BTZ=3D 0.00000000000000E+0
C        ENDIF
C       IF((MLATTC.EQ.NAMEL(45)).AND.(NREG.EQ.NAMEP( 6))) THEN
C         B=3D 0.000000000E+0
C         BTX=3D 0.10000000000000E+1
C         BTY=3D 0.00000000000000E+0
C         BTZ=3D 0.00000000000000E+0
C        ENDIF
C       IF((MLATTC.EQ.NAMEL(46)).AND.(NREG.EQ.NAMEP( 5))) THEN
C         B=3D 0.000000000E+0
C         BTX=3D 0.10000000000000E+1
C         BTY=3D 0.00000000000000E+0
C         BTZ=3D 0.00000000000000E+0
C        ENDIF
C       IF((MLATTC.EQ.NAMEL(47)).AND.(NREG.EQ.NAMEP( 5))) THEN
C         B=3D 0.000000000E+0
C         BTX=3D 0.10000000000000E+1
C         BTY=3D 0.00000000000000E+0
C         BTZ=3D 0.00000000000000E+0
C        ENDIF
C       IF((MLATTC.EQ.NAMEL(48)).AND.(NREG.EQ.NAMEP( 5))) THEN
C         B=3D 0.000000000E+0
C         BTX=3D 0.10000000000000E+1
C         BTY=3D 0.00000000000000E+0
C         BTZ=3D 0.00000000000000E+0
C        ENDIF
       RETURN
          END
-----Original Message-----
From: Chrysostomos Valderanis [mailto:Chrysostomos.Valderanis_at_cern.ch]
Sent: Saturday, July 24, 2010 7:28 AM
To: Santana, Mario; fluka-discuss_at_fluka.org
Subject: RE: lattice and magnetic field
Hi again,
I implemented your suggestion. To be fair, I implemented the way I =
understood it. But now fluka crashes. It crashes somewhere in the =
initialization phase. I tried my input file without magnetic field and =
it works. I also tried to comment out different sections of the magfld =
routine but it makes no difference. Fluka crashes to the same point. I =
scan the out file for signs of problems but I couldn't find any. It =
crashes to the point where it tries to give a summary of the lattice =
regions.
Any hint abount what is going on is very welcomed.
Thank you,
Makis
________________________________
From: owner-fluka-discuss_at_mi.infn.it on behalf of Santana, Mario
Sent: Fri 23/07/2010 19:20
To: Chrysostomos Valderanis; fluka-discuss_at_fluka.org
Subject: RE: lattice and magnetic field
Hi Makis,
What you are asking to do is possible and it is actually quite common.
You need the following instruction in your magfld.f routine
       CALL GEOL2N(MLATTC,LATNAM,IRTLAT,Ierr)
And then a code that looks like in the example below:
[...]
         IF      (LATNAM.eq."QU01L  ".or.LATNAM.eq."QU03L  ".or.
      $           LATNAM.eq."QU05L  ".or.LATNAM.eq."QU07L  ".or.
      $           LATNAM.eq."QU09L  ".or.LATNAM.eq."QU11L  ".or.
      $           LATNAM.eq."QU13L  ".or.LATNAM.eq."QU15L  ".or.
      $           LATNAM.eq."QU17L  ".or.LATNAM.eq."QU19L  ".or.
      $           LATNAM.eq."QU21L  ".or.LATNAM.eq."QU23L  ".or.
      $           LATNAM.eq."QU25L  ".or.LATNAM.eq."QU27L  ".or.
      $           LATNAM.eq."QU29L  ".or.LATNAM.eq."QU31L  ".or.
      $           LATNAM.eq."QU33L  ") THEN
            ck =3D3D  3.85D-01 * 7.8/7.32  ! effective length=3D3D7.8 cm
         ELSE IF (LATNAM.eq."QU02L  ".or.LATNAM.eq."QU04L  ".or.
      $           LATNAM.eq."QU06L  ".or.LATNAM.eq."QU08L  ".or.
      $           LATNAM.eq."QU10L  ".or.LATNAM.eq."QU12L  ".or.
      $           LATNAM.eq."QU14L  ".or.LATNAM.eq."QU16L  ".or.
      $           LATNAM.eq."QU18L  ".or.LATNAM.eq."QU20L  ".or.
      $           LATNAM.eq."QU22L  ".or.LATNAM.eq."QU24L  ".or.
      $           LATNAM.eq."QU26L  ".or.LATNAM.eq."QU28L  ".or.
      $           LATNAM.eq."QU30L  ".or.LATNAM.eq."QU32L  ") THEN
            ck =3D3D -3.85D-01 * 7.8/7.32  ! effective length=3D3D7.8 cm
         END IF
[...]
Hope this helps,
Mario
I am trying to build a geometry with lattice and magnetic fields and I =
am f=3D acing some problems.
First question. My reading of the online courses says that the magnetic =
field should only be set for the prototype region. Since I have more =
than one magnetic field, I am using a routine (magfld.f). But what =
should be written in this file?
-Should I find the prototype regions with GEON2R and set the magnetic =
field=3D s for them?
-Should I find the lattice regions with GEON2R  and set the magnetic =
field =3D for the prototype regions they correspond to?
-Should I find the lattice regions and set the magnetic field as it =
should =3D be in the replica area?
For the moment I am using option2 but it doesn't seem to work. Anyway I =
wou=3D ld prefer to calculate the magnetic field just for the prototypes =
as it is a much simpler expressi=3D on.
Second question. I really would like to be able to set two replicas of =
the same prototype to different magnetic fields. Is this possible? How?
Thank you in advance,
Makis
------_=_NextPart_001_01CB3460.0FF0FE1D
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<HTML dir=3Dltr><HEAD><TITLE>RE: lattice and magnetic field</TITLE>=0A=
<META content=3D"text/html; charset=3Dunicode" http-equiv=3DContent-Type>=0A=
<META name=3DGENERATOR content=3D"MSHTML 8.00.7600.16588"></HEAD>=0A=
<BODY>=0A=
<DIV dir=3Dltr id=3DidOWAReplyText84444>=0A=
<DIV dir=3Dltr><FONT color=3D#000000 size=3D2 face=3DArial>So, let me =
explain the code. If I understand correctly in your version of the code =
you call the GEOL2N routine every time the MAGFLD routine is called. In =
my version of the code I call ~50times the GEON2L routine in the =
begining and never again.</FONT></DIV>=0A=
<DIV dir=3Dltr><FONT size=3D2 face=3DArial>So I believe that my version =
is:</FONT></DIV>=0A=
<DIV dir=3Dltr><FONT size=3D2 face=3DArial>a. faster in the long =
term</FONT></DIV>=0A=
<DIV dir=3Dltr><FONT size=3D2 face=3DArial>b. consistent with the idea =
of putting GEON2R calls also in the begining. This technique is =
advertised in<A =
href=3D"http://www.fluka.org/content/course/NEA/lectures/Lattice.pdf">htt=
p://www.fluka.org/content/course/NEA/lectures/Lattice.pdf</A>&nbsp; =
page11</FONT></DIV>=0A=
<DIV dir=3Dltr><FONT size=3D2 face=3DArial></FONT>&nbsp;</DIV>=0A=
<DIV dir=3Dltr><FONT size=3D2 face=3DArial>In any way since I am a =
newcomer to fluka, I would love to hear what are the best practices in =
this case from people who have done this before.</FONT></DIV>=0A=
<DIV dir=3Dltr><FONT size=3D2 face=3DArial></FONT>&nbsp;</DIV>=0A=
<DIV dir=3Dltr><FONT size=3D2 face=3DArial>Thank you for your =
help,</FONT></DIV>=0A=
<DIV dir=3Dltr><FONT size=3D2 face=3DArial>Makis</FONT></DIV>=0A=
<DIV dir=3Dltr><FONT size=3D2 face=3DArial></FONT>&nbsp;</DIV></DIV>=0A=
<DIV dir=3Dltr><BR>=0A=
<HR tabIndex=3D-1>=0A=
<FONT size=3D2 face=3DTahoma><B>From:</B>  Santana, Mario =
[mailto:msantana_at_slac.stanford.edu]<BR><B>Sent:</B>  Wed 04/08/2010 =
21:10<BR><B>To:</B>  Chrysostomos Valderanis; =
fluka-discuss_at_fluka.org<BR><B>Subject:</B>  RE: lattice and magnetic =
field<BR></FONT><BR></DIV>=0A=
<DIV>=0A=
<P><FONT size=3D2>I am not sure if, like its inverse function (GEOL2N), =
GEON2L has 4 parameters instead of the 3 that it used to have, if so, =
that could well be the reason for the crashes.<BR>In any case, I don't =
understand the value of all the code that you write and which I copy =
further down. Why don't you just obtain the corresponding lattice name =
and use that in the IF THEN structure that defines the field? =
e.g.<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CALL =
GEOL2N(MLATTC,LATNAM,IRTLAT,Ierr)lat<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF&nbsp;&nbsp;&nbsp;&nbsp; ((LATNAM.EQ."B3TaEL&nbsp; ").AND.(...)) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.103775493E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D-0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELSEIF =
((LATNAM.EQ."B3TbEL&nbsp; ").AND.(...)) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.103775493E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D-0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D =
0.00000000000000E+0<BR>...<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR><BR>Of if it was easier to use numbers (like for example, if =
you had alternating quads and you want to use the MOD function to tell =
if they are odd or even numbers to determine the sign of the field), why =
can't you just use MLATTC?<BR>Maybe I am completely missing something, =
but I have the impression that the example above will solve your =
problem.<BR><BR>Mario<BR><BR><BR>----------------------------------------=
-------------------------------------<BR>This was the routine that you =
attached:<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SUBROUTINE MAGFLD =
(X,Y,Z,BTX,BTY,BTZ,B,NREG,IDISC)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
INCLUDE '(DBLPRC)'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INCLUDE =
'(DIMPAR)'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INCLUDE =
'(IOUNIT)'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INCLUDE =
'(LTCLCM)'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bsp; ",NAMEL( 46 =
),IERR)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CALL =
GEON2L("Q17EL&nbsp;&nbsp; ",NAMEL( 47 =
),IERR)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CALL =
GEON2L("Q18EL&nbsp;&nbsp; ",NAMEL( 48 =
),IERR)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CALL =
GEON2R("MTNH0VA ",NAMEP( =
1),IERR)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CALL =
GEON2R("MSNH0VA ",NAMEP( =
2),IERR)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CALL =
GEON2R("MBNH0VA ",NAMEP( =
3),IERR)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CALL =
GEON2R("MBNV0VA ",NAMEP( =
4),IERR)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CALL =
GEON2R("QNLQ0VA ",NAMEP( =
5),IERR)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CALL =
GEON2R("QWLQ0VA ",NAMEP( =
6),IERR)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CALL =
GEON2R("QSLQ0VA ",NAMEP( =
7),IERR)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ISFIRST =3D =
.FALSE.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END =
IF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF((MLATTC.EQ.NAMEL( =
1)).AND.(NREG.EQ.NAMEP( 1))) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.103775493E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D-0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF((MLATTC.EQ.NAMEL( =
2)).AND.(NREG.EQ.NAMEP( 1))) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.103775493E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D-0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF((MLATTC.EQ.NAMEL( =
3)).AND.(NREG.EQ.NAMEP( 2))) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.583737146E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D-0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF((MLATTC.EQ.NAMEL( =
4)).AND.(NREG.EQ.NAMEP( 2))) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D-0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF((MLATTC.EQ.NAMEL( =
5)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTY=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTZ=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF((MLATTC.EQ.NAMEL( =
6)).AND.(NREG.EQ.NAMEP( 7))) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTY=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTZ=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF((MLATTC.EQ.NAMEL( =
9)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTY=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTZ=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(10)).AND.(NREG.EQ.NAMEP( 4))) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.912097630E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTY=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTZ=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(11)).AND.(NREG.EQ.NAMEP( 4))) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.912097630E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTY=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTZ=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(12)).AND.(NREG.EQ.NAMEP( 4))) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.912097630E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTY=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTZ=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(14)).AND.(NREG.EQ.NAMEP( 4))) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.912097630E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTY=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTZ=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(15)).AND.(NREG.EQ.NAMEP( 4))) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.912097630E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTY=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTZ=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(16)).AND.(NREG.EQ.NAMEP( 4))) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.912097630E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTY=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTZ=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(17)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTY=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTZ=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(18)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTY=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTZ=3D =
0.00000000000000E+0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(20)).AND.(NREG.EQ.NAMEP( 6))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(21)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(22)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(26)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(27)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(28)).AND.(NREG.EQ.NAMEP( 6))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(29)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(30)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(31)).AND.(NREG.EQ.NAMEP( 4))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.912097630E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTX=3D-0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
  BTY=3D 0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(32)).AND.(NREG.EQ.NAMEP( 4))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.912097630E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTX=3D-0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
  BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(33)).AND.(NREG.EQ.NAMEP( 4))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.912097630E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTX=3D-0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
  BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(34)).AND.(NREG.EQ.NAMEP( 4))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.912097630E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTX=3D-0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
  BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(35)).AND.(NREG.EQ.NAMEP( 4))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.912097630E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTX=3D-0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
  BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D 0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(36)).AND.(NREG.EQ.NAMEP( 4))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.912097630E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTX=3D-0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp; BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(37)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(38)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(40)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(41)).AND.(NREG.EQ.NAMEP( 3))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.800553800E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTX=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D-0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp; BTZ=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(43)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(44)).AND.(NREG.EQ.NAMEP( 6))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(45)).AND.(NREG.EQ.NAMEP( 6))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(46)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(47)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF((MLATTC.EQ.NAMEL(48)).AND.(NREG.EQ.NAMEP( 5))) =
THEN<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B=3D =
0.000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTX=3D =
0.10000000000000E+1<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTY=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
BTZ=3D =
0.00000000000000E+0<BR>C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ENDIF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
RETURN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
END<BR>-----Original Message-----<BR>From: Chrysostomos Valderanis [<A =
href=3D"mailto:Chrysostomos.Valderanis_at_cern.ch">mailto:Chrysostomos.Valde=
ranis_at_cern.ch</A>]<BR>Sent: Saturday, July 24, 2010 7:28 AM<BR>To: =
Santana, Mario; fluka-discuss_at_fluka.org<BR>Subject: RE: lattice and =
magnetic field<BR><BR>Hi again,<BR><BR>I implemented your suggestion. To =
be fair, I implemented the way I understood it. But now fluka crashes. =
It crashes somewhere in the initialization phase. I tried my input file =
without magnetic field and it works. I also tried to comment out =
different sections of the magfld routine but it makes no difference. =
Fluka crashes to the same point. I scan the out file for signs of =
problems but I couldn't find any. It crashes to the point where it tries =
to give a summary of the lattice regions.<BR>Any hint abount what is =
going on is very welcomed.<BR><BR>Thank =
you,<BR>Makis<BR><BR><BR><BR><BR>________________________________<BR><BR>=
From: owner-fluka-discuss_at_mi.infn.it on behalf of Santana, =
Mario<BR>Sent: Fri 23/07/2010 19:20<BR>To: Chrysostomos Valderanis; =
fluka-discuss_at_fluka.org<BR>Subject: RE: lattice and magnetic =
field<BR><BR><BR><BR>Hi Makis,<BR><BR>What you are asking to do is =
possible and it is actually quite common.<BR><BR>You need the following =
instruction in your magfld.f =
routine<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CALL =
GEOL2N(MLATTC,LATNAM,IRTLAT,Ierr)<BR><BR>And then a code that looks like =
in the example =
below:<BR><BR>[...]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IF&nb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sp; ".or.LATNAM.eq."QU31L&nbsp; =
".or.<BR>&nbsp;&nbsp;&nbsp;&nbsp; =
$&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
LATNAM.eq."QU33L&nbsp; ") =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ck =
=3D3D&nbsp; 3.85D-01 * 7.8/7.32&nbsp; ! effective length=3D3D7.8 =
cm<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELSE IF =
(LATNAM.eq."QU02L&nbsp; ".or.LATNAM.eq."QU04L&nbsp; =
".or.<BR>&nbsp;&nbsp;&nbsp;&nbsp; =
$&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
LATNAM.eq."QU06L&nbsp; ".or.LATNAM.eq."QU08L&nbsp; =
".or.<BR>&nbsp;&nbsp;&nbsp;&nbsp; =
$&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
LATNAM.eq."QU10L&nbsp; ".or.LATNAM.eq."QU12L&nbsp; =
".or.<BR>&nbsp;&nbsp;&nbsp;&nbsp; =
$&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
LATNAM.eq."QU14L&nbsp; ".or.LATNAM.eq."QU16L&nbsp; =
".or.<BR>&nbsp;&nbsp;&nbsp;&nbsp; =
$&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
LATNAM.eq."QU18L&nbsp; ".or.LATNAM.eq."QU20L&nbsp; =
".or.<BR>&nbsp;&nbsp;&nbsp;&nbsp; =
$&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
LATNAM.eq."QU22L&nbsp; ".or.LATNAM.eq."QU24L&nbsp; =
".or.<BR>&nbsp;&nbsp;&nbsp;&nbsp; =
$&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
LATNAM.eq."QU26L&nbsp; ".or.LATNAM.eq."QU28L&nbsp; =
".or.<BR>&nbsp;&nbsp;&nbsp;&nbsp; =
$&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
LATNAM.eq."QU30L&nbsp; ".or.LATNAM.eq."QU32L&nbsp; ") =
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ck =
=3D3D -3.85D-01 * 7.8/7.32&nbsp; ! effective length=3D3D7.8 =
cm<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END =
IF<BR><BR>[...]<BR><BR>Hope this =
helps,<BR><BR>Mario<BR><BR><BR><BR><BR>I am trying to build a geometry =
with lattice and magnetic fields and I am f=3D acing some =
problems.<BR><BR>First question. My reading of the online courses says =
that the magnetic field should only be set for the prototype region. =
Since I have more than one magnetic field, I am using a routine =
(magfld.f). But what should be written in this file?<BR>-Should I find =
the prototype regions with GEON2R and set the magnetic field=3D s for =
them?<BR>-Should I find the lattice regions with GEON2R&nbsp; and set =
the magnetic field =3D for the prototype regions they correspond =
to?<BR>-Should I find the lattice regions and set the magnetic field as =
it should =3D be in the replica area?<BR>For the moment I am using =
option2 but it doesn't seem to work. Anyway I wou=3D ld prefer to =
calculate the magnetic field just for the prototypes as it is a much =
simpler expressi=3D on.<BR><BR>Second question. I really would like to =
be able to set two replicas of the same prototype to different magnetic =
fields. Is this possible? How?<BR><BR>Thank you in =
advance,<BR>Makis<BR><BR><BR><BR><BR><BR></FONT></P></DIV></BODY></HTML>
------_=_NextPart_001_01CB3460.0FF0FE1D--
Received on Thu Aug 05 2010 - 20:12:09 CEST

This archive was generated by hypermail 2.2.0 : Thu Aug 05 2010 - 20:12:10 CEST