Changeset 5471


Ignore:
Timestamp:
08/23/10 00:23:27 (15 years ago)
Author:
Eric.Larour
Message:

issm: control_core now an official solution core.
control_core: reset parameters to where they were before, for use in qmu.

Location:
issm/trunk/src/c/solutions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/solutions/control_core.cpp

    r5462 r5471  
    114114
    115115        _printf_("%s\n","      preparing final solution");
    116         femmodel->parameters->SetParam(false,ControlAnalysisEnum);
     116        femmodel->parameters->SetParam(false,ControlAnalysisEnum); //needed to turn control result output in solutioncore
    117117        solutioncore(femmodel);
    118118
     
    130130        xfree((void**)&cm_jump);
    131131        xfree((void**)&J);
     132       
     133        /*control_core might be used in Qmu, so leave everything similar to where it started: */
     134        femmodel->parameters->SetParam(true,ControlAnalysisEnum);
    132135}
  • issm/trunk/src/c/solutions/issm.cpp

    r5103 r5471  
    7979        MPI_Barrier(MPI_COMM_WORLD); finish_init=MPI_Wtime();
    8080
     81        /*if control is being run on top of a solution, change core: */
     82        if(control_analysis)solutioncore=&control_core;
     83
    8184        /*are we running the solution sequence, or a qmu wrapper around it? : */
    8285        if(!qmu_analysis){
    83                 if(!control_analysis){
    8486                       
    85                         _printf_("call computational core:\n");
    86                         MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
    87                         solutioncore(femmodel);
    88                         MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
    89 
    90                 }
    91                 else{
    92                         /*run control analysis: */
    93                         _printf_("call computational core:\n");
    94                         MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
    95                         control_core(femmodel);
    96                         MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
    97 
    98                 }
     87                _printf_("call computational core:\n");
     88                MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
     89                solutioncore(femmodel);
     90                MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
    9991
    10092                _printf_("write results to disk:\n");
Note: See TracChangeset for help on using the changeset viewer.