Changeset 614


Ignore:
Timestamp:
05/27/09 15:16:44 (15 years ago)
Author:
Mathieu Morlighem
Message:

do not overwrite analysis_types if char*=NULL

Location:
issm/trunk/src/c/parallel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/parallel/CreateFemModel.cpp

    r586 r614  
    3636
    3737        _printf_("   specifying analysis\n");
    38         //specify analysis_type
    39         model->analysis_type=(char*)xmalloc((strlen(analysis_type)+1)*sizeof(char)); strcpy(model->analysis_type,analysis_type);
    40         //specify sub_analysis_type EXCEPT if thermal: we do not know if it is transient or steady yet (only the model knows)!!
    41         if (strcmp(analysis_type,"thermal")!=0){
     38        if (analysis_type!=NULL){
     39                model->analysis_type=(char*)xmalloc((strlen(analysis_type)+1)*sizeof(char)); strcpy(model->analysis_type,analysis_type);
     40        }
     41        if (sub_analysis_type!=NULL){
    4242                model->sub_analysis_type=(char*)xmalloc((strlen(sub_analysis_type)+1)*sizeof(char)); strcpy(model->sub_analysis_type,sub_analysis_type);
    4343        }
  • issm/trunk/src/c/parallel/diagnostic.cpp

    r586 r614  
    9898                _printf_("calling qmu analysis on diagnostic core:\n");
    9999               
    100                 qmu(qmuname,&femmodels[0],inputs,DiagnosticAnalysisEnum(),NoneAnalysisEnum());
    101100        }
    102101
  • issm/trunk/src/c/parallel/thermal.cpp

    r579 r614  
    6969
    7070        _printf_("read and create thermal finite element model:\n");
    71         CreateFemModel(&femmodels[0],fid,"thermal","");
     71        CreateFemModel(&femmodels[0],fid,"thermal",NULL);
    7272        _printf_("read and create melting finite element model:\n");
    73         CreateFemModel(&femmodels[1],fid,"melting","");
     73        CreateFemModel(&femmodels[1],fid,"melting",NULL);
    7474
    7575        _printf_("initialize inputs:\n");
Note: See TracChangeset for help on using the changeset viewer.