Changeset 5877 for issm/trunk/src/c/objects/Elements/Tria.cpp
- Timestamp:
- 09/17/10 17:18:54 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Tria.cpp
r5875 r5877 3045 3045 } 3046 3046 /*}}}*/ 3047 /*FUNCTION Tria::CreateKMatrixDiagnostic SurfaceVert{{{1*/3048 void Tria::CreateKMatrixDiagnosticSurfaceVert(Mat Kgg){3047 /*FUNCTION Tria::CreateKMatrixDiagnosticVertSurface {{{1*/ 3048 ElementMatrix* Tria::CreateKMatrixDiagnosticVertSurface(void){ 3049 3049 3050 3050 /*Constants*/ … … 3059 3059 double L[3]; 3060 3060 GaussTria *gauss=NULL; 3061 3062 /* local element matrices: */ 3063 double Ke_gg[numdof][numdof]={0.0}; //local element stiffness matrix 3064 double Ke_gg_gaussian[numdof][numdof]; //stiffness matrix evaluated at the gaussian point. 3065 3066 /* Get node coordinates and dof list: */ 3061 double Ke_g[numdof][numdof]; //stiffness matrix evaluated at the gaussian point. 3062 3063 /*Initialize Element matrix and return if necessary*/ 3064 if(IsOnWater()) return NULL; 3065 ElementMatrix* Ke=this->NewElementMatrix(NoneApproximationEnum); 3066 3067 /*Retrieve all inputs and parameters*/ 3067 3068 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 3068 GetDofList(&doflist,NoneApproximationEnum,GsetEnum);3069 3069 SurfaceNormal(&surface_normal[0],xyz_list); 3070 3070 … … 3085 3085 &DL_scalar,1,1,0, 3086 3086 L,1,3,0, 3087 &Ke_gg_gaussian[0][0],0); 3088 3089 for( i=0; i<numdof; i++) for(j=0;j<numdof;j++) Ke_gg[i][j]+=Ke_gg_gaussian[i][j]; 3090 } 3091 3092 MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES); 3087 &Ke_g[0][0],0); 3088 3089 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_g[i][j]; 3090 } 3093 3091 3094 3092 /*Clean up and return*/ 3095 3093 delete gauss; 3096 xfree((void**)&doflist);3094 return Ke; 3097 3095 } 3098 3096 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.