Changeset 23217


Ignore:
Timestamp:
09/05/18 08:39:08 (7 years ago)
Author:
wester
Message:

CHG: Added SchurCG compatibility to control_core.cpp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/cores/control_core.cpp

    r22480 r23217  
    143143        /*Update control input*/
    144144        SetControlInputsFromVectorx(femmodel,X);
    145 
     145       
     146       
    146147        /*solve forward: */
    147148        switch(solution_type){
     
    152153                case StressbalanceSolutionEnum:
    153154                        femmodel->SetCurrentConfiguration(StressbalanceAnalysisEnum);
    154                         solutionsequence_nonlinear(femmodel,conserve_loads);
    155                         break;
     155                       
     156                        bool is_schur_cg_solver = false;
     157                        #ifdef _HAVE_PETSC_
     158                        int solver_type;
     159                        PetscOptionsDetermineSolverType(&solver_type);
     160                        if(solver_type==FSSolverEnum) is_schur_cg_solver = true;
     161                        #endif
     162                       
     163                        if(is_schur_cg_solver){
     164                         solutionsequence_schurcg(femmodel);
     165                        }else{
     166                         solutionsequence_nonlinear(femmodel,conserve_loads);
     167                        }
     168                         break;
    156169                case BalancethicknessSolutionEnum:
    157170                        femmodel->SetCurrentConfiguration(BalancethicknessAnalysisEnum);
Note: See TracChangeset for help on using the changeset viewer.