Ignore:
Timestamp:
08/19/11 18:04:03 (14 years ago)
Author:
Eric.Larour
Message:

Major rewrite of the code so that IoModel now has a parameters dataset, which gets
loaded with all the int,char and double objects in the input file.
This is a lot more flexible, as anyone can add a field to the model, and it will
automatically appear in the IoModel parameters dataset.

Not debugged with respect to nightly runs yet. Trying to get the whole change finished.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp

    r9343 r9356  
    1616void    UpdateElementsDiagnosticHutter(Elements* elements, IoModel* iomodel,int analysis_counter,int analysis_type){
    1717
    18         /*Now, is the flag hutter on? otherwise, do nothing: */
    19         if (!iomodel->ishutter)return;
     18        int    numberofelements;
     19        bool   ishutter;
    2020
     21       
    2122        /*Fetch data needed: */
    2223        iomodel->FetchData(&iomodel->elements,NULL,NULL,ElementsEnum);
    2324        iomodel->FetchData(&iomodel->elements_type,NULL,NULL,ElementsTypeEnum);
     25        iomodel->parameters->FindParam(&numberofelements,NumberOfElementsEnum);
     26        iomodel->parameters->FindParam(&ishutter,IshutterEnum);
     27
     28        /*Now, is the flag hutter on? otherwise, do nothing: */
     29        if (!ishutter)return;
    2430
    2531        /*Update elements: */
    2632        int counter=0;
    27         for(int i=0;i<iomodel->numberofelements;i++){
     33        for(int i=0;i<numberofelements;i++){
    2834                if(iomodel->my_elements[i]){
    2935                        Element* element=(Element*)elements->GetObjectByOffset(counter);
Note: See TracChangeset for help on using the changeset viewer.