[mcstas-users] mcstas-users Digest, Vol 40, Issue 3

Jesús P. de Vicente jesuspedrodevicente at gmail.com
Fri Jun 12 11:00:38 CEST 2015


Thank you very much Markus,

I will use your solution.

Regards

*Jesús P. de Vicente.-*

2015-06-12 10:01 GMT+02:00 <mcstas-users-request at mcstas.org>:

> Send mcstas-users mailing list submissions to
>         mcstas-users at mcstas.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users
> or, via email, send a message with subject or body 'help' to
>         mcstas-users-request at mcstas.org
>
> You can reach the person managing the list at
>         mcstas-users-owner at mcstas.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of mcstas-users digest..."
>
>
> Today's Topics:
>
>    1. WHEN and EXTEND card (Jes?s P. de Vicente)
>    2. Re: WHEN and EXTEND card (Markus Appel)
>    3. McStas component ESS_moderator (Pascale Deen)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 11 Jun 2015 19:29:23 +0200
> From: Jes?s P. de Vicente <jesuspedrodevicente at gmail.com>
> To: "mcstas-users at mcstas.org" <mcstas-users at mcstas.org>
> Subject: [mcstas-users] WHEN and EXTEND card
> Message-ID:
>         <CABTc3j8cyHoy8BQ=
> ntQYm0qLya5_wHMZNf7pSqJ_72gKJ4spkg at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Dear McStas team,
>
> I would like to ask you if the EXTEND card is executed independently if the
> WHEN card is true or false.
>
> Thank you very much.
> Kind regards
>
> *Jes?s P. de Vicente.-*
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.mcstas.org/pipermail/mcstas-users/attachments/20150611/f0fa915b/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Thu, 11 Jun 2015 19:43:11 +0200
> From: Markus Appel <masolomaster3000 at googlemail.com>
> To: mcstas-users at mcstas.org
> Subject: Re: [mcstas-users] WHEN and EXTEND card
> Message-ID: <5579C8AF.6020508 at googlemail.com>
> Content-Type: text/plain; charset=windows-1252
>
> Hi Jes?s,
>
> the EXTEND block should only be executed if WHEN is true, but there
> was a bug in Mcstas <= 2.1 which only applied the WHEN condition to
> the first line of the EXTEND block and always executed the remaining
> lines.
>
> You can either upgrade to Mcstas 2.2a, or use an additional set of
> braces in the EXTEND block as work-around in older versions, like this:
>
> COMPONENT something = ...() WHEN (...)
> AT ...
> EXTEND
> %{
>   {
>    do_something();
>    do_something_else();
>    ... ;
>   }
> }
>
> Cheers,
> Markus
>
> On 06/11/2015 07:29 PM, Jes?s P. de Vicente wrote:
> > Dear McStas team,
> >
> > I would like to ask you if the EXTEND card is executed
> > independently if the WHEN card is true or false.
> >
> > Thank you very much. Kind regards
> >
> > *Jes?s P. de Vicente.-*
> >
> >
> > _______________________________________________ mcstas-users
> > mailing list mcstas-users at mcstas.org
> > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users
> >
>
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 11 Jun 2015 13:27:11 +0000
> From: Pascale Deen <pascale.deen at esss.se>
> To: "mcstas-users at mcstas.org" <mcstas-users at mcstas.org>
> Subject: [mcstas-users] McStas component ESS_moderator
> Message-ID: <9338BDFE-B81A-42D5-A2E5-26775BC3BDD3 at esss.se>
> Content-Type: text/plain; charset="utf-8"
>
> Hello,
> I am trying to run the moderator component
>
> COMPONENT ESS_Source = ESS_moderator(
>     isleft = 0.9, Lmin = 0.5, Lmax = 10, cold_frac = 0.5,
>     dist = 2, focus_xw = 0.2, focus_yh = 0.2, yheight_c = 0.03,
>     yheight_t = 0.03, n_pulses = 1, beamport_angle = 5,
>     sourcedef = "2015", extraction_opening = 120)
>   AT (0, 0, -0.1) RELATIVE Origin
>
> but I get the following warnings:
> /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:409:1:
> warning: control reaches end of non-void function [-Wreturn-type]
> } /* end of ESS_Mezei_cold_2012 */
> ^
> /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:517:1:
> warning: control reaches end of non-void function [-Wreturn-type]
> } /* end of ESS_Mezei_cold */
> ^
> /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:622:1:
> warning: control reaches end of non-void function [-Wreturn-type]
> } /* end of ESS_Mezei_thermal */
> ^
> /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:639:1:
> warning: control reaches end of non-void function [-Wreturn-type]
> } /* end of ESS_2012_Lieutenant_cold */
> ^
> /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:693:1:
> warning: control may reach end of non-void function [-Wreturn-type]
> } /* end of ESS_2013_Schoenfeldt_cold */
> ^
> /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:719:1:
> warning: control may reach end of non-void function [-Wreturn-type]
> } /* end of ESS_2014_Schoenfeldt_cold */
> ^
> /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:851:1:
> warning: control may reach end of non-void function [-Wreturn-type]
> } /* end of ESS_2013_Schoenfeldt_thermal */
> ^
> /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:871:1:
> warning: control may reach end of non-void function [-Wreturn-type]
> } /* end of ESS_2014_Schoenfeldt_thermal */
> ^
> /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:894:1:
> warning: control may reach end of non-void function [-Wreturn-type]
> } /* end of ESS_2015_Schoenfeldt_thermal */
> ^
> /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:922:1:
> warning: control may reach end of non-void function [-Wreturn-type]
> } /* end of ESS_2015_Schoenfeldt_cold */
> ^
> /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:959:17:
> warning: expression result unused [-Wunused-value]
>     if(i==0)par3-14.27;
>             ~~~~^~~~~~
> 11 warnings generated.
> ----------------------------------------------------
> Pascale Deen
> Instrument Scientist - Chopper Spectrometry
> European Spallation Source ESS AB
> P.O Box 176, SE-221 00 Lund, Sweden
> Visiting address: Tunav?gen 24 Lund
>
> Adjunct Associate Professor
> Niels Bohr Institute
> University of Copenhagen
>
> Mobile: +46 721 792 079
> Phone: +46 46 888 3079
> E-mail: pascale.deen at esss.se<mailto:pascale.deen at esss.se>
>
> www.esss.se<http://www.esss.se/>
>
> The European Spallation Source is a Partnership of 16 European Nations
> committed to the goal of collectively building and operating the world's
> leading facility for research using neutrons by the second quarter of the
> 21st Century
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.mcstas.org/pipermail/mcstas-users/attachments/20150611/649da88c/attachment.html
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> mcstas-users mailing list
> mcstas-users at mcstas.org
> http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users
>
>
> ------------------------------
>
> End of mcstas-users Digest, Vol 40, Issue 3
> *******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20150612/6d988f89/attachment.html>


More information about the mcstas-users mailing list