Changeset 23674
- Timestamp:
- 01/31/19 14:21:20 (6 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Elements
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r23644 r23674 647 647 648 648 }/*}}}*/ 649 void Penta::CreateDistanceInputFromSegmentlist(IssmDouble* distances,int distanceenum){/*{{{*/ 650 651 /*Get current field and vertex coordinates*/ 652 IssmDouble ls[NUMVERTICES],distance; 653 GetInputListOnVertices(&ls[0],distanceenum); 654 655 /*Get distance from list of segments and reset ls*/ 656 for(int j=0;j<NUMVERTICES;j++){ 657 distance=distances[this->vertices[j]->Lid()]; 658 if(xIsNan<IssmDouble>(distance)) _error_("NaN found in vector"); 659 if(xIsInf<IssmDouble>(distance)) _error_("Inf found in vector"); 660 661 /*FIXME: do we really need this?*/ 662 if(distanceenum==MaskIceLevelsetEnum) if(distance>10000) distance=10000; 663 if(ls[j]>0){ 664 ls[j] = distance; 665 } 666 else{ 667 ls[j] = - distance; 668 } 669 } 670 671 /*Update Levelset*/ 672 this->inputs->AddInput(new PentaInput(distanceenum,&ls[0],P1Enum)); 673 } 674 /*}}}*/ 649 675 void Penta::ElementResponse(IssmDouble* presponse,int response_enum){/*{{{*/ 650 676 -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r23644 r23674 60 60 void ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index); 61 61 void ControlToVectors(Vector<IssmPDouble>* vector_control, Vector<IssmPDouble>* vector_gradient,int control_enum); 62 void CreateDistanceInputFromSegmentlist(IssmDouble* distances,int distanceenum); 62 63 ElementMatrix* CreateBasalMassMatrix(void); 63 64 void ElementResponse(IssmDouble* presponse,int response_enum);
Note:
See TracChangeset
for help on using the changeset viewer.