Changeset 10532
- Timestamp:
- 11/08/11 16:03:28 (13 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp
r10522 r10532 297 297 } 298 298 299 /*Constraint at the bedrock interface (v.n = vz = 0) (Coordinates will be updated according to the bed slope)*/300 if(nodeonbed[i] && nodeonicesheet[i] && nodeonstokes[i]){301 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0.,DiagnosticHorizAnalysisEnum));302 count++;303 }304 299 } 305 300 if ((int)vertices_type[i]==NoneApproximationEnum){ … … 308 303 } 309 304 305 } 306 307 /*Constraint at the bedrock interface (v.n = vz = 0) (Coordinates will be updated according to the bed slope)*/ 308 if(nodeonbed[i] && nodeonicesheet[i] && nodeonstokes[i]){ 309 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0.,DiagnosticHorizAnalysisEnum)); 310 count++; 310 311 } 311 312 } -
issm/trunk/src/c/shared/Elements/CoordinateSystemTransform.cpp
r10524 r10532 9 9 int i,counter; 10 10 int numdofs = 0; 11 double x_norm,y_norm;11 double norm; 12 12 double *transform = NULL; 13 13 double *values = NULL; … … 44 44 switch(cs_array[i]){ 45 45 case XYEnum: 46 /*We remove the z component, we need to renormalize x and y*/ 47 x_norm = sqrt( coord_system[0][0]*coord_system[0][0] + coord_system[1][0]*coord_system[1][0]); _assert_(x_norm>1.e-5); 48 y_norm = sqrt( coord_system[0][1]*coord_system[0][1] + coord_system[1][1]*coord_system[1][1]); _assert_(y_norm>1.e-5); 49 transform[(numdofs)*(counter+0) + counter+0] = coord_system[0][0]/x_norm; 50 transform[(numdofs)*(counter+0) + counter+1] = coord_system[0][1]/y_norm; 51 transform[(numdofs)*(counter+1) + counter+0] = coord_system[1][0]/x_norm; 52 transform[(numdofs)*(counter+1) + counter+1] = coord_system[1][1]/y_norm; 46 /*We remove the z component, we need to renormalize x and y: x=[x1 x2 0] y=[-x2 x1 0]*/ 47 norm = sqrt( coord_system[0][0]*coord_system[0][0] + coord_system[1][0]*coord_system[1][0]); _assert_(norm>1.e-4); 48 transform[(numdofs)*(counter+0) + counter+0] = coord_system[0][0]/norm; 49 transform[(numdofs)*(counter+0) + counter+1] = - coord_system[1][0]/norm; 50 transform[(numdofs)*(counter+1) + counter+0] = coord_system[1][0]/norm; 51 transform[(numdofs)*(counter+1) + counter+1] = coord_system[0][0]/norm; 53 52 counter+=2; 54 53 break;
Note:
See TracChangeset
for help on using the changeset viewer.