Changeset 17925
- Timestamp:
- 05/04/14 20:45:03 (11 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp
r17924 r17925 2335 2335 element->NodalFunctions(basis, gauss); 2336 2336 2337 x_coord=element->GetXcoord( gauss);2338 y_coord=element->GetYcoord( gauss);2339 if(dim==3) z_coord=element->GetZcoord( gauss);2337 x_coord=element->GetXcoord(xyz_list,gauss); 2338 y_coord=element->GetYcoord(xyz_list,gauss); 2339 if(dim==3) z_coord=element->GetZcoord(xyz_list,gauss); 2340 2340 else z_coord=0.; 2341 2341 … … 2472 2472 gauss->GaussPoint(ig); 2473 2473 surface_input->GetInputValue(&surface,gauss); 2474 if(dim==3) z=element->GetZcoord( gauss);2475 else z=element->GetYcoord( gauss);2474 if(dim==3) z=element->GetZcoord(xyz_list,gauss); 2475 else z=element->GetYcoord(xyz_list,gauss); 2476 2476 element->NodalFunctions(basis,gauss); 2477 2477 element->JacobianDeterminantSurface(&Jdet,xyz_list_front,gauss); … … 3092 3092 gauss->GaussPoint(ig); 3093 3093 3094 x_coord=element->GetXcoord( gauss);3095 y_coord=element->GetYcoord( gauss);3096 if(dim==3) z_coord=element->GetZcoord( gauss);3094 x_coord=element->GetXcoord(xyz_list,gauss); 3095 y_coord=element->GetYcoord(xyz_list,gauss); 3096 if(dim==3) z_coord=element->GetZcoord(xyz_list,gauss); 3097 3097 else z_coord=0.; 3098 3098 … … 3153 3153 element->NodalFunctionsVelocity(vbasis,gauss); 3154 3154 3155 x_coord=element->GetXcoord( gauss);3156 y_coord=element->GetYcoord( gauss);3157 if(dim==3) z_coord=element->GetZcoord( gauss);3155 x_coord=element->GetXcoord(xyz_list,gauss); 3156 y_coord=element->GetYcoord(xyz_list,gauss); 3157 if(dim==3) z_coord=element->GetZcoord(xyz_list,gauss); 3158 3158 else z_coord=0.; 3159 3159 … … 3670 3670 element->NodalFunctionsVelocity(vbasis,gauss); 3671 3671 surface_input->GetInputValue(&surface,gauss); 3672 if(dim==3) z=element->GetZcoord( gauss);3673 else z=element->GetYcoord( gauss);3672 if(dim==3) z=element->GetZcoord(xyz_list,gauss); 3673 else z=element->GetYcoord(xyz_list,gauss); 3674 3674 pressure = rho_water*gravity*min(0.,z);//0 if the gaussian point is above water level 3675 3675 -
issm/trunk-jpl/src/c/analyses/StressbalanceSIAAnalysis.cpp
r17700 r17925 405 405 constant_part=-2.*pow(rho_ice*gravity,n)*pow(slope2,((n-1.)/2.)); 406 406 407 z = element->GetZcoord( gauss);407 z = element->GetZcoord(xyz_list,gauss); 408 408 element->JacobianDeterminantLine(&Jdet,&xyz_list_line[0][0],gauss); 409 409 -
issm/trunk-jpl/src/c/classes/Elements/Element.cpp
r17924 r17925 574 574 } 575 575 /*}}}*/ 576 IssmDouble Element::GetXcoord(IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 577 578 /*output*/ 579 IssmDouble x; 580 581 /*Create list of x*/ 582 int numvertices = this->GetNumberOfVertices(); 583 IssmDouble* x_list = xNew<IssmDouble>(numvertices); 584 585 for(int i=0;i<numvertices;i++) x_list[i]=xyz_list[i*3+0]; 586 ValueP1OnGauss(&x,x_list,gauss); 587 588 return x; 589 }/*}}}*/ 590 IssmDouble Element::GetYcoord(IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 591 592 /*output*/ 593 IssmDouble y; 594 595 /*Create list of y*/ 596 int numvertices = this->GetNumberOfVertices(); 597 IssmDouble* y_list = xNew<IssmDouble>(numvertices); 598 599 for(int i=0;i<numvertices;i++) y_list[i]=xyz_list[i*3+1]; 600 ValueP1OnGauss(&y,y_list,gauss); 601 602 return y; 603 }/*}}}*/ 604 IssmDouble Element::GetZcoord(IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 605 606 /*output*/ 607 IssmDouble z; 608 609 /*Create list of z*/ 610 int numvertices = this->GetNumberOfVertices(); 611 IssmDouble* z_list = xNew<IssmDouble>(numvertices); 612 613 for(int i=0;i<numvertices;i++) z_list[i]=xyz_list[i*3+2]; 614 ValueP1OnGauss(&z,z_list,gauss); 615 616 return z; 617 }/*}}}*/ 576 618 bool Element::HasNodeOnBase(){/*{{{*/ 577 619 return (this->inputs->Max(MeshVertexonbaseEnum)>0.); … … 1100 1142 surface_input->GetInputValue(&s,gauss); 1101 1143 surface_input->GetInputDerivativeValue(&slope[0],xyz_list,gauss); 1102 z= GetZcoord(gauss);1144 z=this->GetZcoord(xyz_list,gauss); 1103 1145 tau_perp = matpar->GetRhoIce() * matpar->GetG() * fabs(s-z)*sqrt(slope[0]*slope[0]+slope[1]*slope[1]); 1104 1146 -
issm/trunk-jpl/src/c/classes/Elements/Element.h
r17874 r17925 91 91 void GetVerticesSidList(int* sidlist); 92 92 void GetVerticesConnectivityList(int* connectivitylist); 93 IssmDouble GetXcoord(IssmDouble* xyz_list,Gauss* gauss); 94 IssmDouble GetYcoord(IssmDouble* xyz_list,Gauss* gauss); 95 IssmDouble GetZcoord(IssmDouble* xyz_list,Gauss* gauss); 93 96 bool HasNodeOnBase(); 94 97 bool HasNodeOnSurface(); … … 194 197 virtual void GetVerticesCoordinatesBase(IssmDouble** xyz_list)=0; 195 198 virtual void GetVerticesCoordinatesTop(IssmDouble** xyz_list)=0; 196 virtual IssmDouble GetXcoord(Gauss* gauss)=0; 197 virtual IssmDouble GetYcoord(Gauss* gauss)=0; 198 virtual IssmDouble GetZcoord(Gauss* gauss)=0; 199 199 200 virtual int GetElementType(void)=0; 200 201 -
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r17886 r17925 1054 1054 1055 1055 return tau_parameter; 1056 }1057 /*}}}*/1058 /*FUNCTION Penta::GetXcoord {{{*/1059 IssmDouble Penta::GetXcoord(Gauss* gauss){1060 1061 int i;1062 IssmDouble x;1063 IssmDouble xyz_list[NUMVERTICES][3];1064 IssmDouble x_list[NUMVERTICES];1065 1066 ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);1067 for(i=0;i<NUMVERTICES;i++) x_list[i]=xyz_list[i][0];1068 PentaRef::GetInputValue(&x,x_list,gauss,P1Enum);1069 1070 return x;1071 }1072 /*}}}*/1073 /*FUNCTION Penta::GetYcoord {{{*/1074 IssmDouble Penta::GetYcoord(Gauss* gauss){1075 1076 int i;1077 IssmDouble y;1078 IssmDouble xyz_list[NUMVERTICES][3];1079 IssmDouble y_list[NUMVERTICES];1080 1081 ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);1082 for(i=0;i<NUMVERTICES;i++) y_list[i]=xyz_list[i][1];1083 PentaRef::GetInputValue(&y,y_list,gauss,P1Enum);1084 1085 return y;1086 }1087 /*}}}*/1088 /*FUNCTION Penta::GetZcoord {{{*/1089 IssmDouble Penta::GetZcoord(Gauss* gauss){1090 1091 int i;1092 IssmDouble z;1093 IssmDouble xyz_list[NUMVERTICES][3];1094 IssmDouble z_list[NUMVERTICES];1095 1096 ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);1097 for(i=0;i<NUMVERTICES;i++) z_list[i]=xyz_list[i][2];1098 PentaRef::GetInputValue(&z,z_list,gauss,P1Enum);1099 1100 return z;1101 1056 } 1102 1057 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r17874 r17925 80 80 int GetNumberOfVertices(void); 81 81 void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type); 82 IssmDouble GetXcoord(Gauss* gauss);83 IssmDouble GetYcoord(Gauss* gauss);84 IssmDouble GetZcoord(Gauss* gauss);85 82 void GetVerticesCoordinatesBase(IssmDouble** pxyz_list); 86 83 void GetVerticesCoordinatesTop(IssmDouble** pxyz_list); -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r17874 r17925 110 110 void GetInputValue(IssmDouble* pvalue,Node* node,int enumtype){_error_("not implemented yet");}; 111 111 Node* GetNode(int node_number){_error_("Not implemented");}; 112 IssmDouble GetXcoord(Gauss* gauss){_error_("Not implemented");};113 IssmDouble GetYcoord(Gauss* gauss){_error_("Not implemented");};114 IssmDouble GetZcoord(Gauss* gauss){_error_("not implemented yet");};115 112 int GetElementType(void){_error_("not implemented yet");}; 116 113 Gauss* NewGauss(void); -
issm/trunk-jpl/src/c/classes/Elements/Tetra.cpp
r17886 r17925 272 272 273 273 }/*}}}*/ 274 /*FUNCTION Tetra::GetXcoord {{{*/275 IssmDouble Tetra::GetXcoord(Gauss* gauss){276 277 int i;278 IssmDouble z;279 IssmDouble xyz_list[NUMVERTICES][3];280 IssmDouble z_list[NUMVERTICES];281 282 ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);283 for(i=0;i<NUMVERTICES;i++) z_list[i]=xyz_list[i][0];284 TetraRef::GetInputValue(&z,&z_list[0],(GaussTetra*)gauss,P1Enum);285 286 return z;287 }288 /*}}}*/289 /*FUNCTION Tetra::GetYcoord {{{*/290 IssmDouble Tetra::GetYcoord(Gauss* gauss){291 292 int i;293 IssmDouble z;294 IssmDouble xyz_list[NUMVERTICES][3];295 IssmDouble z_list[NUMVERTICES];296 297 ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);298 for(i=0;i<NUMVERTICES;i++) z_list[i]=xyz_list[i][1];299 TetraRef::GetInputValue(&z,&z_list[0],(GaussTetra*)gauss,P1Enum);300 301 return z;302 }303 /*}}}*/304 /*FUNCTION Tetra::GetZcoord {{{*/305 IssmDouble Tetra::GetZcoord(Gauss* gauss){306 307 int i;308 IssmDouble z;309 IssmDouble xyz_list[NUMVERTICES][3];310 IssmDouble z_list[NUMVERTICES];311 312 ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);313 for(i=0;i<NUMVERTICES;i++) z_list[i]=xyz_list[i][2];314 TetraRef::GetInputValue(&z,&z_list[0],(GaussTetra*)gauss,P1Enum);315 316 return z;317 }318 /*}}}*/319 274 /*FUNCTION Tetra::HasFaceOnBase{{{*/ 320 275 bool Tetra::HasFaceOnBase(){ -
issm/trunk-jpl/src/c/classes/Elements/Tetra.h
r17874 r17925 115 115 void GetInputValue(IssmDouble* pvalue,Node* node,int enumtype); 116 116 Node* GetNode(int node_number){_error_("Not implemented");}; 117 IssmDouble GetXcoord(Gauss* gauss);118 IssmDouble GetYcoord(Gauss* gauss);119 IssmDouble GetZcoord(Gauss* gauss);120 117 int GetElementType(void); 121 118 Gauss* NewGauss(void); -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r17884 r17925 986 986 987 987 }/*}}}*/ 988 /*FUNCTION Tria::GetXcoord {{{*/989 IssmDouble Tria::GetXcoord(Gauss* gauss){990 991 IssmDouble x;992 IssmDouble xyz_list[NUMVERTICES][3];993 IssmDouble x_list[NUMVERTICES];994 995 ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);996 for(int i=0;i<NUMVERTICES;i++) x_list[i]=xyz_list[i][0];997 TriaRef::GetInputValue(&x,x_list,gauss,P1Enum);998 999 return x;1000 }1001 /*}}}*/1002 /*FUNCTION Tria::GetYcoord {{{*/1003 IssmDouble Tria::GetYcoord(Gauss* gauss){1004 1005 IssmDouble y;1006 IssmDouble xyz_list[NUMVERTICES][3];1007 IssmDouble y_list[NUMVERTICES];1008 1009 ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);1010 for(int i=0;i<NUMVERTICES;i++) y_list[i]=xyz_list[i][1];1011 TriaRef::GetInputValue(&y,y_list,gauss,P1Enum);1012 1013 return y;1014 }1015 /*}}}*/1016 988 /*FUNCTION Tria::InputDepthAverageAtBase {{{*/ 1017 989 void Tria::InputDepthAverageAtBase(int enum_type,int average_enum_type){ -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r17884 r17925 184 184 void GetAreaCoordinates(IssmDouble *area_coordinates,IssmDouble* xyz_zero,IssmDouble* xyz_list,int numpoints); 185 185 int GetElementType(void); 186 IssmDouble GetXcoord(Gauss* gauss);187 IssmDouble GetYcoord(Gauss* gauss);188 IssmDouble GetZcoord(Gauss* gauss){_error_("not implemented");};189 186 void NormalSection(IssmDouble* normal,IssmDouble* xyz_list); 190 187 void NormalTop(IssmDouble* normal,IssmDouble* xyz_list);
Note:
See TracChangeset
for help on using the changeset viewer.