Hi,

On Sunday 22 June 2014 21:34:49 Joakim Hove wrote:
> I suggest that we update an integer flags mask during the Schedule parse
> process which the consumer can consult to determine which changes have
> occurred, and which simulator internal quantities must be recalculated.
> I.e. the consumer could have code like this:
> 
> 
>       if (scheduleFlags(WELL_RATES_CHANGED))
>           updateWellRates();
> 
>      if (scheduleFlags(WELL_TOPOLOGY_CHANGED))
>          updateWellTopology();
> 
>      if (scheduleFlags(WELL_COMPLETIONS_CHANGED))
>         updateCompletions();
> 
> 
> In 95% of the timesteps only the first test will return True. Something to
> think about?

I think the idea is good, but I'd prefer a slightly different API:

if (eclipseState->wellRatesChanged())
    updateWellRates();
// ...

plus variants of the methods which take a report step index (which may default 
to the current one if left unspecified):

if (eclipseState->wellRatesChange(/*reportStepIdx=*/5))
    std::cout << "Well rates will change in the sixth report step!\n";
// ...

that said, other APIs are perfectly okay for me as well...

cheers
  Andreas

-- 
Notice: "String" and "Thread" are the same thing to non-computing
people.
        — Programming.com

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Opm mailing list
[email protected]
http://www.opm-project.org/mailman/listinfo/opm

Reply via email to