source: issm/oecreview/Archive/12678-13393/ISSM-12851-12852.diff@ 13394

Last change on this file since 13394 was 13394, checked in by Mathieu Morlighem, 13 years ago

Added 12678-13393

File size: 1.1 KB
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/alloc_module.cpp

     
    2121        if (pv && *pv){
    2222                /*Actually, still get rid of internal Petsc matrix. Quick fix until Matlab handles C++
    2323                 * correctly: */
    24                 /*Keeping this for legacy reasons: */
    25                 /*#ifdef _HAVE_PETSC_
    26                         MatFree(&(*pv)->matrix);
    27                 #endif*/
    28                 delete *pv;
     24                #ifdef _HAVE_PETSC_
     25                        MatFree(&(*pv)->pmatrix->matrix);
     26                #endif
    2927                *pv=NULL;
    3028        }
    3129}
     
    3533        if (pv && *pv){
    3634                /*Actually, still get rid of internal Petsc vector. Quick fix until Matlab handles C++
    3735                 * correctly: */
    38                 /*Keeping this for legacy reasons: shoudl be done by the vector itself!*/
    39                 /*#ifdef _HAVE_PETSC_
    40                         VecFree(&(*pv)->vector);
    41                 #endif*/
    42                 delete *pv;
     36                #ifdef _HAVE_PETSC_
     37                        VecFree(&(*pv)->pvector->vector);
     38                #endif
    4339                *pv=NULL;
    4440        }
    4541}
Note: See TracBrowser for help on using the repository browser.