Changeset 4836 for issm/trunk


Ignore:
Timestamp:
07/27/10 14:23:21 (15 years ago)
Author:
seroussi
Message:

GetInput in all CreateKMatrix and CreatePVector in Tria

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r4835 r4836  
    25342534        int     found=0;
    25352535
    2536         /*parameters: */
     2536        /*inputs: */
     2537        Input* vxaverage_input=NULL;
     2538        Input* vyaverage_input=NULL;
    25372539        bool artdiff;
    25382540
     
    25432545        /*retrieve some parameters: */
    25442546        this->parameters->FindParam(&artdiff,ArtDiffEnum);
     2547
     2548        /*Retrieve all inputs we will be needed*/
     2549        vxaverage_input=inputs->GetInput(VxAverageEnum);
     2550        vyaverage_input=inputs->GetInput(VyAverageEnum);
    25452551
    25462552        //Create Artificial diffusivity once for all if requested
     
    25512557
    25522558                //Build K matrix (artificial diffusivity matrix)
    2553                 inputs->GetParameterAverage(&v_gauss[0],VxAverageEnum);
    2554                 inputs->GetParameterAverage(&v_gauss[1],VyAverageEnum);
     2559                vxaverage_input->GetParameterAverage(&v_gauss[0]);
     2560                vyaverage_input->GetParameterAverage(&v_gauss[1]);
    25552561
    25562562                K[0][0]=pow(Jdettria,(double).5)/2.0*fabs(v_gauss[0]);
     
    25772583
    25782584                //Get vx, vy and their derivatives at gauss point
    2579                 inputs->GetParameterValue(&vx, &gauss_l1l2l3[0],VxAverageEnum);
    2580                 inputs->GetParameterValue(&vy, &gauss_l1l2l3[0],VyAverageEnum);
    2581 
    2582                 inputs->GetParameterDerivativeValue(&dvx[0],&xyz_list[0][0],&gauss_l1l2l3[0],VxAverageEnum);
    2583                 inputs->GetParameterDerivativeValue(&dvy[0],&xyz_list[0][0],&gauss_l1l2l3[0],VyAverageEnum);
     2585                vxaverage_input->GetParameterValue(&vx, &gauss_l1l2l3[0]);
     2586                vyaverage_input->GetParameterValue(&vy, &gauss_l1l2l3[0]);
     2587
     2588                vxaverage_input->GetParameterDerivativeValue(&dvx[0],&xyz_list[0][0],&gauss_l1l2l3[0]);
     2589                vyaverage_input->GetParameterDerivativeValue(&dvy[0],&xyz_list[0][0],&gauss_l1l2l3[0]);
    25842590
    25852591                dvxdx=dvx[0];
     
    26782684        int     found;
    26792685
     2686        /*inputs: */
     2687        Input* vx_input=NULL;
     2688        Input* vy_input=NULL;
     2689
    26802690        /* Get node coordinates and dof list: */
    26812691        GetVerticesCoordinates(&xyz_list[0][0], nodes, numgrids);
     
    26842694        /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */
    26852695        GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2);
     2696
     2697        /*Retrieve all inputs we will be needed*/
     2698        vx_input=inputs->GetInput(VxEnum);
     2699        vy_input=inputs->GetInput(VyEnum);
    26862700
    26872701        /* Start  looping on the number of gaussian points: */
     
    27022716
    27032717                //Get vx, vy and their derivatives at gauss point
    2704                 inputs->GetParameterValue(&vx, &gauss_l1l2l3[0],VxEnum);
    2705                 inputs->GetParameterValue(&vy, &gauss_l1l2l3[0],VyEnum);
     2718                vx_input->GetParameterValue(&vx, &gauss_l1l2l3[0]);
     2719                vy_input->GetParameterValue(&vy, &gauss_l1l2l3[0]);
    27062720
    27072721                DL_scalar=-gauss_weight*Jdettria;
     
    27832797        int     found=0;
    27842798
    2785         /*parameters: */
     2799        /*inputs: */
     2800        Input* vxaverage_input=NULL;
     2801        Input* vyaverage_input=NULL;
    27862802        bool artdiff;
    27872803
     
    28132829        ny=ny/norm;
    28142830
     2831        /*Retrieve all inputs we will be needed*/
     2832        vxaverage_input=inputs->GetInput(VxAverageEnum);
     2833        vyaverage_input=inputs->GetInput(VyAverageEnum);
     2834
    28152835        //Create Artificial diffusivity once for all if requested
    28162836        if(artdiff){
     
    28202840
    28212841                //Build K matrix (artificial diffusivity matrix)
    2822                 inputs->GetParameterAverage(&v_gauss[0],VxAverageEnum);
    2823                 inputs->GetParameterAverage(&v_gauss[1],VyAverageEnum);
     2842                vxaverage_input->GetParameterAverage(&v_gauss[0]);
     2843                vyaverage_input->GetParameterAverage(&v_gauss[1]);
    28242844
    28252845                K[0][0]=pow(10,2)*pow(Jdettria,(double).5)/2.0*fabs(v_gauss[0]); //pow should be zero!!
     
    28462866
    28472867                //Get vx, vy and their derivatives at gauss point
    2848                 inputs->GetParameterValue(&vx,&gauss_l1l2l3[0],VxAverageEnum);
    2849                 inputs->GetParameterValue(&vy,&gauss_l1l2l3[0],VyAverageEnum);
    2850 
    2851                 inputs->GetParameterDerivativeValue(&dvx[0],&xyz_list[0][0],&gauss_l1l2l3[0],VxAverageEnum);
    2852                 inputs->GetParameterDerivativeValue(&dvy[0],&xyz_list[0][0],&gauss_l1l2l3[0],VyAverageEnum);
     2868                vxaverage_input->GetParameterValue(&vx,&gauss_l1l2l3[0]);
     2869                vyaverage_input->GetParameterValue(&vy,&gauss_l1l2l3[0]);
     2870
     2871                vxaverage_input->GetParameterDerivativeValue(&dvx[0],&xyz_list[0][0],&gauss_l1l2l3[0]);
     2872                vyaverage_input->GetParameterDerivativeValue(&dvy[0],&xyz_list[0][0],&gauss_l1l2l3[0]);
    28532873
    28542874                dvxdx=dvx[0];
     
    30893109        double    gauss[numvertices][numvertices] = {{1,0,0},{0,1,0},{0,0,1}}; //TO BE DELETED
    30903110
    3091 
    30923111        double MAXSLOPE=.06; // 6 %
    30933112        double MOUNTAINKEXPONENT=10;
     
    30973116        int  drag_type;
    30983117        Input* surface_input=NULL;
     3118        Input* vx_input=NULL;
     3119        Input* vy_input=NULL;
     3120        Input* vz_input=NULL;
    30993121
    31003122        /*retrive parameters: */
     
    31053127        inputs->GetParameterValue(&drag_type,DragTypeEnum);
    31063128        surface_input=inputs->GetInput(SurfaceEnum);
     3129        vx_input=inputs->GetInput(VxEnum);
     3130        vy_input=inputs->GetInput(VyEnum);
     3131        vz_input=inputs->GetInput(VzEnum);
    31073132       
    31083133        /* Get node coordinates and dof list: */
     
    34603485        int     found;
    34613486
    3462         /*parameters: */
     3487        /*inputs: */
     3488        Input* vxaverage_input=NULL;
     3489        Input* vyaverage_input=NULL;
    34633490        double dt;
    34643491        bool artdiff;
     
    34713498        GetVerticesCoordinates(&xyz_list[0][0], nodes, numgrids);
    34723499        GetDofList(&doflist[0],&numberofdofspernode);
     3500
     3501        /*Retrieve all inputs we will be needing: */
     3502        vxaverage_input=inputs->GetInput(VxAverageEnum);
     3503        vyaverage_input=inputs->GetInput(VyAverageEnum);
    34733504
    34743505        //Create Artificial diffusivity once for all if requested
     
    34793510
    34803511                //Build K matrix (artificial diffusivity matrix)
    3481                 inputs->GetParameterAverage(&v_gauss[0],VxAverageEnum);
    3482                 inputs->GetParameterAverage(&v_gauss[1],VyAverageEnum);
     3512                vxaverage_input->GetParameterAverage(&v_gauss[0]);
     3513                vyaverage_input->GetParameterAverage(&v_gauss[1]);
    34833514
    34843515                K[0][0]=pow(Jdettria,(double).5)/2.0*fabs(v_gauss[0]);
     
    35173548
    35183549                //Get vx, vy and their derivatives at gauss point
    3519                 inputs->GetParameterValue(&vx,&gauss_l1l2l3[0],VxAverageEnum);
    3520                 inputs->GetParameterValue(&vy,&gauss_l1l2l3[0],VyAverageEnum);
    3521 
    3522                 inputs->GetParameterDerivativeValue(&dvx[0],&xyz_list[0][0],&gauss_l1l2l3[0],VxAverageEnum);
    3523                 inputs->GetParameterDerivativeValue(&dvy[0],&xyz_list[0][0],&gauss_l1l2l3[0],VyAverageEnum);
     3550                vxaverage_input->GetParameterValue(&vx,&gauss_l1l2l3[0]);
     3551                vyaverage_input->GetParameterValue(&vy,&gauss_l1l2l3[0]);
     3552
     3553                vxaverage_input->GetParameterDerivativeValue(&dvx[0],&xyz_list[0][0],&gauss_l1l2l3[0]);
     3554                vyaverage_input->GetParameterDerivativeValue(&dvy[0],&xyz_list[0][0],&gauss_l1l2l3[0]);
    35243555
    35253556                dvxdx=dvx[0];
     
    36233654        int     found;
    36243655
    3625         /*parameters: */
     3656        /*inputs: */
     3657        Input* vxaverage_input=NULL;
     3658        Input* vyaverage_input=NULL;
    36263659        double dt;
    36273660
     
    36353668        /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */
    36363669        GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2);
     3670
     3671        /*Retrieve all inputs we will be needed*/
     3672        vxaverage_input=inputs->GetInput(VxAverageEnum);
     3673        vyaverage_input=inputs->GetInput(VyAverageEnum);
    36373674
    36383675        /* Start  looping on the number of gaussian points: */
     
    36653702
    36663703                //Get vx, vy and their derivatives at gauss point
    3667                 inputs->GetParameterValue(&vx,&gauss_l1l2l3[0],VxAverageEnum);
    3668                 inputs->GetParameterValue(&vy,&gauss_l1l2l3[0],VyAverageEnum);
     3704                vxaverage_input->GetParameterValue(&vx,&gauss_l1l2l3[0]);
     3705                vyaverage_input->GetParameterValue(&vy,&gauss_l1l2l3[0]);
    36693706
    36703707                DL_scalar=-dt*gauss_weight*Jdettria;
     
    38263863        rho_ice=matpar->GetRhoIce();
    38273864        heatcapacity=matpar->GetHeatCapacity();
    3828 
    38293865
    38303866        GaussTria (&num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2);
     
    39043940        double  melting_g;
    39053941
     3942        /*inputs: */
     3943        Input* accumulation_input=NULL;
     3944        Input* melting_input=NULL;
     3945
    39063946        /* Get node coordinates and dof list: */
    39073947        GetVerticesCoordinates(&xyz_list[0][0], nodes, numgrids);
     
    39113951        GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2);
    39123952
     3953        /*retrieve inputs :*/
     3954        accumulation_input=inputs->GetInput(AccumulationRateEnum);
     3955        melting_input=inputs->GetInput(MeltingRateEnum);
     3956       
    39133957        /* Start  looping on the number of gaussian points: */
    39143958        for (ig=0; ig<num_gauss; ig++){
     
    39223966                GetJacobianDeterminant2d(&Jdettria, &xyz_list[0][0],gauss_l1l2l3);
    39233967
    3924                 /*Get L matrix: */
     3968                /*Get L matrix: *
    39253969                GetL(&L[0], &xyz_list[0][0], gauss_l1l2l3,numberofdofspernode);
    39263970
    39273971                /* Get accumulation, melting at gauss point */
    3928                 inputs->GetParameterValue(&accumulation_g, &gauss_l1l2l3[0],AccumulationRateEnum);
    3929                 inputs->GetParameterValue(&melting_g, &gauss_l1l2l3[0],MeltingRateEnum);
     3972                accumulation_input->GetParameterValue(&accumulation_g, &gauss_l1l2l3[0]);
     3973                melting_input->GetParameterValue(&melting_g, &gauss_l1l2l3[0]);
    39303974
    39313975                /* Add value into pe_g: */
     
    39473991/*FUNCTION Tria::CreatePVectorBalancedthickness_DG {{{1*/
    39483992void  Tria::CreatePVectorBalancedthickness_DG(Vec pg){
    3949 
    39503993
    39513994        /* local declarations */
     
    39794022        double  dhdt_g;
    39804023
     4024        /*inputs: */
     4025        Input* accumulation_input=NULL;
     4026        Input* melting_input=NULL;
     4027        Input* dhdt_input=NULL;
     4028
    39814029        /* Get node coordinates and dof list: */
    39824030        GetVerticesCoordinates(&xyz_list[0][0], nodes, numgrids);
     
    39854033        /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */
    39864034        GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2);
     4035
     4036        /*Retrieve all inputs we will be needing: */
     4037        accumulation_input=inputs->GetInput(AccumulationRateEnum);
     4038        melting_input=inputs->GetInput(MeltingRateEnum);
     4039        dhdt_input=inputs->GetInput(DhDtEnum);
    39874040
    39884041        /* Start  looping on the number of gaussian points: */
     
    40014054
    40024055                /* Get accumulation, melting and thickness at gauss point */
    4003                 inputs->GetParameterValue(&accumulation_g, &gauss_l1l2l3[0],AccumulationRateEnum);
    4004                 inputs->GetParameterValue(&melting_g, &gauss_l1l2l3[0],MeltingRateEnum);
    4005                 inputs->GetParameterValue(&dhdt_g, &gauss_l1l2l3[0],DhDtEnum);
     4056                accumulation_input->GetParameterValue(&accumulation_g, &gauss_l1l2l3[0]);
     4057                melting_input->GetParameterValue(&melting_g, &gauss_l1l2l3[0]);
     4058                dhdt_input->GetParameterValue(&dhdt_g, &gauss_l1l2l3[0]);
    40064059
    40074060                /* Add value into pe_g: */
     
    40544107        double  melting_g;
    40554108
     4109        /*inputs: */
     4110        Input* accumulation_input=NULL;
     4111        Input* melting_input=NULL;
     4112
    40564113        /* Get node coordinates and dof list: */
    40574114        GetVerticesCoordinates(&xyz_list[0][0], nodes, numgrids);
     
    40604117        /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */
    40614118        GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2);
     4119
     4120        /*Retrieve all inputs we will be needing: */
     4121        accumulation_input=inputs->GetInput(AccumulationRateEnum);
     4122        melting_input=inputs->GetInput(MeltingRateEnum);
    40624123
    40634124        /* Start  looping on the number of gaussian points: */
     
    40764137
    40774138                /* Get accumulation, melting at gauss point */
    4078                 inputs->GetParameterValue(&accumulation_g, &gauss_l1l2l3[0],AccumulationRateEnum);
    4079                 inputs->GetParameterValue(&melting_g, &gauss_l1l2l3[0],MeltingRateEnum);
     4139                accumulation_input->GetParameterValue(&accumulation_g, &gauss_l1l2l3[0]);
     4140                melting_input->GetParameterValue(&melting_g, &gauss_l1l2l3[0]);
    40804141
    40814142                /* Add value into pe_g: */
     
    41364197        double  dbdx,dbdy;
    41374198
     4199        /*inputs: */
     4200        Input* melting_input=NULL;
     4201        Input* vx_input=NULL;
     4202        Input* vy_input=NULL;
     4203        Input* bed_input=NULL;
     4204
    41384205        /* Get node coordinates and dof list: */
    41394206        GetVerticesCoordinates(&xyz_list[0][0], nodes, numgrids);
     
    41424209        /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */
    41434210        GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2);
     4211
     4212        /*Retrieve all inputs we will be needing: */
     4213        melting_input=inputs->GetInput(MeltingRateEnum);
     4214        vx_input=inputs->GetInput(VxEnum);
     4215        vy_input=inputs->GetInput(VyEnum);
     4216        bed_input=inputs->GetInput(BedEnum);
    41444217
    41454218        /*For icesheets: */
     
    41544227
    41554228                /*Get melting at gaussian point: */
    4156                 inputs->GetParameterValue(&meltingvalue, &gauss_l1l2l3[0],MeltingRateEnum);
     4229                melting_input->GetParameterValue(&meltingvalue, &gauss_l1l2l3[0]);
    41574230
    41584231                /*Get velocity at gaussian point: */
    4159                 inputs->GetParameterValue(&vx, &gauss_l1l2l3[0],VxEnum);
    4160                 inputs->GetParameterValue(&vy, &gauss_l1l2l3[0],VyEnum);
     4232                vx_input->GetParameterValue(&vx, &gauss_l1l2l3[0]);
     4233                vy_input->GetParameterValue(&vy, &gauss_l1l2l3[0]);
    41614234
    41624235                /*Get bed slope: */
    4163                 inputs->GetParameterDerivativeValue(&slope[0],&xyz_list[0][0],&gauss_l1l2l3[0],BedEnum);
     4236                bed_input->GetParameterDerivativeValue(&slope[0],&xyz_list[0][0],&gauss_l1l2l3[0]);
    41644237                dbdx=slope[0];
    41654238                dbdy=slope[1];
     
    41704243                //Get L matrix if viscous basal drag present:
    41714244                GetL(&L[0], &xyz_list[0][0], gauss_l1l2l3,NDOF1);
    4172 
    41734245
    41744246                /*Build gaussian vector: */
     
    43804452        double  thickness_g;
    43814453
    4382         /*parameters: */
     4454        /*inputs: */
    43834455        double  dt;
     4456        Input* accumulation_input=NULL;
     4457        Input* melting_input=NULL;
     4458        Input* thickness_input=NULL;
    43844459
    43854460        /*retrieve some parameters: */
     
    43924467        /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */
    43934468        GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2);
     4469
     4470        /*Retrieve all inputs we will be needing: */
     4471        accumulation_input=inputs->GetInput(AccumulationRateEnum);
     4472        melting_input=inputs->GetInput(MeltingRateEnum);
     4473        thickness_input=inputs->GetInput(ThicknessEnum);
    43944474
    43954475        /* Start  looping on the number of gaussian points: */
     
    44084488
    44094489                /* Get accumulation, melting and thickness at gauss point */
    4410                 inputs->GetParameterValue(&accumulation_g, &gauss_l1l2l3[0],AccumulationRateEnum);
    4411                 inputs->GetParameterValue(&melting_g, &gauss_l1l2l3[0],MeltingRateEnum);
    4412                 inputs->GetParameterValue(&thickness_g, &gauss_l1l2l3[0],ThicknessEnum);
     4490                accumulation_input->GetParameterValue(&accumulation_g, &gauss_l1l2l3[0]);
     4491                melting_input->GetParameterValue(&melting_g, &gauss_l1l2l3[0]);
     4492                thickness_input->GetParameterValue(&thickness_g, &gauss_l1l2l3[0]);
    44134493
    44144494                /* Add value into pe_g: */
     
    44614541        double  thickness_g;
    44624542        double  dt;
     4543        Input*  accumulation_input=NULL;
     4544        Input*  melting_input=NULL;
     4545        Input*  thickness_input=NULL;
    44634546
    44644547        /*retrieve some parameters: */
     
    44714554        /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */
    44724555        GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2);
     4556
     4557        /*Retrieve all inputs we will be needing: */
     4558        accumulation_input=inputs->GetInput(AccumulationRateEnum);
     4559        melting_input=inputs->GetInput(MeltingRateEnum);
     4560        thickness_input=inputs->GetInput(ThicknessEnum);
    44734561
    44744562        /* Start  looping on the number of gaussian points: */
     
    44874575
    44884576                /* Get accumulation, melting and thickness at gauss point */
    4489                 inputs->GetParameterValue(&accumulation_g, &gauss_l1l2l3[0],AccumulationRateEnum);
    4490                 inputs->GetParameterValue(&melting_g, &gauss_l1l2l3[0],MeltingRateEnum);
    4491                 inputs->GetParameterValue(&thickness_g, &gauss_l1l2l3[0],ThicknessEnum);
     4577                accumulation_input->GetParameterValue(&accumulation_g, &gauss_l1l2l3[0]);
     4578                melting_input->GetParameterValue(&melting_g, &gauss_l1l2l3[0]);
     4579                thickness_input->GetParameterValue(&thickness_g, &gauss_l1l2l3[0]);
    44924580
    44934581                /* Add value into pe_g: */
     
    45414629        int     analysis_type;
    45424630
     4631        /*inputs :*/
     4632        Input* slope_input=NULL;
     4633
    45434634        /*retrive parameters: */
    45444635        parameters->FindParam(&analysis_type,AnalysisTypeEnum);
     
    45484639        GetDofList(&doflist[0],&numberofdofspernode);
    45494640
    4550 
    45514641        /* Get gaussian points and weights: */
    45524642        GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2); /*We need higher order because our load is order 2*/
    45534643
    4554 
     4644        /*Retrieve all inputs we will be needing: */
     4645        if ( (analysis_type==SurfaceSlopeXAnalysisEnum) || (analysis_type==SurfaceSlopeYAnalysisEnum)){
     4646                slope_input=inputs->GetInput(SurfaceEnum);
     4647        }
     4648        if ( (analysis_type==BedSlopeXAnalysisEnum) || (analysis_type==BedSlopeYAnalysisEnum)){
     4649                slope_input=inputs->GetInput(BedEnum);
     4650        }
     4651               
    45554652        /* Start  looping on the number of gaussian points: */
    45564653        for (ig=0; ig<num_gauss; ig++){
     
    45614658                gauss_l1l2l3[2]=*(third_gauss_area_coord+ig);
    45624659
    4563                 if ( (analysis_type==SurfaceSlopeXAnalysisEnum) || (analysis_type==SurfaceSlopeYAnalysisEnum)){
    4564                         inputs->GetParameterDerivativeValue(&slope[0],&xyz_list[0][0],&gauss_l1l2l3[0],SurfaceEnum);
    4565                 }
    4566                 if ( (analysis_type==BedSlopeXAnalysisEnum) || (analysis_type==BedSlopeYAnalysisEnum)){
    4567                         inputs->GetParameterDerivativeValue(&slope[0],&xyz_list[0][0],&gauss_l1l2l3[0],BedEnum);
    4568                 }
     4660                slope_input->GetParameterDerivativeValue(&slope[0],&xyz_list[0][0],&gauss_l1l2l3[0]);
    45694661
    45704662                /* Get Jacobian determinant: */
     
    46394731        double  t_pmp;
    46404732        double  scalar_ocean;
     4733
     4734        /*inputs: */
     4735        Input* pressure_input=NULL;
    46414736
    46424737        /* Get node coordinates and dof list: */
     
    46604755        GaussTria (&num_area_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2);
    46614756
     4757        /*Retrieve all inputs we will be needing: */
     4758        pressure_input=inputs->GetInput(PressureEnum);
     4759
    46624760        /* Start looping on the number of gauss 2d (nodes on the bedrock) */
    46634761        for (ig=0; ig<num_area_gauss; ig++){
     
    46744772
    46754773                /*Get geothermal flux and basal friction */
    4676                 inputs->GetParameterValue(&pressure, &gauss_coord[0],PressureEnum);
     4774                pressure_input->GetParameterValue(&pressure, &gauss_coord[0]);
    46774775                t_pmp=meltingpoint-beta*pressure;
    46784776
     
    47494847        parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    47504848
     4849        /*inputs: */
     4850        Input* vx_input=NULL; //TO BE DELETED
     4851        Input* vy_input=NULL; //TO BE DELETED
     4852        Input* vz_input=NULL; //TO BE DELETED
     4853        Input* geothermalflux_input=NULL;
    47514854       
    47524855        /* Get node coordinates and dof list: */
     
    47664869        friction=new Friction("3d",inputs,matpar,analysis_type);
    47674870
     4871        /*Retrieve all inputs we will be needing: */
     4872        vx_input=inputs->GetInput(VxEnum);
     4873        vy_input=inputs->GetInput(VyEnum);
     4874        vz_input=inputs->GetInput(VzEnum);
     4875        geothermalflux_input=inputs->GetInput(GeothermalFluxEnum);
     4876
    47684877        /*COMPUT alpha2_list and basalfriction_list (TO BE DELETED)*/
    47694878        for(i=0;i<numgrids;i++){
    47704879                friction->GetAlpha2(&alpha2_list[i],&gauss[i][0],VxEnum,VyEnum,VzEnum); //TO BE DELETED
    47714880        }
    4772         inputs->GetParameterValues(&vx_list[0],&gauss[0][0],3,VxEnum); //TO BE DELETED
    4773         inputs->GetParameterValues(&vy_list[0],&gauss[0][0],3,VyEnum); //TO BE DELETED
     4881        vx_input->GetParameterValues(&vx_list[0],&gauss[0][0],3); //TO BE DELETED
     4882        vy_input->GetParameterValues(&vy_list[0],&gauss[0][0],3); //TO BE DELETED
    47744883        for(i=0;i<numgrids;i++){
    47754884                basalfriction_list[i]=alpha2_list[i]*(pow(vx_list[i],(double)2.0)+pow(vy_list[i],(double)2.0)); //TO BE DELETED
     
    47934902
    47944903                /*Get geothermal flux and basal friction */
    4795                 inputs->GetParameterValue(&geothermalflux_value, &gauss_coord[0],GeothermalFluxEnum);
     4904                geothermalflux_input->GetParameterValue(&geothermalflux_value, &gauss_coord[0]);
    47964905       
    47974906                /*Friction: */
Note: See TracChangeset for help on using the changeset viewer.