Ignore:
Timestamp:
08/12/11 18:07:26 (14 years ago)
Author:
Eric.Larour
Message:

Propping up IoModel class, to contain the iomodel handlle. This simplifies IoModelFetchDAta,
which then becomes the FetchData method of the IoModel class.

File:
1 edited

Legend:

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

    r8983 r9340  
    1313#include "./ModelProcessorx.h"
    1414
    15 void    CreateElementsVerticesAndMaterials(Elements** pelements,Vertices** pvertices,Materials** pmaterials, IoModel* iomodel,FILE* iomodel_handle,const int nummodels){
     15void    CreateElementsVerticesAndMaterials(Elements** pelements,Vertices** pvertices,Materials** pmaterials, IoModel* iomodel,const int nummodels){
    1616
    1717        /*Intermediary*/
     
    3232       
    3333        /*First, partition elements and vertices. Nodes will partitioned on a per analysis_type basis. If partitining already done, ignore: */
    34         ElementsAndVerticesPartitioning(&iomodel->my_elements,&iomodel->my_vertices,iomodel,iomodel_handle);
     34        ElementsAndVerticesPartitioning(&iomodel->my_elements,&iomodel->my_vertices,iomodel);
    3535       
    3636        /*Fetch data needed: */
    37         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
    38         IoModelFetchData(&iomodel->elementconnectivity,NULL,NULL,iomodel_handle,ElementconnectivityEnum);
    39         IoModelFetchData(&iomodel->upperelements,NULL,NULL,iomodel_handle,UpperelementsEnum);
    40         IoModelFetchData(&iomodel->lowerelements,NULL,NULL,iomodel_handle,LowerelementsEnum);
    41         IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum);
    42         IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,RheologyNEnum);
    43         IoModelFetchData(&iomodel->control_type,NULL,NULL,iomodel_handle,ControlTypeEnum);
    44         IoModelFetchData(&iomodel->cm_min,NULL,NULL,iomodel_handle,CmMinEnum);
    45         IoModelFetchData(&iomodel->cm_max,NULL,NULL,iomodel_handle,CmMaxEnum);
     37        iomodel->FetchData(&iomodel->elements,NULL,NULL,ElementsEnum);
     38        iomodel->FetchData(&iomodel->elementconnectivity,NULL,NULL,ElementconnectivityEnum);
     39        iomodel->FetchData(&iomodel->upperelements,NULL,NULL,UpperelementsEnum);
     40        iomodel->FetchData(&iomodel->lowerelements,NULL,NULL,LowerelementsEnum);
     41        iomodel->FetchData(&iomodel->rheology_B,NULL,NULL,RheologyBEnum);
     42        iomodel->FetchData(&iomodel->rheology_n,NULL,NULL,RheologyNEnum);
     43        iomodel->FetchData(&iomodel->control_type,NULL,NULL,ControlTypeEnum);
     44        iomodel->FetchData(&iomodel->cm_min,NULL,NULL,CmMinEnum);
     45        iomodel->FetchData(&iomodel->cm_max,NULL,NULL,CmMaxEnum);
    4646       
    4747        /*Create elements and materials: */
     
    7676       
    7777        /*Create vertices: */
    78         IoModelFetchData(&iomodel->x,NULL,NULL,iomodel_handle,XEnum);
    79         IoModelFetchData(&iomodel->y,NULL,NULL,iomodel_handle,YEnum);
    80         IoModelFetchData(&iomodel->z,NULL,NULL,iomodel_handle,ZEnum);
    81         IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum);
    82         IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum);
     78        iomodel->FetchData(&iomodel->x,NULL,NULL,XEnum);
     79        iomodel->FetchData(&iomodel->y,NULL,NULL,YEnum);
     80        iomodel->FetchData(&iomodel->z,NULL,NULL,ZEnum);
     81        iomodel->FetchData(&iomodel->bed,NULL,NULL,BedEnum);
     82        iomodel->FetchData(&iomodel->thickness,NULL,NULL,ThicknessEnum);
    8383       
    8484        for (i=0;i<iomodel->numberofvertices;i++){
Note: See TracChangeset for help on using the changeset viewer.