Changeset 6020


Ignore:
Timestamp:
09/24/10 10:37:02 (15 years ago)
Author:
Eric.Larour
Message:

Fixed bug with Double instead of DoubleVec Param being load for the analyses.
Some other quick fixes.

Location:
issm/trunk/src/c
Files:
3 edited

Legend:

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

    r6014 r6020  
    3030        int        solver_type;
    3131        bool       fromlocalsize    = true;
     32        int        verbose;
    3233
    3334
    3435        /*Display message*/
    35         int verbose; parameters->FindParam(&verbose,VerboseEnum);
    36         if (verbose) _printf_("   Solving\n");
     36        parameters->FindParam(&verbose,VerboseEnum); if (verbose) _printf_("   Solving\n");
     37        if(verbose)PetscOptionsPrint(stdout);
    3738
    3839        /*First, check that f-set is not NULL, ie model is fully constrained: */
     
    4041                *puf=NULL; return;
    4142        }
     43       
    4244
    4345        /*If initial guess for solution exists, use it to create uf, otherwise,
     
    8082        #endif
    8183        #endif
     84               
    8285
    8386        /*Prepare solver*/
     
    104107                }
    105108        }
     109       
     110        if(verbose)KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD);
    106111
    107112        /*Solve: */
  • issm/trunk/src/c/objects/FemModel.cpp

    r6014 r6020  
    164164        PetscOptionsFromAnalysis(this->parameters,analysis_type);
    165165
    166         verbose=1;
    167166        if(verbose){
    168                 _printf_("Petsc Options set for analysis type: %s\n",EnumToString(analysis_type));
    169                 PetscOptionsPrint(stdout);
     167                _printf_("   Petsc Options set for analysis type: %s\n",EnumToString(analysis_type));
    170168        }
    171169
  • issm/trunk/src/c/shared/Numerics/PetscOptionsFromAnalysis.cpp

    r6014 r6020  
    2525        numanalyses=0;
    2626        parameters->FindParam(&strings,&numanalyses,PetscOptionsStringsEnum);
     27
     28        #ifdef _SERIAL_ //do not take this away, because ISSM loads analyses as a Double Param instead of a DoubleVec Param  when running with only 1 analysis
     29        if(numanalyses==1){ analyses=(double*)xmalloc(1*sizeof(double)); parameters->FindParam(analyses,PetscOptionsAnalysesEnum);
     30        }
     31        else parameters->FindParam(&analyses,&dummy,PetscOptionsAnalysesEnum);
     32        #else
    2733        parameters->FindParam(&analyses,&dummy,PetscOptionsAnalysesEnum);
     34        #endif
    2835
    2936        if(numanalyses==0)return; //we did not find petsc options, don't bother.
Note: See TracChangeset for help on using the changeset viewer.