Changeset 17257
- Timestamp:
- 02/12/14 08:35:20 (11 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Elements
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.h
r17255 r17257 226 226 virtual int PressureInterpolation()=0; 227 227 virtual bool IsZeroLevelset(int levelset_enum)=0; 228 virtual bool IsIcefront(void)=0; 228 229 virtual void ZeroLevelsetCoordinates(IssmDouble** pxyz_zero,IssmDouble* xyz_list,int levelsetenum)=0; 229 230 virtual void GetIcefrontCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum)=0; -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r17236 r17257 114 114 int PressureInterpolation(); 115 115 bool IsZeroLevelset(int levelset_enum); 116 bool IsIcefront(void){_error_("not implemented yet");}; 116 117 void ZeroLevelsetCoordinates(IssmDouble** pxyz_zero,IssmDouble* xyz_list,int levelsetenum); 117 118 void GetIcefrontCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r17236 r17257 159 159 void ViscousHeating(IssmDouble* pphi,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input){_error_("not implemented yet");}; 160 160 bool IsZeroLevelset(int levelset_enum){_error_("not implemented");}; 161 bool IsIcefront(void){_error_("not implemented yet");}; 161 162 void ZeroLevelsetCoordinates(IssmDouble** pxyz_zero,IssmDouble* xyz_list,int levelsetenum){_error_("not implemented");}; 162 163 void GetIcefrontCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r17248 r17257 910 910 } 911 911 912 if(nrfrontnodes!=2){ 913 _printf0_("in elt nr: " << this->Id() << "\n"); 914 _printf0_("nrfrontnodes: " << nrfrontnodes << "\n"); 915 for(i=0;i<NUMVERTICES;i++){ 916 _printf_("levelsetfunction[" << i << "]=" << levelset[i] << "; indicesfront: " << indicesfront[i] << ";\n"); 917 } 918 } 919 _assert_(nrfrontnodes==2); 920 921 /* arrange order of frontnodes such that they are oriented counterclockwise */ 922 if((NUMVERTICES+indicesfront[0]-indicesfront[1])%NUMVERTICES!=NUMVERTICES-1){ 923 int index=indicesfront[0]; 924 indicesfront[0]=indicesfront[1]; 925 indicesfront[1]=index; 926 } 927 912 928 IssmDouble* xyz_front = xNew<IssmDouble>(3*nrfrontnodes); 913 929 /* Return nodes */ 914 930 for(i=0;i<nrfrontnodes;i++){ 915 931 for(dir=0;dir<3;dir++){ 916 xyz_front[3*i+dir]=xyz_list[ indicesfront[i]+dir];932 xyz_front[3*i+dir]=xyz_list[3*indicesfront[i]+dir]; 917 933 } 918 934 } … … 2588 2604 } 2589 2605 /*}}}*/ 2606 bool Tria::IsIcefront(void){/*{{{*/ 2607 2608 bool isicefront; 2609 int i,nrice; 2610 IssmDouble ls[NUMVERTICES]; 2611 2612 /*Retrieve all inputs and parameters*/ 2613 GetInputListOnVertices(&ls[0],MaskIceLevelsetEnum); 2614 2615 /* If only one vertex has ice, there is an ice front here */ 2616 isicefront=false; 2617 if(IsIceInElement()){ 2618 nrice=0; 2619 for(i=0;i<NUMVERTICES;i++) 2620 if(ls[i]<0.) nrice++; 2621 if(nrice==1) isicefront= true; 2622 } 2623 return isicefront; 2624 }/*}}}*/ 2590 2625 2591 2626 /*FUNCTION Tria::AverageOntoPartition {{{*/ -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r17236 r17257 134 134 void GetNormalFromLSF(IssmDouble *pnormal); 135 135 bool IsZeroLevelset(int levelset_enum); 136 bool IsIcefront(void); 136 137 137 138 void AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part);
Note:
See TracChangeset
for help on using the changeset viewer.