Changeset 16151
- Timestamp:
- 09/17/13 14:11:06 (12 years ago)
- Location:
- issm/trunk-jpl/src/c/classes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r16149 r16151 4544 4544 4545 4545 /*Intermediaries*/ 4546 int i,j,found=0;4547 int friction_type,stabilization;4546 int i,j,found=0; 4547 int stabilization; 4548 4548 IssmDouble Jdet,phi,dt; 4549 4549 IssmDouble rho_ice,heatcapacity; … … 4813 4813 4814 4814 /*Intermediaries*/ 4815 int i,j,found=0;4816 int friction_type,stabilization;4815 int i,found=0; 4816 int stabilization; 4817 4817 IssmDouble Jdet,phi,dt; 4818 4818 IssmDouble rho_ice,heatcapacity; … … 4844 4844 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input); 4845 4845 Input* temperature_input=NULL; 4846 if 4847 if 4846 if(reCast<bool,IssmDouble>(dt)) temperature_input=inputs->GetInput(TemperatureEnum); _assert_(inputs); 4847 if(stabilization==2) diameter=MinEdgeLength(xyz_list); 4848 4848 4849 4849 /* Start looping on the number of gaussian points: */ … … 5586 5586 IssmDouble epsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/ 5587 5587 IssmDouble eps1[3],eps2[3]; 5588 IssmDouble phi[NUMVERTICES];5589 5588 IssmDouble dphi[3][NUMVERTICES]; 5590 5589 GaussPenta *gauss=NULL; … … 6159 6158 /*dJ/dalpha = ∂L/∂alpha = ∂J/∂alpha + ∂/∂alpha(KU-F)*/ 6160 6159 6161 int i,approximation;6162 Tria* 6160 int approximation; 6161 Tria* tria=NULL; 6163 6162 6164 6163 /*If on water, skip grad (=0): */ … … 6213 6212 6214 6213 /*Now deal with ∂J/∂alpha*/ 6215 int 6216 int 6214 int *responses = NULL; 6215 int num_responses,resp; 6217 6216 this->parameters->FindParam(&num_responses,InversionNumCostFunctionsEnum); 6218 6217 this->parameters->FindParam(&responses,NULL,NULL,StepResponsesEnum); … … 8019 8018 8020 8019 /*Intermediaries */ 8021 int i,j;8022 8020 int approximation; 8023 8021 IssmDouble xyz_list[NUMVERTICES][3]; … … 8064 8062 8065 8063 D_scalar=2*newviscosity*gauss->weight*Jdet; 8066 for (i=0;i<5;i++) D[i*5+i]=D_scalar;8064 for(int i=0;i<5;i++) D[i*5+i]=D_scalar; 8067 8065 8068 8066 TripleMultiply(B,5,numdof,1, … … 9127 9125 9128 9126 /*Intermediaries*/ 9129 int i,j;9130 9127 IssmDouble Jdet; 9131 9128 IssmDouble slope[3]; //do not put 2! this goes into GetInputDerivativeValue, which addresses slope[3] also! … … 9160 9157 driving_stress_baseline=matpar->GetRhoIce()*matpar->GetG(); 9161 9158 9162 for(i =0;i<numnodes;i++){9159 for(int i=0;i<numnodes;i++){ 9163 9160 pe->values[i*NDOF2+0]+= -driving_stress_baseline*slope[0]*Jdet*gauss->weight*basis[i]; 9164 9161 pe->values[i*NDOF2+1]+= -driving_stress_baseline*slope[1]*Jdet*gauss->weight*basis[i]; … … 9372 9369 /*Intermediaries*/ 9373 9370 int i,j; 9374 int approximation;9375 9371 IssmDouble Jdet,gravity,rho_ice,B,D_scalar_stab,viscosity; 9376 9372 IssmDouble forcex,forcey,forcez,diameter,FSreconditioning; … … 9388 9384 IssmDouble dnodalbasis[6][6][3]; 9389 9385 IssmDouble SW[6][4][4]; 9390 int p, q,ii;9386 int p,ii; 9391 9387 int c=3; //index of pressure 9392 9388 … … 9463 9459 9464 9460 /*Intermediaries*/ 9465 int i ,j;9461 int i; 9466 9462 int approximation; 9467 9463 IssmDouble Jdet,gravity,rho_ice; … … 9866 9862 9867 9863 /*Intermediaries */ 9868 int i,j ,approximation;9864 int i,j; 9869 9865 IssmDouble xyz_list[NUMVERTICES][3]; 9870 9866 IssmDouble Jdet; -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r16149 r16151 1860 1860 1861 1861 /*Intermediaries*/ 1862 int i, j,t;1862 int i,t; 1863 1863 int tria_vertex_ids[3]; 1864 1864 int row; … … 2418 2418 2419 2419 /*Intermediaries*/ 2420 int i ,j;2420 int i; 2421 2421 int tria_vertex_ids[3]; 2422 2422 IssmDouble nodeinputs[3]; … … 2429 2429 2430 2430 /*Checks if debuging*/ 2431 /*{{{*/2432 2431 _assert_(iomodel->elements); 2433 /*}}}*/2434 2432 2435 2433 /*Fetch parameters: */ … … 2983 2981 2984 2982 /*Intermediaries*/ 2985 int i,j;2986 2983 IssmDouble xyz_list[NUMVERTICES][3]; 2987 2984 IssmDouble viscosity,newviscosity,oldviscosity; … … 3027 3024 newviscosity=viscosity+viscosity_overshoot*(viscosity-oldviscosity); 3028 3025 D_scalar=2.*newviscosity*thickness*gauss->weight*Jdet; 3029 for(i =0;i<3;i++) D[i*3+i]=D_scalar;3026 for(int i=0;i<3;i++) D[i*3+i]=D_scalar; 3030 3027 3031 3028 TripleMultiply(B,3,numdof,1, … … 3051 3048 /*Intermediaries*/ 3052 3049 bool mainlyfloating; 3053 int i,j;3054 3050 int analysis_type,migration_style; 3055 3051 int point1; … … 3114 3110 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 3115 3111 D_scalar=alpha2*gauss->weight*Jdet; 3116 for(i =0;i<2;i++) D[i*2+i]=D_scalar;3112 for(int i=0;i<2;i++) D[i*2+i]=D_scalar; 3117 3113 3118 3114 TripleMultiply(B,2,numdof,1, … … 6470 6466 /*Intermediaries */ 6471 6467 int stabilization; 6472 int dim;6473 6468 IssmDouble Jdet,D_scalar,dt,h; 6474 6469 IssmDouble vel,vx,vy; … … 6568 6563 /*Intermediaries */ 6569 6564 int stabilization; 6570 int dim;6571 6565 IssmDouble Jdet,D_scalar,dt,h; 6572 6566 IssmDouble vel,vx,vy; … … 7015 7009 7016 7010 /*Intermediaries */ 7017 int stabilization; 7018 int i,j,dim; 7011 int stabilization,dim; 7019 7012 IssmDouble Jdet,vx,vy,dvxdx,dvydy,vel,h; 7020 7013 IssmDouble D_scalar; -
issm/trunk-jpl/src/c/classes/Inputs/TransientInput.cpp
r15737 r16151 267 267 void TransientInput::GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){ 268 268 269 int i; 270 IssmDouble* times=NULL; 271 IssmDouble* values=NULL; 272 int numsteps; 273 int count; 274 bool iscurrenttime_included=false; 269 int i; 270 IssmDouble *times = NULL; 271 IssmDouble *values = NULL; 272 int numsteps; 273 bool iscurrenttime_included = false; 275 274 276 275 /*Figure out how many time steps we are going to return: */ -
issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp
r16125 r16151 634 634 int reset_penalties = 0; 635 635 int found = 0; 636 int penalty_lock;637 636 int new_active; 638 637 IssmDouble pressure;
Note:
See TracChangeset
for help on using the changeset viewer.