Ignore:
Timestamp:
05/11/10 09:35:04 (15 years ago)
Author:
Mathieu Morlighem
Message:

Use Enums to find params

File:
1 edited

Legend:

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

    r3598 r3709  
    2525        Model* model=NULL;
    2626
    27         double* u_g_serial=NULL;
    28         double* melting_g=NULL;
    29         double* accumulation_g=NULL;
    3027        int     qmu_analysis;
    3128
     
    7572
    7673        /*recover parameters: */
    77         model->FindParam(&waitonlock,"waitonlock");
    78         model->FindParam(&qmu_analysis,"qmu_analysis");
    79 
    80         _printf_("initialize inputs:\n");
    81        
    82         model->FindParam(&u_g_serial,NULL,NULL,"u_g",BalancedvelocitiesAnalysisEnum);
    83         model->FindParam(&melting_g,NULL,NULL,"m_g",BalancedvelocitiesAnalysisEnum);
    84         model->FindParam(&accumulation_g,NULL,NULL,"a_g",BalancedvelocitiesAnalysisEnum);
    85         model->FindParam(&numberofnodes,"numberofnodes");
    86        
    87         inputs=new ParameterInputs;
    88         inputs->Add("velocity",u_g_serial,3,numberofnodes);
    89         inputs->Add("melting",melting_g,1,numberofnodes);
    90         inputs->Add("accumulation",accumulation_g,1,numberofnodes);
     74        model->FindParam(&waitonlock,WaitOnLockEnum);
     75        model->FindParam(&qmu_analysis,QmuAnalysisEnum);
    9176
    9277        _printf_("initialize results:\n");
     
    134119
    135120        /*Free ressources:*/
    136         xfree((void**)&u_g_serial);
    137         xfree((void**)&melting_g);
    138         xfree((void**)&accumulation_g);
    139121        delete processedresults;
    140122        delete results;
Note: See TracChangeset for help on using the changeset viewer.