Changeset 10532


Ignore:
Timestamp:
11/08/11 16:03:28 (13 years ago)
Author:
Mathieu Morlighem
Message:

Fixed rotation problem xz=[0 0 1]

Location:
issm/trunk/src/c
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp

    r10522 r10532  
    297297                                        }
    298298
    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                                         }
    304299                                }
    305300                                if ((int)vertices_type[i]==NoneApproximationEnum){
     
    308303                                }
    309304
     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++;
    310311                        }
    311312                }
  • issm/trunk/src/c/shared/Elements/CoordinateSystemTransform.cpp

    r10524 r10532  
    99        int     i,counter;
    1010        int     numdofs           = 0;
    11         double  x_norm,y_norm;
     11        double  norm;
    1212        double *transform         = NULL;
    1313        double *values            = NULL;
     
    4444                switch(cs_array[i]){
    4545                        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;
    5352                                counter+=2;
    5453                                break;
Note: See TracChangeset for help on using the changeset viewer.