← Back to team overview

yade-users team mailing list archive

Re: [Question #697379]: Optimise material parameter


Question #697379 on Yade changed:

    Status: Open => Answered

Jan Stránský proposed the following answer:

all the problems are already explained in #1, please read it carefully.

in the OP:
> The code is not going through the loop
> The main problem is that "code" DOES go through the loop
> It still doesn't go through the loop.

Please be consistent.

> The loop runs by itself first. Then the simulation starts.

see #1, if you want to start the simulation before the entire loop is
over, than just start simulation before the entire loop is over.

> I tried with simpler code, where I just update my parameter for each
run. Where increase k1 with same value for each run.

No, you do not update parameters for each run, because there is NO RUN
(see below or see #1). The posted code is actually expected to update

> It still doesn't go through the loop. i goes right upto 79.

what does "right upto" mean? If you have n_iter=80, it is logical that it loops up to 79 (range 80 is from 0 to 79).
79 does not appear from nowhere, in fact it is the result of perfect going through the (entire) loop.

My impression: the for loop is perfectly OK, doing exactly what it is told to do. I.e. set O.engines, add materials, add particles. Then, without any running, it jumps to the next iteration of the loop.
(Of course) it DOES NOT do what it is not told to do, i.e. it DOES NOT RUN anything (just because you have no start of the simulation in the for loop). See #1 how to solve it. 


You received this question notification because your team yade-users is
an answer contact for Yade.