Changeset 241


Ignore:
Timestamp:
05/05/09 12:08:43 (16 years ago)
Author:
seroussi
Message:

useless CreateKMatrixBaseVert

Location:
issm/trunk/src/c/objects
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Penta.cpp

    r177 r241  
    614614        Tria*  tria=NULL;
    615615
    616         /*If this element is on the bed rock, spawn a Tria element out of the bed triangle, and use it
    617          * to create the stifness matrix for the base velocity: */
    618         //if(onbed){
    619 //              tria=SpawnTria(0,1,2); //nodes 0, 1 and 2 for the base
    620 //              tria->CreateKMatrixDiagnosticBaseVert(Kgg,inputs, analysis_type);
    621 //              delete tria;
    622 //      }
    623 
    624616        /*If this element  is on the surface, we have a dynamic boundary condition that applies, as a stiffness
    625617         * matrix: */
  • issm/trunk/src/c/objects/Tria.cpp

    r233 r241  
    21022102
    21032103
    2104 
    2105 #undef __FUNCT__
    2106 #define __FUNCT__ "Tria::CreateKMatrixDiagnosticBaseVert"
    2107 void  Tria::CreateKMatrixDiagnosticBaseVert(Mat Kgg,ParameterInputs* inputs,int analysis_type){
    2108 
    2109         int i,j;
    2110 
    2111         /* node data: */
    2112         const int    numgrids=3;
    2113         const int    NDOF1=1;
    2114         const int    numdofs=NDOF1*numgrids;
    2115         double       xyz_list[numgrids][3];
    2116         int          doflist[numdofs];
    2117         int          numberofdofspernode;
    2118        
    2119         /* gaussian points: */
    2120         int     num_gauss,ig;
    2121         double* first_gauss_area_coord  =  NULL;
    2122         double* second_gauss_area_coord =  NULL;
    2123         double* third_gauss_area_coord  =  NULL;
    2124         double* gauss_weights           =  NULL;
    2125         double  gauss_weight;
    2126         double  gauss_l1l2l3[3];
    2127 
    2128 
    2129         /* matrices: */
    2130         double L[1][3];
    2131         double DL_scalar;
    2132 
    2133         double Ke_gg[3][3]; //stiffness matrix
    2134         double Ke_gg_gaussian[3][3]; //stiffness matrix evaluated at the gaussian point.
    2135         double Jdet;
    2136 
    2137         /* Get node coordinates and dof list: */
    2138         GetElementNodeData( &xyz_list[0][0], nodes, numgrids);
    2139         GetDofList(&doflist[0],&numberofdofspernode);
    2140 
    2141         /* Set Ke_gg to 0: */
    2142         for(i=0;i<numdofs;i++) for(j=0;j<numdofs;j++) Ke_gg[i][j]=0.0;
    2143 
    2144         /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */
    2145         GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2);
    2146 
    2147         /* Start  looping on the number of gaussian points: */
    2148         for (ig=0; ig<num_gauss; ig++){
    2149                 /*Pick up the gaussian point: */
    2150                 gauss_weight=*(gauss_weights+ig);
    2151                 gauss_l1l2l3[0]=*(first_gauss_area_coord+ig);
    2152                 gauss_l1l2l3[1]=*(second_gauss_area_coord+ig);
    2153                 gauss_l1l2l3[2]=*(third_gauss_area_coord+ig);
    2154 
    2155                 /* Get Jacobian determinant: */
    2156                 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss_l1l2l3);
    2157        
    2158                 //Get L matrix if viscous basal drag present:
    2159                 GetL(&L[0][0], &xyz_list[0][0], gauss_l1l2l3,NDOF1);
    2160 
    2161                 DL_scalar=gauss_weight*Jdet;
    2162                
    2163                 /*  Do the triple producte tL*D*L: */
    2164                 TripleMultiply( &L[0][0],1,3,1,
    2165                                         &DL_scalar,1,1,0,
    2166                                         &L[0][0],1,3,0,
    2167                                         &Ke_gg_gaussian[0][0],0);
    2168 
    2169                
    2170                 /* Add the Ke_gg_gaussian, and optionally Ke_gg_drag_gaussian onto Ke_gg: */
    2171                 for( i=0; i<numdofs; i++) for(j=0;j<numdofs;j++) Ke_gg[i][j]+=Ke_gg_gaussian[i][j];
    2172         } //for (ig=0; ig<num_gauss; ig++
    2173 
    2174         /*Add Ke_gg to global matrix Kgg: */
    2175         MatSetValues(Kgg,numdofs,doflist,numdofs,doflist,(const double*)Ke_gg,ADD_VALUES);
    2176                
    2177         cleanup_and_return:
    2178         xfree((void**)&first_gauss_area_coord);
    2179         xfree((void**)&second_gauss_area_coord);
    2180         xfree((void**)&third_gauss_area_coord);
    2181         xfree((void**)&gauss_weights);
    2182 }
    2183 
    21842104#undef __FUNCT__
    21852105#define __FUNCT__ "Tria::CreateKMatrixDiagnosticSurfaceVert"
  • issm/trunk/src/c/objects/Tria.h

    r128 r241  
    7070                void  CreateKMatrixDiagnosticHoriz(Mat Kgg,ParameterInputs* inputs,int analysis_type);
    7171                void  CreateKMatrixDiagnosticHorizFriction(Mat Kgg,ParameterInputs* inputs,int analysis_type);
    72                 void  CreateKMatrixDiagnosticBaseVert(Mat Kgg,ParameterInputs* inputs,int analysis_type);
    7372                void  CreateKMatrixDiagnosticSurfaceVert(Mat Kgg,ParameterInputs* inputs,int analysis_type);
    7473                void  GetParameterValue(double* pp, double* plist, double* gauss_l1l2l3);
Note: See TracChangeset for help on using the changeset viewer.