Changeset 5263
- Timestamp:
- 08/13/10 17:41:15 (15 years ago)
- Location:
- issm/trunk/src/c/objects/Elements
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Penta.cpp
r5259 r5263 2100 2100 2101 2101 /* node data: */ 2102 const int numgrids =6; // Pattynnumgrids2103 const int numdof =2*numgrids;2104 const int numgrids 2=3; //MacAyealnumgrids2105 const int numdof 2=2*numgrids2;2106 double xyz_list[numgrids ][3];2107 int* doflist =NULL;2108 int* doflist 2=NULL;2102 const int numgridsm=3; //MacAyealnumgrids 2103 const int numdofm=2*numgridsm; 2104 const int numgridsp=6; //Pattyn numgrids 2105 const int numdofp=2*numgridsp; 2106 double xyz_list[numgridsp][3]; 2107 int* doflistm=NULL; 2108 int* doflistp=NULL; 2109 2109 2110 2110 /* 3d gaussian points: */ … … 2142 2142 2143 2143 /* matrices: */ 2144 double B[3][numdof ];2145 double Bprime[3][numdof 2];2146 double L[2][numdof ];2144 double B[3][numdofp]; 2145 double Bprime[3][numdofm]; 2146 double L[2][numdofp]; 2147 2147 double D[3][3]={0.0}; // material matrix, simple scalar matrix. 2148 2148 double D_scalar; … … 2151 2151 2152 2152 /* local element matrices: */ 2153 double Ke_gg[numdof ][numdof2]={0.0}; //local element stiffness matrix2154 double Ke_gg_gaussian[numdof ][numdof2]; //stiffness matrix evaluated at the gaussian point.2153 double Ke_gg[numdofp][numdofm]={0.0}; //local element stiffness matrix 2154 double Ke_gg_gaussian[numdofp][numdofm]; //stiffness matrix evaluated at the gaussian point. 2155 2155 double Jdet; 2156 2156 … … 2191 2191 2192 2192 /* Get node coordinates and dof list: */ 2193 GetVerticesCoordinates(&xyz_list[0][0], nodes, numgrids );2194 GetDofList(&doflist); //Pattyn dof list2195 GetDofList(&doflist 2); //MacAyeal dof list2193 GetVerticesCoordinates(&xyz_list[0][0], nodes, numgridsp); 2194 tria->GetDofList(&doflistm,MacAyealApproximationEnum); //Pattyn dof list 2195 GetDofList(&doflistp,PattynApproximationEnum); //MacAyeal dof list 2196 2196 2197 2197 /*Get gaussian points and weights. Penta is an extrusion of a Tria, we therefore … … 2251 2251 2252 2252 /* Do the triple product tB*D*Bprime: */ 2253 TripleMultiply( &B[0][0],3,numdof ,1,2253 TripleMultiply( &B[0][0],3,numdofp,1, 2254 2254 &D[0][0],3,3,0, 2255 &Bprime[0][0],3,numdof 2,0,2255 &Bprime[0][0],3,numdofm,0, 2256 2256 &Ke_gg_gaussian[0][0],0); 2257 2257 2258 2258 /* Add the Ke_gg_gaussian, and optionally Ke_gg_gaussian onto Ke_gg: */ 2259 for( i=0; i<numdof ; i++){2260 for(j=0;j<numdof 2; j++){2259 for( i=0; i<numdofp; i++){ 2260 for(j=0;j<numdofm; j++){ 2261 2261 Ke_gg[i][j]+=Ke_gg_gaussian[i][j]; 2262 2262 } … … 2267 2267 /*Add Ke_gg to global matrix Kgg: */ 2268 2268 // one need to be transposed 2269 MatSetValues(Kgg,numdof ,doflist,numdof2,doflist2,(const double*)Ke_gg,ADD_VALUES);2270 MatSetValues(Kgg,numdof 2,doflist2,numdof,doflist,(const double*)Ke_gg,ADD_VALUES);2269 MatSetValues(Kgg,numdofp,doflistp,numdofm,doflistm,(const double*)Ke_gg,ADD_VALUES); 2270 MatSetValues(Kgg,numdofm,doflistm,numdofp,doflistp,(const double*)Ke_gg,ADD_VALUES); 2271 2271 2272 2272 //Deal with 2d friction at the bedrock interface … … 2293 2293 xfree((void**)&third_gauss_area_coord2d); 2294 2294 xfree((void**)&gauss_weights2d); 2295 xfree((void**)&doflist); 2295 xfree((void**)&doflistm); 2296 xfree((void**)&doflistp); 2296 2297 } 2297 2298 /*}}}*/ … … 2524 2525 /* Get node coordinates and dof list: */ 2525 2526 GetVerticesCoordinates(&xyz_list[0][0], nodes, numgrids); 2526 GetDofList(&doflist );2527 GetDofList(&doflist,PattynApproximationEnum); 2527 2528 2528 2529 /*Get gaussian points and weights. Penta is an extrusion of a Tria, we therefore … … 3753 3754 /* Get node coordinates and dof list: */ 3754 3755 GetVerticesCoordinates(&xyz_list[0][0], nodes, numgrids); 3755 GetDofList(&doflist );3756 GetDofList(&doflist,PattynApproximationEnum); 3756 3757 3757 3758 /*Get gaussian points and weights :*/ -
issm/trunk/src/c/objects/Elements/Tria.cpp
r5259 r5263 2927 2927 /* Get node coordinates and dof list: */ 2928 2928 GetVerticesCoordinates(&xyz_list[0][0], nodes, numgrids); 2929 GetDofList(&doflist );2929 GetDofList(&doflist,MacAyealApproximationEnum); 2930 2930 2931 2931 /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */ … … 4265 4265 /* Get node coordinates and dof list: */ 4266 4266 GetVerticesCoordinates(&xyz_list[0][0], nodes, numgrids); 4267 GetDofList(&doflist );4267 GetDofList(&doflist,MacAyealApproximationEnum); 4268 4268 4269 4269
Note:
See TracChangeset
for help on using the changeset viewer.