10.06.2016 Views

eldo_user

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Eldo Control Language<br />

Defining and Running Simulations<br />

In this topic:<br />

Result Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843<br />

Generated Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844<br />

Collecting Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846<br />

Vector Simulation Results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848<br />

Result Structure<br />

The result returned by the call to the simulation command is a structure with many fields:<br />

Example 1:<br />

set res = simulation(tb())<br />

set err_code = res.simu_status<br />

if (err_code == 0)<br />

fprint(stdout, "Simulation succeeded.\n")<br />

else<br />

fprint(stdout, "Simulation failed!\n")<br />

endif<br />

Example 2:<br />

Table 18-2. ECL Result Structure Fields<br />

Field<br />

Description<br />

avg_newton Average number of Newton iterations<br />

newton_iter Number of Newton iterations<br />

tot_elements Total number of elements<br />

simu_status Return code of the simulation (0 is OK)<br />

simu_time Simulation elapsed time, in seconds<br />

nb_steps Number of accepted time steps<br />

nb_rej_steps Number of rejected time steps<br />

nb_lte_rej_steps Number of rejected time steps due to LTE<br />

nb_nodes Number of nodes<br />

nb_proc_used Number of processors used<br />

set res = simulation(tb())<br />

set elapsed = res.simu_time<br />

fprint(stdout, "Elapsed time: %.1f s.\n", elapsed)<br />

See “Variables” on page 821, “Flow Control Statements” on page 835, and the fprint function<br />

for more information on the concepts used in these examples.<br />

Eldo® User's Manual, 15.3 843

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!