Ignore:
Timestamp:
11/20/13 19:08:46 (11 years ago)
Author:
seroussi
Message:

CHG: moved ice front HO in analysis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r16838 r16839  
    15111511}
    15121512/*}}}*/
    1513 /*FUNCTION Penta::GetQuadNormal {{{*/
    1514 void Penta:: GetQuadNormal(IssmDouble* normal,IssmDouble* xyz_list){
     1513/*FUNCTION Penta::NormalSection{{{*/
     1514void Penta::NormalSection(IssmDouble* normal,IssmDouble* xyz_list){
    15151515
    15161516        /*Build unit outward pointing vector*/
     
    16341634/*}}}*/
    16351635/*FUNCTION Penta::GetZcoord {{{*/
    1636 IssmDouble Penta::GetZcoord(GaussPenta* gauss){
     1636IssmDouble Penta::GetZcoord(Gauss* gauss){
    16371637
    16381638        int    i;
     
    24662466}
    24672467/*}}}*/
     2468/*FUNCTION Penta::JacobianDeterminantSurface{{{*/
     2469void Penta::JacobianDeterminantSurface(IssmDouble* pJdet,IssmDouble* xyz_list_quad,Gauss* gauss){
     2470
     2471        _assert_(gauss->Enum()==GaussPentaEnum);
     2472        this->GetQuadJacobianDeterminant(pJdet,xyz_list_quad,(GaussPenta*)gauss);
     2473
     2474}
     2475/*}}}*/
    24682476/*FUNCTION Penta::NoIceInElement {{{*/
    24692477bool   Penta::NoIceInElement(){
     
    25422550Gauss* Penta::NewGauss(int order){
    25432551        return new GaussPenta(order,order);
     2552}
     2553/*}}}*/
     2554/*FUNCTION Penta::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert){{{*/
     2555Gauss* Penta::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert){
     2556
     2557        IssmDouble  area_coordinates[4][3];
     2558
     2559        GetAreaCoordinates(&area_coordinates[0][0],xyz_list_front,xyz_list,4);
     2560
     2561        return new GaussPenta(area_coordinates,order_horiz,order_vert);
    25442562}
    25452563/*}}}*/
     
    31233141                return S;
    31243142        }
    3125 }
    3126 /*}}}*/
    3127 /*FUNCTION Penta::SurfaceNormal {{{*/
    3128 void Penta::SurfaceNormal(IssmDouble* surface_normal, IssmDouble xyz_list[3][3]){
    3129 
    3130         int    i;
    3131         IssmDouble v13[3],v23[3];
    3132         IssmDouble normal[3];
    3133         IssmDouble normal_norm;
    3134 
    3135         for (i=0;i<3;i++){
    3136                 v13[i]=xyz_list[0][i]-xyz_list[2][i];
    3137                 v23[i]=xyz_list[1][i]-xyz_list[2][i];
    3138         }
    3139 
    3140         normal[0]=v13[1]*v23[2]-v13[2]*v23[1];
    3141         normal[1]=v13[2]*v23[0]-v13[0]*v23[2];
    3142         normal[2]=v13[0]*v23[1]-v13[1]*v23[0];
    3143 
    3144         normal_norm=sqrt( pow(normal[0],2)+pow(normal[1],2)+pow(normal[2],2) );
    3145 
    3146         *(surface_normal)=normal[0]/normal_norm;
    3147         *(surface_normal+1)=normal[1]/normal_norm;
    3148         *(surface_normal+2)=normal[2]/normal_norm;
    31493143}
    31503144/*}}}*/
     
    60726066
    60736067                /*Get normal vector to the bed */
    6074                 SurfaceNormal(&surface_normal[0],xyz_list_tria);
     6068                NormalTop(&surface_normal[0],&xyz_list_tria[0][0]);
    60756069
    60766070                bed_normal[0]=-surface_normal[0]; //Function is for upper surface, so the normal to the bed is the opposite of the result
     
    81238117        ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    81248118        for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) xyz_list_tria[i][j]=xyz_list[i+3][j];
    8125         SurfaceNormal(&surface_normal[0],xyz_list_tria);
     8119        NormalTop(&surface_normal[0],&xyz_list_tria[0][0]);
    81268120
    81278121        /* Start  looping on the number of gaussian points: */
     
    87888782        ZeroLevelsetCoordinates(&xyz_list_front,&xyz_list[0][0],MaskIceLevelsetEnum);
    87898783        GetAreaCoordinates(&area_coordinates[0][0],xyz_list_front,&xyz_list[0][0],4);
    8790         GetQuadNormal(&normal[0],xyz_list_front);
     8784        NormalSection(&normal[0],xyz_list_front);
    87918785
    87928786        /*Initialize gauss points*/
     
    88218815        /*Clean up and return*/
    88228816        xDelete<IssmDouble>(basis);
     8817        xDelete<IssmDouble>(xyz_list_front);
    88238818        delete gauss;
    88248819        return pe;
     
    88838878        ZeroLevelsetCoordinates(&xyz_list_front,&xyz_list[0][0],MaskIceLevelsetEnum);
    88848879        GetAreaCoordinates(&area_coordinates[0][0],xyz_list_front,&xyz_list[0][0],4);
    8885         GetQuadNormal(&normal[0],xyz_list_front);
     8880        NormalSection(&normal[0],xyz_list_front);
    88868881
    88878882        /*Start looping on Gaussian points*/
Note: See TracChangeset for help on using the changeset viewer.