- Timestamp:
- 08/02/12 09:52:47 (13 years ago)
- Location:
- issm/branches/trunk-jpl-damage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/branches/trunk-jpl-damage
- Property svn:mergeinfo changed
/issm/trunk-jpl merged: 12260-12273
- Property svn:mergeinfo changed
-
issm/branches/trunk-jpl-damage/src/c/objects/Inputs/TriaP1Input.cpp
r12285 r12872 329 329 /*}}}*/ 330 330 /*FUNCTION TriaP1Input::Constrain{{{1*/ 331 void TriaP1Input::Constrain(double cm_min, double cm_max , double cm_thresh){331 void TriaP1Input::Constrain(double cm_min, double cm_max){ 332 332 333 333 int i; … … 336 336 if(!isnan(cm_min)) for(i=0;i<numnodes;i++)if (this->values[i]<cm_min)this->values[i]=cm_min; 337 337 if(!isnan(cm_max)) for(i=0;i<numnodes;i++)if (this->values[i]>cm_max)this->values[i]=cm_max; 338 if(!isnan(cm_thresh)) for(i=0;i<numnodes;i++)if (this->values[i]<cm_thresh)this->values[i]=cm_min;339 338 340 339 } … … 417 416 } 418 417 /*}}}*/ 419 /*FUNCTION TriaP1Input::PointwiseThresh{{{1*/420 Input* TriaP1Input::PointwiseThresh(Input* inputB, Input* inputC){421 /*pointwise comparison to inputB. If less than inputB, set nodal output to input C*/422 423 /*Ouput*/424 TriaP1Input* outinput=NULL;425 426 /*Intermediaries*/427 int i;428 TriaP1Input *xinputB = NULL;429 TriaP1Input *xinputC = NULL;430 int B_numvalues; /* doesn't look like this is used */431 const int numnodes = 3;432 double threshvalues[numnodes];433 434 /*Check that inputB is of the same type*/435 if (inputB->ObjectEnum()!=TriaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum()));436 xinputB=(TriaP1Input*)inputB;437 438 /*Check that inputC is of the same type*/439 if (inputC->ObjectEnum()!=TriaP1InputEnum) _error_("Operation not permitted because inputC is of type %s",EnumToStringx(inputC->ObjectEnum()));440 xinputC=(TriaP1Input*)inputC;441 442 /*Create point wise thresh*/443 for(i=0;i<numnodes;i++){444 if(this->values[i] < xinputB->values[i]) threshvalues[i]=xinputC->values[i];445 else threshvalues[i]=this->values[i];446 }447 448 /*Create new Tria vertex input (copy of current input)*/449 outinput=new TriaP1Input(this->enum_type,&threshvalues[0]);450 451 /*Return output pointer*/452 return outinput;453 454 }455 /*}}}*/456 418 /*FUNCTION TriaP1Input::Configure{{{1*/ 457 419 void TriaP1Input::Configure(Parameters* parameters){
Note:
See TracChangeset
for help on using the changeset viewer.