vary several elements independently

Moderators: cyao, michael_borland

Post Reply
Ikpfelix
Posts: 15
Joined: 24 May 2016, 06:50

vary several elements independently

Post by Ikpfelix » 15 Oct 2017, 07:20

Hi Michael,

I used vary_element for a few investigations. Now I want to vary several elements independently.

If I use

Code: Select all

&vary_element name=MAL item=DP index_limit=11 initial=-0.01 final=0.01 &end
&vary_element name=MAL2 item=DX index_limit=11 initial=-0.005 final=0.005 &end
&vary_element name=MAL3 item=DY index_limit=11 initial=-0.005 final=0.005 &end
&vary_element name=MAL4 item=DXP index_limit=11 initial=-0.005 final=0.005 &end
&vary_element name=MAL5 item=DYP index_limit=11 initial=-0.005 final=0.005 &end
I will get just 11 results. But I need all results of an independent variation, so in total all 11^5= 161051 possible combinations.

Is it possible to vary the elements in elegant independently or to use a general for-loop?

I tried it by using index_number, but every time I use a number not equal to zero elegant will not run:

Code: Select all

&vary_element name=MAL1 item=DP index_number=0 index_limit=11 initial=-0.01 final=0.01 &end
&vary_element name=MAL2 item=DX index_number=1 index_limit=11 initial=-0.005 final=0.005 &end
&vary_element name=MAL3 item=DY index_number=2 index_limit=11 initial=-0.005 final=0.005 &end
&vary_element name=MAL4 item=DXP index_number=3 index_limit=11 initial=-0.005 final=0.005 &end
&vary_element name=MAL5 item=DYP index_number=4 index_limit=11 initial=-0.005 final=0.005 &end
Probably I am using index_number wrong.

I attached my files.

Thank you in advance

Felix
Attachments
vary_files.zip
(1.84 KiB) Downloaded 184 times

michael_borland
Posts: 1959
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: vary several elements independently

Post by michael_borland » 23 Oct 2017, 08:55

Felix,

Sorry for the delayed reply; I was away from work for a while.

All you need to do is change

Code: Select all

&run_control n_indices=1 &end
to

Code: Select all

&run_control n_indices=5 &end
--Michael

Ikpfelix
Posts: 15
Joined: 24 May 2016, 06:50

Re: vary several elements independently

Post by Ikpfelix » 23 Oct 2017, 10:25

Hi Michael,

somehow I did not notice that command. After changing it that way, everything works fine and as expected.

Thank you!

Best regards,
Felix

Post Reply