Changeset 23212


Ignore:
Timestamp:
09/04/18 09:12:43 (7 years ago)
Author:
Mathieu Morlighem
Message:

CHG: make sure code compile with PETSc 3.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequence_schurcg.cpp

    r23205 r23212  
    8989        /* Create KSP context */
    9090        KSPCreate(IssmComm::GetComm(),&kspu);
     91        #if (_PETSC_MAJOR_==3) && (_PETSC_MINOR_>=5)
    9192        KSPSetOperators(kspu,A,A);
     93        #else
     94        KSPSetOperators(kspu,A,A,DIFFERENT_NONZERO_PATTERN);
     95        #endif
    9296        KSPSetType(kspu,KSPCG);
    9397        KSPSetInitialGuessNonzero(kspu,PETSC_TRUE);
     
    120124        /* Create KSP context */
    121125        KSPCreate(IssmComm::GetComm(),&kspp);
     126        #if (_PETSC_MAJOR_==3) && (_PETSC_MINOR_>=5)
    122127        KSPSetOperators(kspp,IP,IP);
     128        #else
     129        KSPSetOperators(kspp,IP,IP,DIFFERENT_NONZERO_PATTERN);
     130        #endif
    123131       
    124132        /* Create RHS */
Note: See TracChangeset for help on using the changeset viewer.