Changeset 12285
- Timestamp:
- 05/24/12 14:10:19 (13 years ago)
- Location:
- issm/branches/trunk-jpl-damage/src/c/objects/Inputs
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/branches/trunk-jpl-damage/src/c/objects/Inputs/BoolInput.h
r12168 r12285 40 40 Input* PointwiseMin(Input* inputB){_error_("not implemented yet");}; 41 41 Input* PointwiseMax(Input* inputB){_error_("not implemented yet");}; 42 Input* PointwiseThresh(Input* inputB,Input* inputC){_error_("not implemented yet");}; 42 43 ElementResult* SpawnResult(int step, double time); 43 44 void Configure(Parameters* parameters); -
issm/branches/trunk-jpl-damage/src/c/objects/Inputs/ControlInput.cpp
r12167 r12285 375 375 Input* newvalues=NULL; 376 376 377 newvalues=this->values->PointwiseMin(maxvalues); 377 newvalues=this->values->PointwiseMin(maxvalues); /*compare input to maxvalues and retain pointwise minimum*/ 378 378 delete values; this->values=newvalues; 379 379 newvalues=this->values->PointwiseMax(minvalues); 380 delete values; this->values=newvalues; 381 newvalues=this->values->PointwiseThresh(threshvalues,minvalues); 380 382 delete values; this->values=newvalues; 381 383 }/*}}}*/ -
issm/branches/trunk-jpl-damage/src/c/objects/Inputs/ControlInput.h
r12168 r12285 45 45 Input* PointwiseMin(Input* inputB){_error_("not implemented yet");}; 46 46 Input* PointwiseMax(Input* inputB){_error_("not implemented yet");}; 47 Input* PointwiseThresh(Input* inputB,Input* inputC){_error_("not implemented yet");}; 47 48 ElementResult* SpawnResult(int step, double time); 48 49 void AddTimeValues(double* values,int step,double time){_error_("not supported yet");}; -
issm/branches/trunk-jpl-damage/src/c/objects/Inputs/DatasetInput.h
r12168 r12285 40 40 Input* PointwiseMin(Input* inputB){_error_("not implemented yet");}; 41 41 Input* PointwiseMax(Input* inputB){_error_("not implemented yet");}; 42 Input* PointwiseThresh(Input* inputB,Input* inputC){_error_("not implemented yet");}; 42 43 ElementResult* SpawnResult(int step, double time){_error_("not implemented yet");}; 43 44 void AddTimeValues(double* values,int step,double time){_error_("not supported yet");}; -
issm/branches/trunk-jpl-damage/src/c/objects/Inputs/DoubleInput.h
r12168 r12285 39 39 Input* PointwiseMin(Input* inputB); 40 40 Input* PointwiseMax(Input* inputB); 41 Input* PointwiseThresh(Input* inputB,Input* inputC){_error_("not supported yet");}; 41 42 ElementResult* SpawnResult(int step, double time); 42 43 void AddTimeValues(double* values,int step,double time){_error_("not supported yet");}; -
issm/branches/trunk-jpl-damage/src/c/objects/Inputs/Input.h
r11984 r12285 63 63 virtual Input* PointwiseMax(Input* inputmax)=0; 64 64 virtual Input* PointwiseMin(Input* inputmin)=0; 65 virtual Input* PointwiseThresh(Input* inputthresh,Input* inputmin)=0; 65 66 virtual ElementResult* SpawnResult(int step, double time)=0; 66 67 -
issm/branches/trunk-jpl-damage/src/c/objects/Inputs/IntInput.h
r12168 r12285 40 40 Input* PointwiseMin(Input* inputB){_error_("not implemented yet");}; 41 41 Input* PointwiseMax(Input* inputB){_error_("not implemented yet");}; 42 Input* PointwiseThresh(Input* inputB,Input* inputC){_error_("not implemented yet");}; 42 43 ElementResult* SpawnResult(int step, double time); 43 44 void AddTimeValues(double* values,int step,double time){_error_("not supported yet");}; -
issm/branches/trunk-jpl-damage/src/c/objects/Inputs/PentaP1Input.cpp
r12168 r12285 609 609 } 610 610 /*}}}*/ 611 /*FUNCTION PentaP1Input::PointwiseThresh{{{1*/ 612 Input* PentaP1Input::PointwiseThresh(Input* inputB,Input* inputC){ 613 614 /*Ouput*/ 615 PentaP1Input* outinput=NULL; 616 617 /*Intermediaries*/ 618 int i; 619 PentaP1Input *xinputB = NULL; 620 PentaP1Input *xinputC = NULL; 621 int B_numvalues; 622 const int numnodes = 6; 623 double threshvalues[numnodes]; 624 625 /*Check that inputB is of the same type*/ 626 if (inputB->ObjectEnum()!=PentaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum())); 627 xinputB=(PentaP1Input*)inputB; 628 629 /*Check that inputB is of the same type*/ 630 if (inputC->ObjectEnum()!=PentaP1InputEnum) _error_("Operation not permitted because inputC is of type %s",EnumToStringx(inputC->ObjectEnum())); 631 xinputC=(PentaP1Input*)inputC; 632 633 /*Create point wise thresh*/ 634 for(i=0;i<numnodes;i++){ 635 if(this->values[i] < xinputB->values[i]) threshvalues[i]=xinputC->values[i]; 636 else threshvalues[i]=this->values[i]; 637 } 638 639 /*Create new Penta vertex input (copy of current input)*/ 640 outinput=new PentaP1Input(this->enum_type,&threshvalues[0]); 641 642 /*Return output pointer*/ 643 return outinput; 644 645 } 646 /*}}}*/ 611 647 /*FUNCTION PentaP1Input::GetVectorFromInputs{{{1*/ 612 648 void PentaP1Input::GetVectorFromInputs(Vector* vector,int* doflist){ -
issm/branches/trunk-jpl-damage/src/c/objects/Inputs/PentaP1Input.h
r12168 r12285 40 40 Input* PointwiseMin(Input* inputB); 41 41 Input* PointwiseMax(Input* inputB); 42 Input* PointwiseThresh(Input* inputB,Input* inputC); 42 43 ElementResult* SpawnResult(int step, double time); 43 44 void AddTimeValues(double* values,int step,double time){_error_("not supported yet");}; -
issm/branches/trunk-jpl-damage/src/c/objects/Inputs/TransientInput.h
r12168 r12285 43 43 Input* PointwiseMin(Input* forcingB){_error_("not implemented yet");}; 44 44 Input* PointwiseMax(Input* forcingB){_error_("not implemented yet");}; 45 Input* PointwiseThresh(Input* forcingB,Input* forcingC){_error_("not implemented yet");}; 45 46 ElementResult* SpawnResult(int step, double time); 46 47 void Configure(Parameters* parameters); -
issm/branches/trunk-jpl-damage/src/c/objects/Inputs/TriaP1Input.cpp
r12168 r12285 364 364 int i; 365 365 TriaP1Input *xinputB = NULL; 366 int B_numvalues; 366 int B_numvalues; /* doesn't look like this is used */ 367 367 const int numnodes = 3; 368 368 double minvalues[numnodes]; … … 395 395 int i; 396 396 TriaP1Input *xinputB = NULL; 397 int B_numvalues; 397 int B_numvalues; /* doesn't look like this is used */ 398 398 const int numnodes = 3; 399 399 double maxvalues[numnodes]; … … 417 417 } 418 418 /*}}}*/ 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 /*}}}*/ 419 456 /*FUNCTION TriaP1Input::Configure{{{1*/ 420 457 void TriaP1Input::Configure(Parameters* parameters){ -
issm/branches/trunk-jpl-damage/src/c/objects/Inputs/TriaP1Input.h
r12168 r12285 40 40 Input* PointwiseMin(Input* inputB); 41 41 Input* PointwiseMax(Input* inputB); 42 Input* PointwiseThresh(Input* inputB, Input* inputC); 42 43 ElementResult* SpawnResult(int step, double time); 43 44 void AddTimeValues(double* values,int step,double time){_error_("not supported yet");};
Note:
See TracChangeset
for help on using the changeset viewer.