Changeset 1905


Ignore:
Timestamp:
08/26/09 07:45:07 (15 years ago)
Author:
Mathieu Morlighem
Message:

if thermal and 2d, do not throw error, ust return empty datasets

Location:
issm/trunk/src/c/ModelProcessorx
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/ModelProcessorx/Melting/CreateElementsNodesAndMaterialsMelting.cpp

    r1904 r1905  
    123123
    124124        /*Width of elements: */
    125         if(strcmp(iomodel->meshtype,"2d")==0)throw ErrorException(__FUNCT__," error message: 2d temperature computations not supported yet!");
     125        if (strcmp(iomodel->meshtype,"2d")==0)goto cleanup_and_return;
    126126        elements_width=6; //penta elements
    127127
  • issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp

    r1834 r1905  
    4545        count=0;
    4646
     47        /*if 2d: return*/
     48        if (strcmp(iomodel->meshtype,"2d")==0)goto cleanup_and_return;
     49
    4750        //create penalties for grids: no grid can have a temperature over the melting point
    4851        IoModelFetchData((void**)&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed","Matrix","Mat");
  • issm/trunk/src/c/ModelProcessorx/Melting/CreateParametersMelting.cpp

    r1901 r1905  
    2525        parameters=*pparameters;
    2626
     27        /*if 2d: return*/
     28        if (strcmp(iomodel->meshtype,"2d")==0)goto cleanup_and_return;
     29
    2730        count=parameters->Size();
    2831
     
    4851                xfree((void**)&melting);
    4952        }
     53
     54        cleanup_and_return:
    5055       
    5156        /*Assign output pointer: */
  • issm/trunk/src/c/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp

    r1834 r1905  
    3333        /*Create constraints: */
    3434        constraints = new DataSet(ConstraintsEnum());
     35
     36        /*return if 2d mesh*/
     37        if (strcmp(iomodel->meshtype,"2d")==0)goto cleanup_and_return;
    3538
    3639        /*Fetch data: */
  • issm/trunk/src/c/ModelProcessorx/Thermal/CreateElementsNodesAndMaterialsThermal.cpp

    r1904 r1905  
    123123        materials = new DataSet(MaterialsEnum());
    124124
     125        /*return if 2d mesh*/
     126        if (strcmp(iomodel->meshtype,"2d")==0)goto cleanup_and_return;
     127
    125128        /*Width of elements: */
    126         if(strcmp(iomodel->meshtype,"2d")==0){
    127                 throw ErrorException(__FUNCT__," 2d temperature computation not supported yet!");
    128         }
    129                
    130129        elements_width=6; //penta elements
    131130
  • issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp

    r1834 r1905  
    4646        count=0;
    4747
     48        /*return if 2d mesh*/
     49        if (strcmp(iomodel->meshtype,"2d")==0)goto cleanup_and_return;
     50
    4851        //create penalties for grids: no grid can have a temperature over the melting point
    4952        IoModelFetchData((void**)&iomodel->spctemperature,NULL,NULL,iomodel_handle,"spctemperature","Matrix","Mat");
  • issm/trunk/src/c/ModelProcessorx/Thermal/CreateParametersThermal.cpp

    r1901 r1905  
    2929        /*recover parameters : */
    3030        parameters=*pparameters;
     31
     32        /*return if 2d mesh*/
     33        if (strcmp(iomodel->meshtype,"2d")==0)goto cleanup_and_return;
    3134
    3235        count=parameters->Size();
     
    8083                xfree((void**)&temperature);
    8184        }
     85
     86        cleanup_and_return:
    8287       
    8388        /*Assign output pointer: */
Note: See TracChangeset for help on using the changeset viewer.