source:
issm/oecreview/Archive/15392-16133/ISSM-15791-15792.diff@
16134
Last change on this file since 16134 was 16134, checked in by , 12 years ago | |
---|---|
File size: 4.0 KB |
-
../trunk-jpl/src/c/classes/Elements/PentaRef.cpp
2059 2059 return -1; 2060 2060 } 2061 2061 /*}}}*/ 2062 /*FUNCTION PentaRef::BasalNodeIndices{{{*/ 2063 void PentaRef::BasalNodeIndices(int* pnumindices,int** pindices,int finiteelement){ 2064 2065 /*Output*/ 2066 int numindices; 2067 int* indices = NULL; 2068 2069 switch(finiteelement){ 2070 case P1Enum: case P1DGEnum: 2071 numindices = 3; 2072 indices = xNew<int>(numindices); 2073 indices[0] = 0; 2074 indices[1] = 1; 2075 indices[2] = 2; 2076 break; 2077 case P1bubbleEnum: case P1bubblecondensedEnum: 2078 numindices = 3; 2079 indices = xNew<int>(numindices); 2080 indices[0] = 0; 2081 indices[1] = 1; 2082 indices[2] = 2; 2083 break; 2084 case P2xP1Enum: 2085 numindices = 6; 2086 indices = xNew<int>(numindices); 2087 indices[0] = 0; 2088 indices[1] = 1; 2089 indices[2] = 2; 2090 indices[3] = 6; 2091 indices[4] = 7; 2092 indices[5] = 8; 2093 break; 2094 case P1xP2Enum: 2095 numindices = 3; 2096 indices = xNew<int>(numindices); 2097 indices[0] = 0; 2098 indices[1] = 1; 2099 indices[2] = 2; 2100 return; 2101 case P2Enum: 2102 numindices = 6; 2103 indices = xNew<int>(numindices); 2104 indices[0] = 0; 2105 indices[1] = 1; 2106 indices[2] = 2; 2107 indices[3] = 9; 2108 indices[4] = 10; 2109 indices[5] = 11; 2110 break; 2111 default: 2112 _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet"); 2113 } 2114 2115 /*Assign output pointer*/ 2116 *pnumindices = numindices; 2117 *pindices = indices; 2118 } 2119 /*}}}*/ -
../trunk-jpl/src/c/classes/Elements/Penta.cpp
2973 2973 void Penta::ResetCoordinateSystem(void){ 2974 2974 2975 2975 int approximation; 2976 int numindices; 2977 int *indices = NULL; 2976 2978 IssmDouble slopex,slopey; 2977 2979 IssmDouble xz_plane[6]; 2978 2980 … … 2981 2983 if(IsFloating() || !IsOnBed() || (approximation!=FSApproximationEnum && approximation!=SSAFSApproximationEnum && approximation!=HOFSApproximationEnum)) return; 2982 2984 2983 2985 /*Get number of nodes for velocity only and base*/ 2984 int vnumnodes = this->NumberofNodesVelocity();2986 BasalNodeIndices(&numindices,&indices,this->VelocityInterpolation()); 2985 2987 2986 2988 /*Get inputs*/ 2987 2989 Input* slopex_input=inputs->GetInput(BedSlopeXEnum); _assert_(slopex_input); … … 2989 2991 2990 2992 /*Loop over basal nodes and update their CS*/ 2991 2993 GaussPenta* gauss = new GaussPenta(); 2992 for(int i=0;i< 3;i++){//FIXME2993 gauss->GaussNode(this->VelocityInterpolation(),i );2994 for(int i=0;i<numindices;i++){//FIXME 2995 gauss->GaussNode(this->VelocityInterpolation(),indices[i]); 2994 2996 2995 2997 slopex_input->GetInputValue(&slopex,gauss); 2996 2998 slopey_input->GetInputValue(&slopey,gauss); … … 3000 3002 xz_plane[1]=0.; xz_plane[4]=-slopey; 3001 3003 xz_plane[2]=slopex; xz_plane[5]=1.; 3002 3004 3003 XZvectorsToCoordinateSystem(&this->nodes[i ]->coord_system[0][0],&xz_plane[0]);3005 XZvectorsToCoordinateSystem(&this->nodes[indices[i]]->coord_system[0][0],&xz_plane[0]); 3004 3006 } 3005 3007 3006 3008 /*cleanup*/ 3009 xDelete<int>(indices); 3007 3010 delete gauss; 3008 3011 } 3009 3012 /*}}}*/ -
../trunk-jpl/src/c/classes/Elements/PentaRef.h
68 68 void GetInputDerivativeValue(IssmDouble* pvalues, IssmDouble* plist,IssmDouble* xyz_list, GaussPenta* gauss); 69 69 void GetInputDerivativeValue(IssmDouble* pvalues, IssmDouble* plist,IssmDouble* xyz_list, GaussTria* gauss){_error_("only PentaGauss are supported");}; 70 70 71 int BasalNodeIndices(int* pnumindices,int** pindices,int finiteelement); 71 72 int NumberofNodes(void); 72 73 int NumberofNodesVelocity(void); 73 74 int NumberofNodesPressure(void);
Note:
See TracBrowser
for help on using the repository browser.