Changeset 12554


Ignore:
Timestamp:
06/26/12 11:01:16 (13 years ago)
Author:
utke
Message:

applying constrains to bool does not makes (checked w M. Morlighem); use reCast;

Location:
issm/trunk-jpl/src/c/objects/Inputs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/objects/Inputs/BoolInput.cpp

    r12550 r12554  
    157157
    158158                case BoolInputEnum:
    159                         this->value=(bool)(this->value+scalar*xboolinput->value);
     159                        this->value=reCast<bool,IssmDouble>(this->value+scalar*xboolinput->value);
    160160                        return;
    161161
     
    163163                        _error2_("not implemented yet");
    164164        }
    165 
    166 }
    167 /*}}}*/
    168 /*FUNCTION BoolInput::Constrain{{{*/
    169 void BoolInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){
    170 
    171         if(!xIsNan<IssmDouble>(cm_min)) if (this->value<cm_min)this->value=cm_min;
    172         if(!xIsNan<IssmDouble>(cm_max)) if (this->value>cm_max)this->value=cm_max;
    173165
    174166}
  • issm/trunk-jpl/src/c/objects/Inputs/BoolInput.h

    r12550 r12554  
    7474                void ArtificialNoise(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
    7575                void AXPY(Input* xinput,IssmDouble scalar);
    76                 void Constrain(IssmDouble cm_min, IssmDouble cm_max);
     76                void Constrain(IssmDouble cm_min, IssmDouble cm_max){_error2_("Constrain not implemented for booleans");};
    7777                void Extrude(void);
    7878                void VerticallyIntegrate(Input* thickness_input){_error2_("not supported yet");};
Note: See TracChangeset for help on using the changeset viewer.