Changeset 14822


Ignore:
Timestamp:
04/30/13 15:42:20 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: cosmetics, removed double blank lines and bad indentation

Location:
issm/trunk-jpl/src/c
Files:
43 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/Container/Vertices.cpp

    r14476 r14822  
    206206        int my_rank;
    207207        int num_vertices;
    208        
     208
    209209        /*output: */
    210210        Matrix<IssmDouble>* xyz = NULL;
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r14807 r14822  
    3939        this->comm=incomm;
    4040        this->SetStaticComm();
    41        
     41
    4242        /*Now, initialize PETSC: */
    4343        #ifdef _HAVE_PETSC_
     
    129129        /*Now delete: */
    130130        delete profiler;
    131        
     131
    132132        /*Finalize PETSC for this model: */
    133133        #ifdef _HAVE_PETSC_
     
    673673/*}}}*/
    674674void FemModel::Responsex(IssmDouble* responses,int response_descriptor_enum,bool process_units,int weight_index){/*{{{*/
    675 
    676675
    677676        switch (response_descriptor_enum){
     
    719718void FemModel::RequestedOutputsx(int* requested_outputs, int numoutputs){/*{{{*/
    720719
    721 
    722720        int      output_enum;
    723721        int      step;
     
    763761void FemModel::RequestedDependentsx(void){/*{{{*/
    764762
    765 
    766763        bool        isautodiff      = false;
    767764        IssmDouble  output_value;
     
    13861383void FemModel::ThicknessAbsGradientx( IssmDouble* pJ, bool process_units, int weight_index){/*{{{*/
    13871384
    1388 
    13891385        /*Intermediary*/
    13901386        int i;
     
    14141410void FemModel::CostFunctionx(IssmDouble* pJ){/*{{{*/
    14151411
    1416 
    14171412        /*Intermediary*/
    14181413        int      num_responses;
     
    14421437#ifdef  _HAVE_DAKOTA_
    14431438void FemModel::DakotaResponsesx(double* d_responses,char** responses_descriptors,int numresponsedescriptors,int d_numresponses){/*{{{*/
    1444 
    14451439
    14461440        int        i,j;
  • issm/trunk-jpl/src/c/classes/IssmComm.cpp

    r14292 r14822  
    3636
    3737        int my_rank = 0;
    38        
     38
    3939        /*for matlab and python modules*/
    4040        if(!parallel) return my_rank;
  • issm/trunk-jpl/src/c/classes/ToolkitOptions.cpp

    r14688 r14822  
    2525        toolkitoptions= xNew<char>(strlen(options)+1);
    2626        sprintf(toolkitoptions,   "%s",options);
    27 
    2827
    2928}/*}}}*/
  • issm/trunk-jpl/src/c/classes/objects/Bucket.h

    r14787 r14822  
    3131
    3232        public:
    33        
     33
    3434                /*constructors, destructors: */
    3535                Bucket(){ /*{{{*/
     
    3737                } /*}}}*/
    3838                Bucket(int min,int* idxmin,int nin,int* idxnin,doubletype* valuesin,InsMode modein){ /*{{{*/
    39                        
     39
    4040                        this->Initialize();
    4141
     
    5959                Bucket(int min,int* idxmin,doubletype* valuesin,InsMode modein){ /*{{{*/
    6060                        this->Initialize();
    61                        
     61
    6262                        this->type=VECTOR_BUCKET;
    6363                        this->m=min;
     
    6666                                this->idxm=xNew<int>(this->m);
    6767                                xMemCpy(this->idxm,idxmin,this->m);
    68                                
     68
    6969                                this->values=xNew<doubletype>(this->m);
    7070                                xMemCpy(this->values,valuesin,this->m);
     
    7777                } /*}}}*/
    7878                void Initialize(void){ /*{{{*/
    79                        
     79
    8080                        this->type=0;
    8181                        this->m=0;
     
    8787
    8888                } /*}}}*/
    89                
    9089
    9190                /*object virtual functions definitions:*/
     
    130129                        _error_("Not implemented yet (similar to Elements)"); };
    131130                /*}}}*/
    132                
     131
    133132                /*specific routines of Bucket: */
    134133                void SpawnBucketsPerCpu(DataSet* bucketsofcpu_i,int rank_i,int* rowranks){ /*{{{*/
     
    160159                                }
    161160                        }
    162                        
     161
    163162                };
    164163                /*}}}*/
  • issm/trunk-jpl/src/c/classes/objects/Elements/Penta.cpp

    r14807 r14822  
    844844        /*Recover parameters and values*/
    845845        GetInputListOnVertices(&gl[0],GLlevelsetEnum);
    846        
     846
    847847        /*Be sure that values are not zero*/
    848848        if(gl[0]==0) gl[0]=gl[0]+epsilon;
  • issm/trunk-jpl/src/c/classes/objects/Elements/PentaHook.cpp

    r14794 r14822  
    6565        }
    6666
    67 
    6867        this->numanalyses = in_numanalyses;
    6968        this->hnodes      = new Hook*[in_numanalyses];
  • issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp

    r14810 r14822  
    11541154        /*Recover parameters and values*/
    11551155        GetInputListOnVertices(&gl[0],GLlevelsetEnum);
    1156        
     1156
    11571157        /*Be sure that values are not zero*/
    11581158        if(gl[0]==0) gl[0]=gl[0]+epsilon;
     
    24162416  rho_ice=matpar->GetRhoIce();
    24172417  rho_water=matpar->GetRhoFreshwater();
    2418  
     2418
    24192419  /*Get desertification effect parameters*/
    24202420  desfac=matpar->GetDesFac();
     
    31383138        if (!thickness_input)_error_("thickness input needed to compute gia deflection!");
    31393139        thickness_input->GetInputUpToCurrentTimeAverages(&hes,&times,&numtimes,currenttime);
    3140        
     3140
    31413141        /*recover lithosphere thickness: */
    31423142        lithosphere_thickness_input=inputs->GetInput(GiaLithosphereThicknessEnum);
     
    31773177                xi=x[i]; yi=y[i];
    31783178                ri=sqrt(pow(xi-x0,2)+pow(yi-y0,2));
    3179        
     3179
    31803180                /*load ri onto arguments for this vertex i: */
    31813181                arguments.ri=ri;
     
    45264526                }
    45274527        }
    4528 
    45294528
    45304529        gradient->SetValues(NUMVERTICES,vertexpidlist,grade_g,ADD_VAL);
     
    58585857/*FUNCTION Tria::CreateKMatrixHydrologyShreve{{{*/
    58595858ElementMatrix* Tria::CreateKMatrixHydrologyShreve(void){
    5860        
     5859
    58615860        /*Constants*/
    58625861        const int  numdof=NDOF1*NUMVERTICES;
    5863        
     5862
    58645863/*Intermediaries */
    58655864        IssmDouble diffusivity;
     
    58775876        IssmDouble DLprime[2][2]                   ={0.0};
    58785877        GaussTria *gauss=NULL;
    5879        
     5878
    58805879/*Skip if water or ice shelf element*/
    58815880        if(IsOnWater() | IsFloating()) return NULL;
    5882        
     5881
    58835882/*Initialize Element matrix*/
    58845883        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
    5885        
     5884
    58865885/*Create water velocity vx and vy from current inputs*/
    58875886        CreateHydrologyWaterVelocityInput();
    5888        
     5887
    58895888        /*Retrieve all inputs and parameters*/
    58905889        GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
     
    58945893        Input* vy_input=inputs->GetInput(HydrologyWaterVyEnum); _assert_(vy_input);
    58955894        h=sqrt(2*this->GetArea());
    5896        
     5895
    58975896/* Start  looping on the number of gaussian points: */
    58985897        gauss=new GaussTria(2);
    58995898        for(int ig=gauss->begin();ig<gauss->end();ig++){
    5900                
     5899
    59015900                gauss->GaussPoint(ig);
    5902                
     5901
    59035902                GetJacobianDeterminant(&Jdettria, &xyz_list[0][0],gauss);
    59045903                GetL(&L[0], &xyz_list[0][0], gauss,NDOF1);
    5905                
     5904
    59065905                vx_input->GetInputValue(&vx,gauss);
    59075906                vy_input->GetInputValue(&vy,gauss);
    59085907                vx_input->GetInputDerivativeValue(&dvx[0],&xyz_list[0][0],gauss);
    59095908                vy_input->GetInputDerivativeValue(&dvy[0],&xyz_list[0][0],gauss);
    5910                
     5909
    59115910                DL_scalar=gauss->weight*Jdettria;
    5912                
     5911
    59135912                TripleMultiply( &L[0],1,numdof,1,
    59145913                                        &DL_scalar,1,1,0,
    59155914                                        &L[0],1,numdof,0,
    59165915                                        &Ke->values[0],1);
    5917                
     5916
    59185917                GetBPrognostic(&B[0][0], &xyz_list[0][0], gauss);
    59195918                GetBprimePrognostic(&Bprime[0][0], &xyz_list[0][0], gauss);
    5920                
     5919
    59215920                dvxdx=dvx[0];
    59225921                dvydy=dvy[1];
    59235922                DL_scalar=dt*gauss->weight*Jdettria;
    5924                
     5923
    59255924                DL[0][0]=DL_scalar*dvxdx;
    59265925                DL[1][1]=DL_scalar*dvydy;
    59275926                DLprime[0][0]=DL_scalar*vx;
    59285927                DLprime[1][1]=DL_scalar*vy;
    5929                
     5928
    59305929                TripleMultiply( &B[0][0],2,numdof,1,
    59315930                                                                                &DL[0][0],2,2,0,
    59325931                                                                                &B[0][0],2,numdof,0,
    59335932                                                                                &Ke->values[0],1);
    5934                
     5933
    59355934                TripleMultiply( &B[0][0],2,numdof,1,
    59365935                                                                                &DLprime[0][0],2,2,0,
    59375936                                                                                &Bprime[0][0],2,numdof,0,
    59385937                                                                                &Ke->values[0],1);
    5939                
     5938
    59405939                /*Artificial diffusivity*/
    59415940                vel=sqrt(vx*vx+vy*vy);
     
    59485947                KDL[0][1]=DL_scalar*K[0][1];
    59495948                KDL[1][1]=DL_scalar*K[1][1];
    5950                
     5949
    59515950                TripleMultiply( &Bprime[0][0],2,numdof,1,
    59525951                                                                                &KDL[0][0],2,2,0,
     
    59545953                                                                                &Ke->values[0],1);
    59555954        }
    5956        
     5955
    59575956/*Clean up and return*/
    59585957        delete gauss;
     
    60086007                        GetL(&L[0], &xyz_list[0][0], gauss,NDOF1);
    60096008                        D_scalar=sediment_storing*gauss->weight*Jdet;
    6010                        
     6009
    60116010                        TripleMultiply(&L[0],numdof,1,0,
    60126011                                                                                 &D_scalar,1,1,0,
     
    60696068                        GetL(&L[0], &xyz_list[0][0], gauss,NDOF1);
    60706069                        D_scalar=epl_storing*gauss->weight*Jdet;
    6071                        
     6070
    60726071                        TripleMultiply(&L[0],numdof,1,0,
    60736072                                                                                 &D_scalar,1,1,0,
     
    61556154        Input* water_input=inputs->GetInput(BasalforcingsMeltingRateEnum);  _assert_(water_input);
    61566155        Input* old_wh_input=NULL;
    6157        
     6156
    61586157        if(reCast<bool,IssmDouble>(dt)){
    61596158                old_wh_input=inputs->GetInput(SedimentHeadEnum); _assert_(old_wh_input);
    61606159        }
    6161        
     6160
    61626161        /* Start  looping on the number of gaussian points: */
    61636162        gauss=new GaussTria(2);
     
    62126211        Input* water_input=inputs->GetInput(BasalforcingsMeltingRateEnum);  _assert_(water_input);
    62136212        Input* old_wh_input=NULL;
    6214        
     6213
    62156214        if(reCast<bool,IssmDouble>(dt)){
    62166215                old_wh_input=inputs->GetInput(EplHeadEnum); _assert_(old_wh_input);
    62176216        }
    6218        
     6217
    62196218        /* Start  looping on the number of gaussian points: */
    62206219        gauss=new GaussTria(2);
     
    63646363                /*Get the flag to the limitation method*/
    63656364                this->parameters->FindParam(&hmax_flag,HydrologydcSedimentlimitFlagEnum);
    6366                
     6365
    63676366                /*Switch between the different cases*/
    63686367                switch(hmax_flag){
  • issm/trunk-jpl/src/c/classes/objects/Inputs/TransientInput.cpp

    r14809 r14822  
    295295
    296296                if((iscurrenttime_included==false) && (i==(numsteps-1))){
    297                        
     297
    298298                        /*Retrieve interpolated values for current time step: */
    299299                        Input* input=GetTimeInput(currenttime);
  • issm/trunk-jpl/src/c/classes/objects/Inputs/TriaP1Input.cpp

    r14809 r14822  
    192192        outvalues=xNew<IssmDouble>(1);
    193193        times=xNew<IssmDouble>(1);
    194        
     194
    195195        outvalues[0]=1./3.*(values[0]+values[1]+values[2]);
    196196        times[0]=0; /*we don't have a time*/
     
    212212        outvalues=xNew<IssmDouble>(1);
    213213        times=xNew<IssmDouble>(1);
    214        
     214
    215215        outvalues[0]=1./3.*(values[0]+values[1]+values[2]);
    216216        times[0]=currenttime; /*we don't have a time*/
     
    221221}
    222222/*}}}*/
    223 
    224223
    225224/*Intermediary*/
  • issm/trunk-jpl/src/c/classes/objects/Materials/Matpar.cpp

    r14796 r14822  
    6565                iomodel->Constant(&this->water_compressibility,HydrologydcWaterCompressibilityEnum);
    6666                iomodel->Constant(&isefficientlayer,HydrologydcIsefficientlayerEnum);
    67                
    6867
    6968                if(isefficientlayer){
     
    7776                _error_("Hydrology model "<<EnumToStringx(hydrology_model)<<" not supported yet");
    7877        }
    79        
     78
    8079        /*gia: */
    8180        iomodel->Constant(&this->lithosphere_shear_modulus,MaterialsLithosphereShearModulusEnum);
     
    466465/*FUNCTION Matpar::UnitConversion {{{*/                 
    467466void Matpar::UnitConversion(void){               
    468        
     467
    469468        /*convert units of fields that were allocated using the Ext unit system, into the Iu unit system: */
    470469        ::UnitConversion(&this->lithosphere_density,1,ExtToIuEnum,MaterialsLithosphereDensityEnum);
     
    473472}               
    474473/*}}}*/
    475 
  • issm/trunk-jpl/src/c/classes/objects/Materials/Matpar.h

    r14757 r14822  
    3131                IssmDouble  desfac;
    3232                IssmDouble  s0p;
    33                
     33
    3434                /*hydrology Shreve: */   
    3535                IssmDouble  hydro_kn;                   
     
    5757                IssmDouble mantle_viscosity;
    5858                IssmDouble mantle_density;
    59 
    6059
    6160        public:
  • issm/trunk-jpl/src/c/classes/objects/Vertex.cpp

    r14763 r14822  
    214214        IssmDouble xyz[3];
    215215        int        indices[3];
    216        
     216
    217217        if (this->clone==true) return;
    218218
  • issm/trunk-jpl/src/c/classes/toolkits/Matrix.h

    r14792 r14822  
    4242                /*FUNCTION Matrix(int M,int N){{{*/
    4343                Matrix(int M,int N){
    44                        
     44
    4545                        InitCheckAndSetType();
    4646
     
    7474                /*FUNCTION Matrix(int M,int N,IssmDouble sparsity){{{*/
    7575                Matrix(int M,int N,double sparsity){
    76                        
     76
    7777                        InitCheckAndSetType();
    7878
     
    8989                /*FUNCTION Matrix(IssmDouble* serial_mat, int M,int N,IssmDouble sparsity){{{*/
    9090                Matrix(IssmPDouble* serial_mat,int M,int N,IssmPDouble sparsity){
    91                        
     91
    9292                        InitCheckAndSetType();
    9393
     
    105105                /*FUNCTION Matrix(int M,int N,int connectivity,int numberofdofspernode){{{*/
    106106                Matrix(int M,int N,int connectivity,int numberofdofspernode){
    107                        
     107
    108108                        InitCheckAndSetType();
    109109
     
    157157                        }
    158158                        else _error_("unknow toolkit type ");
    159                        
     159
    160160                        /*Free ressources: */
    161161                        xDelete<char>(toolkittype);
  • issm/trunk-jpl/src/c/classes/toolkits/Solver.h

    r14797 r14822  
    4848                }
    4949                /*}}}*/
    50                
     50
    5151                /*Methods: */
    5252                Vector<doubletype>* Solve(void){ /*{{{*/
  • issm/trunk-jpl/src/c/classes/toolkits/Vector.h

    r14792 r14822  
    3939                /*}}}*/
    4040                Vector(int M,bool fromlocalsize=false){ /*{{{*/
    41                        
     41
    4242                        InitCheckAndSetType();
    4343
     
    6464                /*}}}*/
    6565                Vector(doubletype* serial_vec,int M){ /*{{{*/
    66                        
     66
    6767                        InitCheckAndSetType();
    6868
     
    120120                        }
    121121                        else _error_("unknow toolkit type ");
    122                        
     122
    123123                        /*Free ressources: */
    124124                        xDelete<char>(toolkittype);
     
    201201                bool IsEmpty(void){
    202202                        int M;
    203                        
     203
    204204                        _assert_(this);
    205205                        this->GetSize(&M);
     
    227227
    228228                        Vector<doubletype>* output=NULL;
    229                                
     229
    230230                        output=new Vector<doubletype>();
    231231
     
    280280
    281281                        doubletype* vec_serial=NULL;
    282                        
     282
    283283                        _assert_(this);
    284284                        if(type==PetscVecType){
  • issm/trunk-jpl/src/c/modules/ConstraintsStatex/ConstraintsStatex.cpp

    r14704 r14822  
    2828        /*Do we have penalties linked to rifts? In this case, run our special rifts penalty
    2929         * management routine, otherwise, skip : */
    30        
     30
    3131        /*No constraints management by default!:*/
    3232        num_unstable_constraints=0;
  • issm/trunk-jpl/src/c/modules/CreateNodalConstraintsx/CreateNodalConstraintsx.cpp

    r14791 r14822  
    2424        ssize=nodes->NumberOfDofs(configuration_type,SsetEnum);
    2525        slocalsize = nodes->NumberOfDofsLocal(configuration_type,SsetEnum);
    26        
    2726
    2827        /*allocate:*/
  • issm/trunk-jpl/src/c/modules/EdgeDetectionx/EdgeDetectionx.cpp

    r14718 r14822  
    1818
    1919        _assert_(contours);
    20        
     20
    2121        /*output: */
    2222        Contour<IssmPDouble>* contour=NULL;
     
    3535        /*Add contour to our dataset of contours: */
    3636        contours->AddObject(contour);
    37        
     37
    3838}
  • issm/trunk-jpl/src/c/modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp

    r14789 r14822  
    2020        /*output: */
    2121        Vector<IssmDouble>* solution=NULL;
    22        
     22
    2323        if(VerboseModule()) _pprintLine_("   Get solution from inputs");
    2424
  • issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp

    r14814 r14822  
    2121        double pset[7];
    2222};
    23      
     23
    2424struct blockt{
    2525        double time[Ntimp];
     
    3636        double zhload[Ntime];
    3737};
    38      
     38
    3939struct blockn{
    4040        int irate;
     
    6464
    6565/*}}}*/
    66      
     66
    6767void GiaDeflectionCorex( IssmDouble* pwi, IssmDouble* pdwidt, GiaDeflectionCoreArgs* arguments){
    6868
     
    7070        IssmDouble wi=0;
    7171        IssmDouble dwidt=0;
    72        
     72
    7373        /*inputs: {{{*/
    7474        /*constant: */
     
    104104
    105105/*}}}*/
    106      
     106
    107107        /*Recover material parameters and loading history: see GiaDeflectionCoreArgs for more details {{{*/
    108108        ri=arguments->ri;
     
    140140        blockp_.pset[6]=re;
    141141        blocko_.rhoi=rho_ice;
    142      
     142
    143143        /*loading history: */
    144144        blocky_.zhload[0]=hes[1];
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp

    r14808 r14822  
    139139        parameters->AddObject(new IntParam(AnalysisTypeEnum,analysis_type));
    140140        parameters->AddObject(new IntParam(AnalysisCounterEnum,analysis_counter));
    141                        
     141
    142142        iomodel->Constant(&time,TimesteppingStartTimeEnum);
    143143        parameters->AddObject(new DoubleParam(TimeEnum,time));  //start at time 0 by default for all solutions FIXME: to be deleted
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp

    r14529 r14822  
    9393        elements->InputDuplicate(VxEnum,InversionVxObsEnum);
    9494        if(dakota_analysis)elements->InputDuplicate(VxEnum,QmuVxEnum);
    95        
     95
    9696        #ifdef _HAVE_ANDROID_
    9797        elements->InputDuplicate(FrictionCoefficientEnum,AndroidFrictionCoefficientEnum);
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/Gia/CreateNodesGia.cpp

    r14588 r14822  
    4444                }
    4545        }
    46        
     46
    4747        /*Clean fetched data: */
    4848        iomodel->DeleteData(1,MaskVertexonwaterEnum);
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/HydrologyDCEfficient/CreateParametersHydrologyDCEfficient.cpp

    r14769 r14822  
    3737        }
    3838
    39 
    4039        /*Nothing for now*/
    4140
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/HydrologyDCInefficient/CreateParametersHydrologyDCInefficient.cpp

    r14796 r14822  
    3434        iomodel->FetchData(&isefficientlayer,HydrologydcIsefficientlayerEnum);
    3535        iomodel->FetchData(&sedimentlimit_flag,HydrologydcSedimentlimitFlagEnum);
    36        
     36
    3737        if(sedimentlimit_flag==1){
    3838                iomodel->FetchData(&sedimentlimit,HydrologydcSedimentlimitEnum);
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp

    r14585 r14822  
    4444
    4545        SetVerbosityLevel(verbose);
    46                
     46
    4747        if(VerboseMProcessor()) _pprintLine_("   starting model processor ");
    4848
  • issm/trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp

    r14788 r14822  
    1616        IssmDouble *ug_serial = NULL;
    1717        bool        oldalloc  = false;
    18        
     18
    1919        if(VerboseModule()) _pprintLine_("   Reduce vector from g to f set");
    2020
  • issm/trunk-jpl/src/c/modules/Solverx/Solverx.cpp

    r14793 r14822  
    1616        /*intermediary: */
    1717        Solver<IssmDouble> *solver=NULL;
    18        
     18
    1919        /*output: */
    2020        Vector<IssmDouble> *uf=NULL;
  • issm/trunk-jpl/src/c/shared/Numerics/ToolkitsOptionsFromAnalysis.cpp

    r14633 r14822  
    1919
    2020        char* options=NULL;
    21        
     21
    2222        /*Recover first the options string for this analysis: */
    2323        options=OptionsFromAnalysis(parameters,analysis_type);
     
    4545
    4646        #endif
    47                
     47
    4848        xDelete<char>(options);
    4949}
  • issm/trunk-jpl/src/c/solutions/EnvironmentFinalize.cpp

    r13797 r14822  
    1717        /*Make sure we are all here*/
    1818        MPI_Barrier(MPI_COMM_WORLD);
    19        
     19
    2020        /*Print closing statement*/
    2121        int my_rank;
  • issm/trunk-jpl/src/c/solutions/convergence.cpp

    r14664 r14822  
    3030        IssmDouble eps_abs;
    3131        IssmDouble yts;
    32        
     32
    3333        if(VerboseModule()) _pprintLine_("   checking convergence");
    3434
  • issm/trunk-jpl/src/c/solutions/gia_core.cpp

    r14807 r14822  
    1212
    1313void gia_core(FemModel* femmodel){
    14        
     14
    1515        int i;
    1616        Vector<IssmDouble>*  wg  = NULL;
     
    2727        femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
    2828        femmodel->parameters->FindParam(&configuration_type,ConfigurationTypeEnum);
    29        
     29
    3030        if(VerboseSolution()) _pprintLine_("   computing GIA");
    3131
  • issm/trunk-jpl/src/c/solutions/hydrology_core.cpp

    r14769 r14822  
    2424        IssmDouble starttime,final_time;
    2525        IssmDouble time,dt;
    26        
     26
    2727        /*first recover parameters common to all solutions*/
    2828        femmodel->parameters->FindParam(&starttime,TimesteppingStartTimeEnum);
     
    9292                }
    9393
    94 
    9594        }
    9695}
  • issm/trunk-jpl/src/c/toolkits/issm/IssmAbsMat.h

    r14671 r14822  
    3838
    3939        public:
    40        
     40
    4141                /*IssmAbsMat constructors, destructors*/
    4242                virtual ~IssmAbsMat(){};
  • issm/trunk-jpl/src/c/toolkits/issm/IssmAbsVec.h

    r14671 r14822  
    3737
    3838        public:
    39                
     39
    4040                /*IssmAbsVec constructors, destructors*/
    4141                ~IssmAbsVec(){/*{{{*/
  • issm/trunk-jpl/src/c/toolkits/issm/IssmMat.h

    r14684 r14822  
    3838class IssmMat{
    3939
    40 
    4140        public:
    42        
     41
    4342                IssmAbsMat<doubletype>* matrix; /*abstract matrix, which implements object orientation*/
    4443
     
    6463                /*}}}*/
    6564                IssmMat(int M,int N){ /*{{{*/
    66                
     65
    6766                        switch(IssmMatTypeFromToolkitOptions()){
    6867
     
    141140                /*}}}*/
    142141                IssmMat(int M,int N, int connectivity, int numberofdofspernode){ /*{{{*/
    143                        
     142
    144143                        switch(IssmMatTypeFromToolkitOptions()){
    145144
     
    203202};
    204203
    205 
    206204#endif //#ifndef _ISSMMAT_H_
  • issm/trunk-jpl/src/c/toolkits/issm/IssmMpiDenseMat.h

    r14792 r14822  
    7676                /*FUNCTION IssmMpiDenseMat(doubletype* serial_mat,int M,int N,doubletype sparsity){{{*/
    7777                IssmMpiDenseMat(doubletype* serial_mat,int Min,int Nin,doubletype sparsity){
    78                        
     78
    7979                        /*Here, we assume that the serial_mat is local to the local cpu, and that it has
    8080                         * the correct size (m rows by N colums), n determined by DetermineLocalSize: */
     
    110110
    111111                        this->buckets=new DataSet();
    112                        
     112
    113113                        this->M=Min;
    114114                        this->N=Nin;
    115                        
     115
    116116                        /*Figure out local number of rows: */
    117117                        this->m=DetermineLocalSize(this->M,IssmComm::GetComm());
    118                        
     118
    119119                        /*Initialize pointer: */
    120120                        this->matrix=NULL;
     
    152152                void Assemble(){
    153153
    154 
    155154                        int           i;
    156155                        int           j;
     
    173172                        int           size;
    174173
    175 
    176 
    177174                        /*some communicator info: */
    178175                        num_procs=IssmComm::GetSize();
     
    218215                                        for(j=0;j<num_procs;j++){
    219216                                                if(j!=i){//only send the buckets that this cpu does not own.
    220                                                
     217
    221218                                                        /*Go through the buckets belonging to cpu j, and send them accordingly. */
    222219                                                        DataSet* buckets=bucketspercpu[j];
     
    230227                                }
    231228                                else{
    232                                                        
     229
    233230                                        /*Receive buckets from cpu i, and add them to my own my_rank bucket list: */
    234231                                        /*First, are we receiving anything from sender_rank? :*/
     
    272269                /*FUNCTION Norm{{{*/
    273270                doubletype Norm(NormMode mode){
    274                        
    275                        
     271
    276272                        doubletype norm,local_norm;
    277273                        doubletype absolute;
     
    313309                void MatMult(IssmAbsVec<doubletype>* Xin,IssmAbsVec<doubletype>* AXin){
    314310
    315 
    316311                        int         i,j;
    317312                        doubletype *X_serial  = NULL;
    318 
    319313
    320314                        /*A check on the types: */
     
    371365                /*}}}*/         
    372366};
    373                                                        
    374367
    375368#endif //#ifndef _ISSM_MPI_DENSE_MAT_H_
  • issm/trunk-jpl/src/c/toolkits/issm/IssmMpiVec.h

    r14792 r14822  
    8080
    8181                        this->buckets=new DataSet();
    82                        
     82
    8383                        if(fromlocalsize){
    8484                                this->m=Min;
     
    8989                                this->m=DetermineLocalSize(this->M,IssmComm::GetComm());
    9090                        }
    91                        
     91
    9292                        /*Initialize pointer: */
    9393                        this->vector=NULL;
     
    109109                /*FUNCTION Echo{{{*/
    110110                void Echo(void){
    111                        
     111
    112112                        int i,j;
    113113
     
    126126                /*FUNCTION Assemble{{{*/
    127127                void Assemble(){
    128 
    129128
    130129                        int           i;
     
    148147                        int           size;
    149148
    150 
    151 
    152149                        /*some communicator info: */
    153150                        num_procs=IssmComm::GetSize();
     
    193190                                        for(j=0;j<num_procs;j++){
    194191                                                if(j!=i){//only send the buckets that this cpu does not own.
    195                                                
     192
    196193                                                        /*Go through the buckets belonging to cpu j, and send them accordingly. */
    197194                                                        DataSet* buckets=bucketspercpu[j];
     
    205202                                }
    206203                                else{
    207                                                        
     204
    208205                                        /*Receive buckets from cpu i, and add them to my own my_rank bucket list: */
    209206                                        /*First, are we receiving anything from sender_rank? :*/
     
    247244                /*FUNCTION SetValues{{{*/
    248245                void SetValues(int ssize, int* list, doubletype* values, InsMode mode){
    249                        
     246
    250247                        /*we need to store all the values we collect here in order to Assemble later.
    251248                         * Indeed, the values we are collecting here most of the time will not belong
     
    304301                /*FUNCTION AXPY{{{*/
    305302                void AXPY(IssmAbsVec<doubletype>* Xin, doubletype a){
    306                                
     303
    307304                        int i;
    308305
     
    314311                        /*y=a*x+y where this->vector is y*/
    315312                        for(i=0;i<this->m;i++)this->vector[i]=a*X->vector[i]+this->vector[i];
    316 
    317313
    318314                }
     
    343339                        int* recvcounts=NULL;
    344340                        int* displs=NULL;
    345                        
     341
    346342                        /*output: */
    347343                        doubletype* buffer=NULL;
     
    358354                        /*recvcounts:*/
    359355                        MPI_Allgather(&this->m,1,MPI_INT,recvcounts,1,MPI_INT,comm);
    360                        
     356
    361357                        /*get lower_row: */
    362358                        GetOwnershipBoundariesFromRange(&lower_row,&upper_row,this->m,comm);
     
    394390                /*FUNCTION Norm{{{*/
    395391                doubletype Norm(NormMode mode){
    396                
     392
    397393                        doubletype local_norm;
    398394                        doubletype norm;
     
    453449
    454450                        int i;
    455                        
     451
    456452                        /*Assume xin and yin are of the correct type, and downcast: */
    457453                        IssmMpiVec* x=NULL;
     
    461457                        y=(IssmMpiVec<doubletype>*)yin;
    462458
    463 
    464459                        /*pointwise w=x/y where this->vector is w: */
    465460                        for(i=0;i<this->m;i++)this->vector[i]=x->vector[i]/y->vector[i];
  • issm/trunk-jpl/src/c/toolkits/issm/IssmSeqVec.h

    r14671 r14822  
    55 * and the contructors required by IssmVec (see IssmVec.h)
    66 */
    7 
    87
    98#ifndef _ISSM_SEQ_VEC_H_
     
    182181
    183182                        int i;
    184                        
     183
    185184                        /*Assume X is of the correct type, and downcast: */
    186185                        IssmSeqVec* X=NULL;
    187186
    188187                        X=(IssmSeqVec<doubletype>*)Xin;
    189 
    190188
    191189                        /*y=a*x+y where this->vector is y*/
     
    278276                        input=(IssmSeqVec<doubletype>*)inputin;
    279277
    280 
    281278                        doubletype dot=0;
    282279                        for(i=0;i<this->M;i++)dot+=this->vector[i]*input->vector[i];
     
    289286
    290287                        int i;
    291                        
     288
    292289                        /*Assume xin and yin are of the correct type, and downcast: */
    293290                        IssmSeqVec* x=NULL;
     
    297294                        y=(IssmSeqVec<doubletype>*)yin;
    298295
    299 
    300296                        /*pointwise w=x/y where this->vector is w: */
    301297                        for(i=0;i<this->M;i++)this->vector[i]=x->vector[i]/y->vector[i];
  • issm/trunk-jpl/src/c/toolkits/issm/IssmToolkitUtils.cpp

    r14688 r14822  
    2424/*Routines: */
    2525int IssmMatTypeFromToolkitOptions(void){ /*{{{*/
    26                                        
     26
    2727        char *mat_type      = NULL;
    2828        int   mat_type_enum;
     
    3333        num_procs=IssmComm::GetSize();
    3434        if(num_procs>1)isparallel=true;
    35        
     35
    3636        /*retrieve matrix type as a string, from the Toolkits Options database, similar to what Petsc does. Actually,
    3737         *we try and stick with the Petsc matrix types: */
     
    4343        }
    4444        else _error_("matrix type not supported yet!");
    45        
     45
    4646        /*free ressources: */
    4747        xDelete<char>(mat_type);
    48        
     48
    4949        /*return: */
    5050        return mat_type_enum;
    5151} /*}}}*/
    5252int IssmVecTypeFromToolkitOptions(void){ /*{{{*/
    53                                        
     53
    5454        char* vec_type=NULL;
    5555        int   vec_type_enum;
     
    6060        num_procs=IssmComm::GetSize();
    6161        if(num_procs>1)isparallel=true;
    62        
     62
    6363        /*retrieve vector type as a string, from the Toolkits Options database, similar to what Petsc does. Actually,
    6464         *we try and stick with the Petsc vector types: */
     
    7070        }
    7171        else _error_("vector type not supported yet!");
    72        
     72
    7373        /*free ressources: */
    7474        xDelete<char>(vec_type);
    75        
     75
    7676        /*return: */
    7777        return vec_type_enum;
  • issm/trunk-jpl/src/c/toolkits/issm/IssmVec.h

    r14685 r14822  
    3737
    3838        public:
    39                
     39
    4040                IssmAbsVec<doubletype>* vector; /*abstract vector, which implements object orientation*/
    4141
     
    6161                /*}}}*/
    6262                IssmVec(int M){/*{{{*/
    63                        
     63
    6464                        switch(IssmVecTypeFromToolkitOptions()){
    6565
     
    8080                /*}}}*/
    8181                IssmVec(int m,int M){/*{{{*/
    82                        
     82
    8383                        switch(IssmVecTypeFromToolkitOptions()){
    8484
     
    9999                /*}}}*/
    100100                IssmVec(int M,bool fromlocalsize){/*{{{*/
    101                        
     101
    102102                        switch(IssmVecTypeFromToolkitOptions()){
    103103
     
    118118                /*}}}*/
    119119                IssmVec(doubletype* buffer,int M){/*{{{*/
    120                        
     120
    121121                        switch(IssmVecTypeFromToolkitOptions()){
    122122
     
    170170                /*}}}*/
    171171                IssmVec<doubletype>* Duplicate(void){/*{{{*/
    172                        
     172
    173173                        IssmVec<doubletype>* issmvector=NULL;
    174174
  • issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscSolver.cpp

    r14792 r14822  
    22 * \brief Petsc implementation of solver
    33 */
    4 
    54
    65#ifdef HAVE_CONFIG_H
Note: See TracChangeset for help on using the changeset viewer.