Ignore:
Timestamp:
08/02/12 17:13:12 (13 years ago)
Author:
cborstad
Message:

merged trunk-jpl into trunk-jpl-damage through revision 12877

Location:
issm/branches/trunk-jpl-damage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/branches/trunk-jpl-damage

  • TabularUnified issm/branches/trunk-jpl-damage/src/c/Container/Inputs.cpp

    r10522 r12878  
    44 */
    55
    6 /*Headers: {{{1*/
     6/*Headers: {{{*/
    77#ifdef HAVE_CONFIG_H
    88        #include <config.h>
     
    2525
    2626/*Object constructors and destructor*/
    27 /*FUNCTION Inputs::Inputs(){{{1*/
     27/*FUNCTION Inputs::Inputs(){{{*/
    2828Inputs::Inputs(){
    2929        return;
    3030}
    3131/*}}}*/
    32 /*FUNCTION Inputs::~Inputs(){{{1*/
     32/*FUNCTION Inputs::~Inputs(){{{*/
    3333Inputs::~Inputs(){
    3434        return;
     
    3737
    3838/*Object management*/
    39 /*FUNCTION Inputs::GetInputValue(bool* pvalue,int enum-type){{{1*/
     39/*FUNCTION Inputs::GetInputValue(bool* pvalue,int enum-type){{{*/
    4040void Inputs::GetInputValue(bool* pvalue,int enum_type){
    4141
     
    5757                /*we could not find an input with the correct enum type. No defaults values were provided,
    5858                 * error out: */
    59                 _error_("could not find input with enum type %i (%s)",enum_type,EnumToStringx(enum_type));
     59                _error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
    6060        }
    6161
     
    6565}
    6666/*}}}*/
    67 /*FUNCTION Inputs::GetInputValue(int* pvalue,int enum-type){{{1*/
     67/*FUNCTION Inputs::GetInputValue(int* pvalue,int enum-type){{{*/
    6868void Inputs::GetInputValue(int* pvalue,int enum_type){
    6969
     
    8585                /*we could not find an input with the correct enum type. No defaults values were provided,
    8686                 * error out: */
    87                 _error_("could not find input with enum type %i (%s)",enum_type,EnumToStringx(enum_type));
     87                _error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
    8888        }
    8989
     
    9393}
    9494/*}}}*/
    95 /*FUNCTION Inputs::GetInputValue(double* pvalue,int enum-type){{{1*/
    96 void Inputs::GetInputValue(double* pvalue,int enum_type){
     95/*FUNCTION Inputs::GetInputValue(IssmDouble* pvalue,int enum-type){{{*/
     96void Inputs::GetInputValue(IssmDouble* pvalue,int enum_type){
    9797
    9898        vector<Object*>::iterator object;
     
    113113                /*we could not find an input with the correct enum type. No defaults values were provided,
    114114                 * error out: */
    115                 _error_("could not find input with enum type %i (%s)",enum_type,EnumToStringx(enum_type));
     115                _error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
    116116        }
    117117
     
    121121}
    122122/*}}}*/
    123 /*FUNCTION Inputs::GetInputAverage{{{1*/
    124 void Inputs::GetInputAverage(double* pvalue,int enum_type){
     123/*FUNCTION Inputs::GetInputAverage{{{*/
     124void Inputs::GetInputAverage(IssmDouble* pvalue,int enum_type){
    125125
    126126        vector<Object*>::iterator object;
     
    141141                /*we could not find an input with the correct enum type. No defaults values were provided,
    142142                 * error out: */
    143                 _error_("could not find input with enum type %i (%s)",enum_type,EnumToStringx(enum_type));
     143                _error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
    144144        }
    145145
     
    149149}
    150150/*}}}*/
    151 /*FUNCTION Inputs::AddInput{{{1*/
     151/*FUNCTION Inputs::AddInput{{{*/
    152152int  Inputs::AddInput(Input* in_input){
    153153
     
    175175}
    176176/*}}}*/
    177 /*FUNCTION Inputs::ChangeEnum{{{1*/
     177/*FUNCTION Inputs::ChangeEnum{{{*/
    178178void  Inputs::ChangeEnum(int oldenumtype,int newenumtype){
    179179
     
    205205}
    206206/*}}}*/
    207 /*FUNCTION Inputs::ConstrainMin{{{1*/
    208 void  Inputs::ConstrainMin(int constrain_enum, double minimum){
     207/*FUNCTION Inputs::ConstrainMin{{{*/
     208void  Inputs::ConstrainMin(int constrain_enum, IssmDouble minimum){
    209209           
    210210        Input* constrain_input=NULL;
     
    213213
    214214        /*some checks: */
    215         if(!constrain_input) _error_(" input %s could not be found!",EnumToStringx(constrain_enum));
     215        if(!constrain_input) _error2_("input " << EnumToStringx(constrain_enum) << " could not be found!");
    216216
    217217        /*Apply ContrainMin: */
     
    219219}
    220220/*}}}*/
    221 /*FUNCTION Inputs::InfinityNorm{{{1*/
    222 double Inputs::InfinityNorm(int enumtype){
    223 
    224         /*Output*/
    225         double norm;
     221/*FUNCTION Inputs::InfinityNorm{{{*/
     222IssmDouble Inputs::InfinityNorm(int enumtype){
     223
     224        /*Output*/
     225        IssmDouble norm;
    226226
    227227        /*Get input*/
     
    240240}
    241241/*}}}*/
    242 /*FUNCTION Inputs::Max{{{1*/
    243 double Inputs::Max(int enumtype){
    244 
    245         /*Output*/
    246         double max;
     242/*FUNCTION Inputs::Max{{{*/
     243IssmDouble Inputs::Max(int enumtype){
     244
     245        /*Output*/
     246        IssmDouble max;
    247247
    248248        /*Get input*/
     
    254254        }
    255255        else{
    256                 _error_("Input %s not found",EnumToStringx(enumtype));
     256                _error2_("Input " << EnumToStringx(enumtype) << " not found");
    257257        }
    258258
     
    261261}
    262262/*}}}*/
    263 /*FUNCTION Inputs::MaxAbs{{{1*/
    264 double Inputs::MaxAbs(int enumtype){
    265 
    266         /*Output*/
    267         double max;
     263/*FUNCTION Inputs::MaxAbs{{{*/
     264IssmDouble Inputs::MaxAbs(int enumtype){
     265
     266        /*Output*/
     267        IssmDouble max;
    268268
    269269        /*Get input*/
     
    275275        }
    276276        else{
    277                 _error_("Input %s not found",EnumToStringx(enumtype));
     277                _error2_("Input " << EnumToStringx(enumtype) << " not found");
    278278        }
    279279
     
    282282}
    283283/*}}}*/
    284 /*FUNCTION Inputs::Min{{{1*/
    285 double Inputs::Min(int enumtype){
    286 
    287         /*Output*/
    288         double min;
     284/*FUNCTION Inputs::Min{{{*/
     285IssmDouble Inputs::Min(int enumtype){
     286
     287        /*Output*/
     288        IssmDouble min;
    289289
    290290        /*Get input*/
     
    296296        }
    297297        else{
    298                 _error_("Input %s not found",EnumToStringx(enumtype));
     298                _error2_("Input " << EnumToStringx(enumtype) << " not found");
    299299        }
    300300
     
    303303}
    304304/*}}}*/
    305 /*FUNCTION Inputs::MinAbs{{{1*/
    306 double Inputs::MinAbs(int enumtype){
    307 
    308         /*Output*/
    309         double min;
     305/*FUNCTION Inputs::MinAbs{{{*/
     306IssmDouble Inputs::MinAbs(int enumtype){
     307
     308        /*Output*/
     309        IssmDouble min;
    310310
    311311        /*Get input*/
     
    317317        }
    318318        else{
    319                 _error_("Input %s not found",EnumToStringx(enumtype));
     319                _error2_("Input " << EnumToStringx(enumtype) << " not found");
    320320        }
    321321
     
    324324}
    325325/*}}}*/
    326 /*FUNCTION Inputs::GetInput{{{1*/
     326/*FUNCTION Inputs::GetInput{{{*/
    327327Input* Inputs::GetInput(int enum_name){
    328328
     
    341341}
    342342/*}}}*/
    343 /*FUNCTION Inputs::DeleteInput{{{1*/
     343/*FUNCTION Inputs::DeleteInput{{{*/
    344344int  Inputs::DeleteInput(int enum_type){
    345345
     
    361361}
    362362/*}}}*/
    363 /*FUNCTION Inputs::DuplicateInput{{{1*/
     363/*FUNCTION Inputs::DuplicateInput{{{*/
    364364void  Inputs::DuplicateInput(int original_enum,int new_enum){
    365365
     
    369369        /*Make a copy of the original input: */
    370370        original=(Input*)this->GetInput(original_enum);
    371         if(!original)_error_("could not find input with enum: %s",EnumToStringx(original_enum));
     371        if(!original)_error2_("could not find input with enum: " << EnumToStringx(original_enum));
    372372        copy=(Input*)original->copy();
    373373
     
    379379}
    380380/*}}}*/
    381 /*FUNCTION Inputs::SpawnTriaInputs{{{1*/
     381/*FUNCTION Inputs::SpawnTriaInputs{{{*/
    382382Inputs* Inputs::SpawnTriaInputs(int* indices){
    383383
     
    405405}
    406406/*}}}*/
    407 /*FUNCTION Inputs::AXPY{{{1*/
    408 void  Inputs::AXPY(int MeshYEnum, double scalar, int MeshXEnum){
     407/*FUNCTION Inputs::AXPY{{{*/
     408void  Inputs::AXPY(int MeshYEnum, IssmDouble scalar, int MeshXEnum){
    409409           
    410410        Input* xinput=NULL;
     
    416416
    417417        /*some checks: */
    418         if(!xinput) _error_(" input %s could not be found!",EnumToStringx(MeshXEnum));
    419         if(!yinput) _error_(" input %s could not be found!",EnumToStringx(MeshYEnum));
     418        if(!xinput) _error2_("input " << EnumToStringx(MeshXEnum) << " could not be found!");
     419        if(!yinput) _error2_("input " << EnumToStringx(MeshYEnum) << " could not be found!");
    420420
    421421        /*Apply AXPY: */
     
    423423}
    424424/*}}}*/
    425 /*FUNCTION Inputs::Configure{{{1*/
     425/*FUNCTION Inputs::Configure{{{*/
    426426void Inputs::Configure(Parameters* parameters){
    427427
Note: See TracChangeset for help on using the changeset viewer.