Ignore:
Timestamp:
04/16/12 14:57:18 (13 years ago)
Author:
Mathieu Morlighem
Message:

merged trunk-jpl and trunk for revision 11994M

Location:
issm/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk

  • issm/trunk/src/c/toolkits/petsc/patches/MatPartition.cpp

    r11237 r11995  
    1515
    1616#include "../../../shared/shared.h"
     17#include "../../mpi/patches/mpipatches.h"
    1718
    1819int MatPartition(Mat* poutmatrix,Mat matrixA,double* row_partition_vector,int row_partition_vector_size ,
     
    4748                        d_nz=0;
    4849                        o_nz=0;
     50                        #ifdef _HAVE_PETSCDEV_
     51                        MatCreateAIJ(MPI_COMM_WORLD,PETSC_DETERMINE,PETSC_DETERMINE, 0,0,d_nz,PETSC_NULL,o_nz,PETSC_NULL,&outmatrix);
     52                        #else
    4953                        MatCreateMPIAIJ(MPI_COMM_WORLD,PETSC_DETERMINE,PETSC_DETERMINE, 0,0,d_nz,PETSC_NULL,o_nz,PETSC_NULL,&outmatrix);
     54                        #endif
    5055                }
    5156                else if (strcmp(type,"mpidense")==0){
     57                        #ifdef _HAVE_PETSCDEV_
     58                        MatCreateDense(MPI_COMM_WORLD,PETSC_DETERMINE,PETSC_DETERMINE, 0,0,PETSC_NULL,&outmatrix);
     59                        #else
    5260                        MatCreateMPIDense(MPI_COMM_WORLD,PETSC_DETERMINE,PETSC_DETERMINE, 0,0,PETSC_NULL,&outmatrix);
     61                        #endif
     62                }
     63                else{
     64                        _error_("MatType %s not supported yet",type);
    5365                }
    5466                /*Assemble*/
     
    97109
    98110                /*Call MatGetSubMatrix*/
    99                 csize=PetscDetermineLocalSize(col_partition_vector_size);
     111                csize=DetermineLocalSize(col_partition_vector_size);
    100112                if(col_partition_vector_size==row_partition_vector_size){
    101113                        #if _PETSC_MAJOR_ >= 3
Note: See TracChangeset for help on using the changeset viewer.