# PetscMapInitialize

given a map where you have set either the global or local size sets up the map so that it may be used.

### Synopsis

    #include "petscvec.h"
    #undef __FUNCT__
    #define __FUNCT__ "PetscMapInitialize"
    PetscErrorCode PETSCVEC_DLLEXPORT PetscMapInitialize(MPI_Comm comm,PetscMap *map)

Collective on MPI_Comm

### Input Parameters

| comm | - the MPI communicator
| map | - pointer to the map

Notes: Typical calling sequence PetscMapInitialize(MPI_Comm,PetscMap *); PetscMapSetBlockSize(PetscMap*,1); PetscMapSetSize(PetscMap*,n) or PetscMapSetLocalSize(PetscMap*,N); PetscMapInitialize(PetscMap*); PetscMapGetSize(PetscMap*,PetscInt *);

Unlike regular PETSc objects you work with a pointer to the object instead of the object directly.

### Fortran Notes

Not available from Fortran

### See Also

PetscMapSetLocalSize(), PetscMapSetSize(), PetscMapGetSize(), PetscMapGetLocalSize(), PetscMap,
PetscMapGetLocalRange(), PetscMapGetGlobalRange(), PetscMapSetBlockSize(), PetscMapGetBlockSize(), PetscMapSetUp()

Level:intermediate
Location:src/vec/vec/impls/mpi/pmap.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages