Skip to Content.
Sympa Menu

opal - Re: [Opal] Arrays and tables

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

Re: [Opal] Arrays and tables


Chronological Thread 
  • From: "Adelmann Andreas (PSI)" <andreas.adelmann AT psi.ch>
  • To: Simon Friederich <sifriede AT uni-mainz.de>
  • Cc: "opal AT lists.psi.ch" <opal AT lists.psi.ch>
  • Subject: Re: [Opal] Arrays and tables
  • Date: Fri, 7 Aug 2020 06:33:07 +0000
  • Accept-language: en-US, de-CH

Dear Simon, indeed it seams that he array feature is broken. 
Even a one dimensional real array does not work. I will file a bug report.
Thanks for reporting! 

Cheers A
------
Dr. sc. math. Andreas (Andy) Adelmann
Head a.i. Labor for Scientific Computing and Modelling 
Paul Scherrer Institut OHSA/ CH-5232 Villigen PSI
Phone Office: xx41 56 310 42 33 Fax: xx41 56 310 31 91
Zoom ID: 470-582-4086 Password: AdA
-------------------------------------------------------
Friday: ETH HPK G 28   +41 44 633 3076
============================================
The more exotic, the more abstract the knowledge, 
the more profound will be its consequences.
Leon Lederman 
============================================

On 5 Aug 2020, at 11:44, Simon Friederich <sifriede AT uni-mainz.de> wrote:

Dear OPAL-Team,

I have a set of configuration parameters for an RFCAVITY element:

volt   lag
7.5    239.328125
8.0    239.2578125
8.5    239.18359375
9.0    239.08984375
9.5    239.01953125

I tried but failed to get the correctly needed syntax:
Can I use an array or table somehow like this?

REAL rf_settings = {
{7.5, 239.328125},
{8.0, 239.2578125},
{8.5, 239.18359375},
{9.0, 239.08984375},
{9.5, 239.01953125},
};

And then use (e.g. setting 0):

pb1: RFCAVITY,...,VOLT=rf_settings[0][0]*1e-3, LAG=rf_settings[0][1]*PI/180,...;

Thank you very much in advance!

Best regards
Simon

-- 
-----------------------------------
Dr. Simon Friederich
Helmholtz-Institut Mainz
Kollaboration B/ACID
Johannes Gutenberg-Universität Mainz
Staudingerweg 18
55128 Mainz, Deutschland

Tel.: +49 (0)6131 39-23160
E-Mail: sifriede AT uni-mainz.de
----------------------------------------




Archive powered by MHonArc 2.6.19.

Top of Page