Ignore:
Timestamp:
11/02/11 16:51:01 (13 years ago)
Author:
Mathieu Morlighem
Message:

Temporary commit for spc in Stokes under grounded ice, still not perfect

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk/src/c/objects/Elements/Penta.cpp ΒΆ

    r10434 r10440  
    23502350        }
    23512351
     2352}
     2353/*}}}*/
     2354/*FUNCTION Penta::ResetCoordinateSystem{{{1*/
     2355void  Penta::ResetCoordinateSystem(void){
     2356
     2357        int    approximation;
     2358        bool   stokes_basal_penalty;
     2359        double slopex[NUMVERTICES];
     2360        double slopey[NUMVERTICES];
     2361        double xz_plane[6];
     2362
     2363        /*Do not change CS if stokes_basal_penalty is activated*/
     2364        parameters->FindParam(&stokes_basal_penalty,DiagnosticStokesBasalPenaltyEnum);
     2365        if(stokes_basal_penalty) return;
     2366
     2367        /*For Stokes only: we want the CS to be tangential to the bedrock*/
     2368        inputs->GetInputValue(&approximation,ApproximationEnum);
     2369        if(IsFloating() || !IsOnBed() || (approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum &&  approximation!=PattynStokesApproximationEnum)) return;
     2370
     2371        /*Get slope on each node*/
     2372        GetInputListOnVertices(&slopex[0],BedSlopeXEnum);
     2373        GetInputListOnVertices(&slopey[0],BedSlopeYEnum);
     2374
     2375        /*Loop over basal nodes (first 3) and update their CS*/
     2376        for(int i=0;i<NUMVERTICES2D;i++){
     2377
     2378                /*New X axis             New Z axis*/
     2379                xz_plane[0]=1.;          xz_plane[3]=-slopex[i]; 
     2380                xz_plane[1]=0.;          xz_plane[4]=-slopey[i]; 
     2381                xz_plane[2]=slopex[i];   xz_plane[5]=1.;         
     2382
     2383                XZvectorsToCoordinateSystem(&this->nodes[i]->coord_system[0][0],&xz_plane[0]);
     2384        }
    23522385}
    23532386/*}}}*/
Note: See TracChangeset for help on using the changeset viewer.