Changeset 11160


Ignore:
Timestamp:
01/19/12 14:55:37 (13 years ago)
Author:
habbalf
Message:

Updated English

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/modules/Solverx/Solverx.cpp

    r9830 r11160  
    1616void    Solverx(Vec* puf, Mat Kff, Vec pf, Vec uf0,Vec df, Parameters* parameters){
    1717
    18         /*output: */
     18        /*Output: */
    1919        Vec        uf               = NULL;
    2020
    21         /*intermediary: */
     21        /*Intermediary: */
    2222        int        local_m,local_n,global_m,global_n;
    2323        int        analysis_type;
     
    3535        #endif
    3636
    37         /*stokes: */
     37        /*Stokes: */
    3838        IS         isv=NULL;
    3939        IS         isp=NULL;
     
    5252        #endif
    5353
    54         /*First, check that f-set is not NULL, ie model is fully constrained: {{{*/
     54        /*First, check that f-set is not NULL, i.e. model is fully constrained: {{{*/
    5555        _assert_(Kff);
    5656        MatGetSize(Kff,&global_m,&global_n); _assert_(global_m==global_m);
     
    6060        /*}}}*/
    6161        /*Initial guess logic here: {{{1*/
    62         /*Now, check that we are not getting an initial guess to the solver, if we are running a direct solver: */
     62        /*Now, check that we are not giving an initial guess to the solver, if we are running a direct solver: */
    6363        #if _PETSC_MAJOR_ >= 3
    6464        PetscOptionsGetString(PETSC_NULL,"-ksp_type",ksp_type,49,&flg);
     
    6666        #endif
    6767
    68         /*If initial guess for solution exists, use it to create uf, otherwise,
    69          * duplicate right hand side so that solution vector has same structure*/
     68        /*If initial guess for the solution exists, use it to create uf, otherwise,
     69         * duplicate the right hand side so that the solution vector has the same structure*/
    7070        if(uf0){
    7171                VecDuplicate(uf0,&uf); VecCopy(uf0,uf);
     
    7575        }
    7676        /*}}}*/
    77         /*Process petsc options to see if we are not using special types of external solvers: {{{1*/
     77        /*Process petsc options to see if we are using special types of external solvers: {{{1*/
    7878        PetscOptionsDetermineSolverType(&solver_type);
    7979
    80         /*In serial mode, matrices have been loaded at MPIAIJ or AIJ matrices.
     80        /*In serial mode, the matrices have been loaded as MPIAIJ or AIJ matrices.
    8181         We need to convert them if we are going to run the solvers successfully: */
    8282        #ifdef _SERIAL_
     
    114114
    115115        #if defined(_SERIAL_) && _PETSC_VERSION_==3
    116         /*specific solver?: */
     116        /*Specific solver?: */
    117117        KSPGetPC(ksp,&pc);
    118118        if (solver_type==MUMPSPACKAGE_LU){
     
    137137
    138138        /*}}}*/
    139         /*If initial guess for solution, use it, except if we are using the MUMPS direct solver, where any initial guess will crash Petsc: {{{1*/
     139        /*If there is an initial guess for the solution, use it, except if we are using the MUMPS direct solver, where any initial guess will crash Petsc: {{{1*/
    140140        if (uf0){
    141                 if( (solver_type!=MUMPSPACKAGE_LU) && (solver_type!=MUMPSPACKAGE_CHOL) && (solver_type!=SPOOLESPACKAGE_LU)&& (solver_type!=SPOOLESPACKAGE_CHOL)&& (solver_type!=SUPERLUDISTPACKAGE)){
     141                if( (solver_type!=MUMPSPACKAGE_LU) && (solver_type!=MUMPSPACKAGE_CHOL) && (solver_type!=SPOOLESPACKAGE_LU) && (solver_type!=SPOOLESPACKAGE_CHOL) && (solver_type!=SUPERLUDISTPACKAGE)){
    142142                        KSPSetInitialGuessNonzero(ksp,PETSC_TRUE);
    143143                }
     
    154154        if (iteration_number<0) _error_("%s%i"," Solver diverged at iteration number: ",-iteration_number);
    155155
    156         /*Free ressources:*/
     156        /*Free resources:*/
    157157        KSPFree(&ksp);
    158158               
Note: See TracChangeset for help on using the changeset viewer.