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/Prognostic/UpdateElementsPrognostic.cpp

    r9343 r9356  
    1616void    UpdateElementsPrognostic(Elements* elements, IoModel* iomodel,int analysis_counter,int analysis_type){
    1717
     18        int    dim;
     19        int    numberofelements;
     20        int    prognostic_DG;
     21
    1822        /*Fetch data needed: */
     23        iomodel->parameters->FindParam(&dim,DimEnum);
    1924        iomodel->FetchData(&iomodel->elements,NULL,NULL,ElementsEnum);
     25        iomodel->parameters->FindParam(&numberofelements,NumberOfElementsEnum);
     26        iomodel->parameters->FindParam(&prognostic_DG,PrognosticDGEnum);
    2027
    2128        /*Update elements: */
    2229        int counter=0;
    23         for(int i=0;i<iomodel->numberofelements;i++){
     30        for(int i=0;i<numberofelements;i++){
    2431                if(iomodel->my_elements[i]){
    2532                        Element* element=(Element*)elements->GetObjectByOffset(counter);
     
    4249        iomodel->FetchDataToInput(elements,VyEnum);
    4350
    44         if(iomodel->prognostic_DG){
     51        if(prognostic_DG){
    4552                iomodel->FetchDataToInput(elements,SpcthicknessEnum); //for DG, we need the spc in the element
    4653        }
    4754       
    48         if (iomodel->dim==3){
     55        if (dim==3){
    4956                iomodel->FetchDataToInput(elements,ElementOnBedEnum);
    5057                iomodel->FetchDataToInput(elements,ElementOnSurfaceEnum);
Note: See TracChangeset for help on using the changeset viewer.