I haven't had the time to look carefully at your problem,
but I have spotted an error that can spoil your results.
IF (LFIRST) THEN
WRITE(LUNOUT,*) 'Source Routine is called'
LFIRST = .FALSE. <======== !!!!!!!!!!!
ENDIF
* +-------------------------------------------------------------------*
* | First call initializations:
IF ( LFIRST ) THEN
* | *** The following 3 cards are mandatory ***
TKESUM = ZERZER
LFIRST = .FALSE.
LUSSRC = .TRUE.
* | *** User initialization ***
END IF
* |
* +-------------------------------------------------------------------*
You should not put LFIRST = .FALSE. in the first IF-block. If you do it,
the program never enters the second IF-block and the initializations
TKESUM = ZERZER and LUSSRC = .TRUE. will never be done.
Either remove LFIRST = .FALSE. in the first IF-block, or (better)
insert WRITE(LUNOUT,*) 'Source Routine is called' into the second
IF-block and remove the first.
Alberto
On Tue, 24 Feb 2009, Gostishchev, Vitaliy wrote:
> Good morning,
>
> I have a problem. Hopefully, somebody can help me. My task is to create
> a source file in which particles in all three planes should have a
> Gaussian distribution. At the beginning I simplified the task and fixed
> z-coordinate, therefore, only two planes are required. I tried to use an
> external dat-file as a source and even started with random distribution
> of the particles. An idea is to load the particles' coordinates and
> corresponding angles from that external file. That's why I used just a
> template of the source.f with the minor changes (see the attachment). I
> changed the meaning of the cosine and coordinate variables. There are x,
> x', y, y' coordinates (obtained by the external code) in the
> ellipseFLUKA.dat (see the attachment). Unfortunately, it doesn't work
> properly. Maybe there is an easier way to solve this problem.
>
> Thank you in advance for any assistance.
>
> Best regards,
> Vitaliy Gostishchev
>
>
> --
> Gesellschaft fur Schwerionenforschung mbH
> Planckstrasse 1
> D-64291 Darmstadt
> www.gsi.de
>
> Gesellschaft mit beschrenkter Haftung
> Sitz der Gesellschaft: Darmstadt
> Handelsregister: Amtsgericht Darmstadt, HRB 1528
>
> Geschaftsfhrer: Professor Dr. Horst Stocker
>
> Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph,
> Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt
>
-- Alberto Fasso` SLAC-RP, MS 48, 2575 Sand Hill Road, Menlo Park CA 94025 Phone: (1 650) 926 4762 Fax: (1 650) 926 3569 fasso_at_slac.stanford.eduReceived on Tue Feb 24 2009 - 21:35:30 CET
This archive was generated by hypermail 2.2.0 : Tue Feb 24 2009 - 21:35:33 CET