# PetscMapCreate

Creates an empty map object. The type can then be set with PetscMapSetType().

### Synopsis

    #include "petscvec.h"
    PetscErrorCode PETSCVEC_DLLEXPORT PetscMapCreate(MPI_Comm comm, PetscMap *map)

Collective on MPI_Comm

### Input Parameter

comm -The MPI communicator for the map object

### Output Parameter

map -The map object

### Keywords

PetscMap, create

### C++ variants

| PetscMap PetscMapCreate(void) |  | -> |  | PetscMapCreate(PETSC_COMM_SELF,&m); return m;
| PetscMapCreate(PetscMap*m) |  | -> |  | PetscMapCreate(m)

### See Also

PetscMapDestroy(), PetscMapGetLocalSize(), PetscMapGetSize(), PetscMapGetGlobalRange(), PetscMapGetLocalRange()

Level:beginner
Location:src/vec/interface/mapcreate.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/vec/examples/tutorials/ex17.c.html