Changeset 16018
- Timestamp:
- 08/29/13 13:56:40 (12 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/balancevelocity_core.cpp
r16013 r16018 19 19 femmodel->parameters->FindParam(&save_results,SaveResultsEnum); 20 20 21 if(VerboseSolution()) _printf0_("c all computational core:\n");22 //femmodel->SetCurrentConfiguration(SurfaceSlopeAnalysisEnum,SmoothedSurfaceSlopeXAnalysisEnum);23 //solutionsequence_linear(femmodel);24 //femmodel->SetCurrentConfiguration(SurfaceSlopeAnalysisEnum,SmoothedSurfaceSlopeYAnalysisEnum);25 //solutionsequence_linear(femmodel);26 surfaceslope_core(femmodel);21 if(VerboseSolution()) _printf0_("computing smoothed slopes:\n"); 22 femmodel->SetCurrentConfiguration(SurfaceSlopeAnalysisEnum,SmoothedSurfaceSlopeXAnalysisEnum); 23 solutionsequence_linear(femmodel); 24 femmodel->SetCurrentConfiguration(SurfaceSlopeAnalysisEnum,SmoothedSurfaceSlopeYAnalysisEnum); 25 solutionsequence_linear(femmodel); 26 //surfaceslope_core(femmodel); 27 27 28 28 if(VerboseSolution()) _printf0_("call computational core:\n"); -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r16017 r16018 7231 7231 IssmDouble h,gamma,thickness; 7232 7232 IssmDouble hnx,hny,dhnx[2],dhny[2]; 7233 int i,j; 7234 IssmDouble D_scalar; 7233 IssmDouble vel,vx,vy,dvxdx,dvydy; 7234 IssmDouble D[2][2]; 7235 int stabilization=1; 7235 7236 7236 7237 /*Fetch number of nodes and dof for this finite element*/ … … 7239 7240 /*Initialize Element matrix and vectors*/ 7240 7241 ElementMatrix* Ke = new ElementMatrix(nodes,numnodes,this->parameters,NoneApproximationEnum); 7242 IssmDouble* B = xNew<IssmDouble>(2*numnodes); 7241 7243 IssmDouble* basis = xNew<IssmDouble>(numnodes); 7242 7244 IssmDouble* dbasis = xNew<IssmDouble>(2*numnodes); … … 7295 7297 ); 7296 7298 } 7299 } 7300 7301 vx=hnx; 7302 vy=hny; 7303 if(stabilization==2){ 7304 /*Streamline upwinding*/ 7305 vel=sqrt(vx*vx+vy*vy)+1.e-8; 7306 D[0][0]=h/(2*vel)*vx*vx; 7307 D[1][0]=h/(2*vel)*vy*vx; 7308 D[0][1]=h/(2*vel)*vx*vy; 7309 D[1][1]=h/(2*vel)*vy*vy; 7310 } 7311 else if(stabilization==1){ 7312 /*MacAyeal*/ 7313 D[0][0]=h/2.0*fabs(vx); 7314 D[0][1]=0.; 7315 D[1][0]=0.; 7316 D[1][1]=h/2.0*fabs(vy); 7317 } 7318 if(stabilization==1 || stabilization==2){ 7319 GetBprimeMasstransport(B,&xyz_list[0][0],gauss); 7320 D[0][0]=gauss->weight*Jdettria*D[0][0]; 7321 D[1][0]=gauss->weight*Jdettria*D[1][0]; 7322 D[0][1]=gauss->weight*Jdettria*D[0][1]; 7323 D[1][1]=gauss->weight*Jdettria*D[1][1]; 7324 TripleMultiply(B,2,numnodes,1, 7325 &D[0][0],2,2,0, 7326 B,2,numnodes,0, 7327 &Ke->values[0],1); 7297 7328 } 7298 7329 } … … 7306 7337 xDelete<IssmDouble>(HNx); 7307 7338 xDelete<IssmDouble>(HNy); 7339 xDelete<IssmDouble>(B); 7308 7340 delete gauss; 7309 7341 return Ke; … … 7317 7349 IssmDouble xyz_list[NUMVERTICES][3]; 7318 7350 IssmDouble D[2][2]; 7319 IssmDouble l=1 2.;7351 IssmDouble l=15.; 7320 7352 7321 7353 /*Fetch number of nodes and dof for this finite element*/ … … 7339 7371 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 7340 7372 thickness_input->GetInputValue(&thickness,gauss); 7373 if(thickness<50.) thickness=50.; 7341 7374 7342 7375 D_scalar=gauss->weight*Jdet*(l*thickness)*(l*thickness);
Note:
See TracChangeset
for help on using the changeset viewer.