| /petsc/src/vec/is/utils/ |
| H A D | pmap.c | 2 This file contains routines for basic map object implementation. 16 . map - the new `PetscLayout` 50 PetscErrorCode PetscLayoutCreate(MPI_Comm comm, PetscLayout *map) in PetscLayoutCreate() argument 53 PetscCall(PetscNew(map)); in PetscLayoutCreate() 54 PetscCallMPI(MPI_Comm_size(comm, &(*map)->size)); in PetscLayoutCreate() 55 (*map)->comm = comm; in PetscLayoutCreate() 56 (*map)->bs = 1; in PetscLayoutCreate() 57 (*map)->n = -1; in PetscLayoutCreate() 58 (*map)->N = -1; in PetscLayoutCreate() 59 (*map)->range = NULL; in PetscLayoutCreate() [all …]
|
| H A D | isio.c | 9 PetscLayout map; in ISView_Binary() local 17 PetscCall(ISGetLayout(is, &map)); in ISView_Binary() 18 PetscCall(PetscLayoutGetLocalSize(map, &n)); in ISView_Binary() 19 PetscCall(PetscLayoutGetRange(map, &s, NULL)); in ISView_Binary() 20 PetscCall(PetscLayoutGetSize(map, &N)); in ISView_Binary() 48 PetscCall(PetscViewerHDF5Load(viewer, isname, is->map, H5T_NATIVE_LLONG, (void **)&ind)); in ISLoad_HDF5() 50 PetscCall(PetscViewerHDF5Load(viewer, isname, is->map, H5T_NATIVE_INT, (void **)&ind)); in ISLoad_HDF5() 52 PetscCall(ISGeneralSetIndices(is, is->map->n, ind, PETSC_OWN_POINTER)); in ISLoad_HDF5() 53 …ject with name %s of size %" PetscInt_FMT ":%" PetscInt_FMT "\n", isname, is->map->n, is->map->N)); in ISLoad_HDF5() 62 PetscLayout map; in ISLoad_Binary() local [all …]
|
| H A D | psort.c | 168 static PetscErrorCode PetscParallelRedistribute(PetscLayout map, PetscInt n, PetscInt arrayin[], Pe… in PetscParallelRedistribute() argument 180 PetscCallMPI(MPI_Comm_size(map->comm, &size)); in PetscParallelRedistribute() 181 PetscCallMPI(MPI_Comm_rank(map->comm, &rank)); in PetscParallelRedistribute() 182 PetscCall(PetscCommGetNewTag(map->comm, &firsttag)); in PetscParallelRedistribute() 183 PetscCall(PetscCommGetNewTag(map->comm, &secondtag)); in PetscParallelRedistribute() 185 PetscCallMPI(MPI_Scan(&n, &nextOffset, 1, MPIU_INT, MPI_SUM, map->comm)); in PetscParallelRedistribute() 187 total = map->range[rank + 1] - map->range[rank]; in PetscParallelRedistribute() 188 …if (total > 0) PetscCallMPI(MPIU_Irecv(arrayout, total, MPIU_INT, MPI_ANY_SOURCE, firsttag, map->c… in PetscParallelRedistribute() 195 itotal = map->range[i + 1] - map->range[i]; in PetscParallelRedistribute() 197 oStart = PetscMax(myOffset, map->range[i]); in PetscParallelRedistribute() [all …]
|
| /petsc/src/sys/tests/ |
| H A D | ex64.cxx | 175 PetscErrorCode view_map(const map_type &map) const noexcept in view_map() 181 PetscCallCXX(oss << "map: '" << this->map_name << "'\n"); in view_map() 182 PetscCallCXX(oss << " size: " << map.size() << '\n'); in view_map() 183 PetscCallCXX(oss << " capacity: " << map.capacity() << '\n'); in view_map() 184 PetscCallCXX(oss << " bucket count: " << map.bucket_count() << '\n'); in view_map() 185 PetscCallCXX(oss << " empty: " << map.empty() << '\n'); in view_map() 189 …for (auto &&entry : map) PetscCallCXX(oss << " key: [" << this->key_printer(entry.first) << "] … in view_map() 203 PetscErrorCode check_size_capacity_coherent(map_type &map) const noexcept in check_size_capacity_coherent() 205 const auto msize = map.size(); in check_size_capacity_coherent() 206 const auto mcap = map.capacity(); in check_size_capacity_coherent() [all …]
|
| /petsc/src/vec/is/is/tests/ |
| H A D | ex8.c | 10 ISLocalToGlobalMapping map; in main() local 14 …PetscCall(ISLocalToGlobalMappingCreate(PETSC_COMM_WORLD, 1, 12, indices, PETSC_COPY_VALUES, &map)); in main() 15 PetscCall(ISLocalToGlobalMappingView(map, NULL)); in main() 16 PetscCall(ISLocalToGlobalMappingSetBlockSize(map, 2)); in main() 17 PetscCall(ISLocalToGlobalMappingView(map, NULL)); in main() 18 PetscCall(ISLocalToGlobalMappingSetBlockSize(map, 4)); in main() 19 PetscCall(ISLocalToGlobalMappingView(map, NULL)); in main() 20 PetscCall(ISLocalToGlobalMappingSetBlockSize(map, 2)); in main() 21 PetscCall(ISLocalToGlobalMappingView(map, NULL)); in main() 22 PetscCall(ISLocalToGlobalMappingSetBlockSize(map, 1)); in main() [all …]
|
| H A D | ex11.c | 13 PetscLayout map, mapeven; in main() local 51 PetscCall(ISGetLayout(is, &map)); in main() 52 PetscCall(PetscLayoutCreateFromSizes(map->comm, PETSC_DECIDE, map->N, 1, &mapeven)); in main() 56 PetscCall(PetscParallelSortInt(map, mapeven, keys, keyseven)); in main() 61 PetscCall(PetscParallelSortInt(map, map, keys, keyssorted)); in main() 62 PetscCall(PetscParallelSortedInt(map->comm, map->n, keyssorted, &sorted)); in main() 66 PetscCall(PetscParallelSortInt(map, map, keys, keys)); in main() 67 PetscCall(PetscParallelSortedInt(map->comm, map->n, keys, &sorted)); in main()
|
| /petsc/src/vec/is/is/impls/block/ |
| H A D | block.c | 37 PetscCall(PetscLayoutGetBlockSize(is->map, &bs)); in ISLocate_Block() 38 PetscCall(PetscLayoutGetLocalSize(is->map, &numIdx)); in ISLocate_Block() 70 PetscCall(PetscLayoutGetBlockSize(in->map, &bs)); in ISGetIndices_Block() 71 PetscCall(PetscLayoutGetLocalSize(in->map, &n)); in ISGetIndices_Block() 96 PetscCall(PetscLayoutGetBlockSize(is->map, &bs)); in ISRestoreIndices_Block() 101 …PetscCheck(is->map->n <= 0 || *idx == sub->idx, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "Must restor… in ISRestoreIndices_Block() 114 PetscCall(PetscLayoutGetBlockSize(is->map, &bs)); in ISInvertPermutation_Block() 115 PetscCall(PetscLayoutGetLocalSize(is->map, &n)); in ISInvertPermutation_Block() 132 PetscCall(PetscLayoutGetBlockSize(is->map, &bs)); in ISView_Block() 133 PetscCall(PetscLayoutGetLocalSize(is->map, &n)); in ISView_Block() [all …]
|
| /petsc/src/vec/is/utils/hdf5/ |
| H A D | hdf5io.c | 79 PetscLayout map; in PetscViewerHDF5ReadSizes_Private() local 84 map = *map_; in PetscViewerHDF5ReadSizes_Private() 183 PetscCall(PetscLayoutSetBlockSize(map, bs)); in PetscViewerHDF5ReadSizes_Private() 184 if (map->N < 0) PetscCall(PetscLayoutSetSize(map, N)); in PetscViewerHDF5ReadSizes_Private() 185 …map->N == N, PetscObjectComm((PetscObject)viewer), PETSC_ERR_FILE_UNEXPECTED, "Global size of arra… in PetscViewerHDF5ReadSizes_Private() 186 if (setup) PetscCall(PetscLayoutSetUp(map)); in PetscViewerHDF5ReadSizes_Private() 190 …5ReadSelectHyperslab_Private(PetscViewer viewer, HDF5ReadCtx ctx, PetscLayout map, hid_t *memspace) in PetscViewerHDF5ReadSelectHyperslab_Private() argument 199 PetscCall(PetscLayoutSetUp(map)); in PetscViewerHDF5ReadSelectHyperslab_Private() 200 PetscCall(PetscLayoutGetBlockSize(map, &bs)); in PetscViewerHDF5ReadSelectHyperslab_Private() 201 PetscCall(PetscLayoutGetLocalSize(map, &n)); in PetscViewerHDF5ReadSelectHyperslab_Private() [all …]
|
| /petsc/src/ksp/pc/impls/tfs/ |
| H A D | gs.c | 246 /* copy over in_elms list and create inverse map */ in gsi_check_args() 271 /* set up inverse map */ in gsi_check_args() 310 /* compess map as well as keep track of local ops */ in gsi_check_args() 386 PetscInt *map; in gsi_via_bit_mask() local 400 map = gs->companion; in gsi_via_bit_mask() 408 map = gs->companion; in gsi_via_bit_mask() 416 **reduce = map[**reduce]; in gsi_via_bit_mask() 447 for (i = 0; i < nel; i++) elms[i] = map[elms[i]]; in gsi_via_bit_mask() 451 for (i = 0; i < nel; i++) elms[i] = map[elms[i]]; in gsi_via_bit_mask() 820 PetscInt *num, *map, **reduce; in PCTFS_gs_gop_local_out() local [all …]
|
| /petsc/src/vec/is/is/impls/stride/ |
| H A D | stride.c | 36 …PetscCall(ISCreateStride(PetscObjectComm((PetscObject)is), is->map->n, sub->first, sub->step, newI… in ISDuplicate_Stride() 48 PetscInt start = is->map->rstart, n = is->map->n; in ISInvertPermutation_Stride() 59 const PetscInt *indices, n = is->map->n; in ISInvertPermutation_Stride() 137 if ((rem < is->map->n) && !(key % step)) *location = rem; in ISLocate_Stride() 151 PetscCall(PetscMalloc1(is->map->n, (PetscInt **)idx)); in ISGetIndices_Stride() 152 if (is->map->n) { in ISGetIndices_Stride() 154 for (i = 1; i < is->map->n; i++) (*dx)[i] = (*dx)[i - 1] + sub->step; in ISGetIndices_Stride() 169 PetscInt i, n = is->map->n; in ISView_Stride() 221 sub->first += (is->map->n - 1) * sub->step; in ISSort_Stride() 241 if (!is->map->n || sub->step != 0) *flg = PETSC_TRUE; in ISUniqueLocal_Stride() [all …]
|
| /petsc/src/vec/is/ao/impls/memscalable/ |
| H A D | aomemscalable.c | 11 PetscLayout map; /* determines the local sizes of ao */ member 24 PetscLayout map = aomems->map; in AOView_MemoryScalable() local 42 PetscCall(PetscMalloc2(map->N, &app, map->N, &petsc)); in AOView_MemoryScalable() 43 len = map->n; in AOView_MemoryScalable() 50 len = map->range[i + 1] - map->range[i]; in AOView_MemoryScalable() 51 app_loc = app + map->range[i]; in AOView_MemoryScalable() 52 petsc_loc = petsc + map->range[i]; in AOView_MemoryScalable() 56 …tscInt_FMT " %3" PetscInt_FMT " %3" PetscInt_FMT "\n", map->range[i] + j, app_loc[j], map->ran… in AOView_MemoryScalable() 62 …PetscCallMPI(MPIU_Send((void *)aomems->app_loc, map->n, MPIU_INT, 0, tag_app, PetscObjectComm((Pet… in AOView_MemoryScalable() 63 …PetscCallMPI(MPIU_Send((void *)aomems->petsc_loc, map->n, MPIU_INT, 0, tag_petsc, PetscObjectComm(… in AOView_MemoryScalable() [all …]
|
| /petsc/src/dm/impls/patch/tests/output/ |
| H A D | ex1_0.out | 8 PetscSF Object: Buffered Map 1 MPI process 20 PetscSF Object: Restricted Map 1 MPI process 30 PetscSF Object: Buffered Map 1 MPI process 45 PetscSF Object: Restricted Map 1 MPI process 55 PetscSF Object: Buffered Map 1 MPI process 67 PetscSF Object: Restricted Map 1 MPI process 77 PetscSF Object: Buffered Map 1 MPI process 92 PetscSF Object: Restricted Map 1 MPI process 102 PetscSF Object: Buffered Map 1 MPI process 121 PetscSF Object: Restricted Map 1 MPI process [all …]
|
| /petsc/src/vec/vec/utils/ |
| H A D | vecio.c | 16 PetscLayout map; in VecView_Binary() local 25 PetscCall(VecGetLayout(vec, &map)); in VecView_Binary() 26 PetscCall(PetscLayoutGetLocalSize(map, &n)); in VecView_Binary() 27 PetscCall(PetscLayoutGetRange(map, &s, NULL)); in VecView_Binary() 28 PetscCall(PetscLayoutGetSize(map, &N)); in VecView_Binary() 58 …PETSC_COMM_SELF, info, "-%svecload_block_size %" PetscInt_FMT "\n", pre ? pre : "", vec->map->bs)); in VecView_Binary() 69 PetscLayout map; in VecLoad_Binary() local 75 PetscCall(VecGetLayout(vec, &map)); in VecLoad_Binary() 76 PetscCall(PetscLayoutGetSize(map, &N)); in VecLoad_Binary() 98 PetscCall(PetscLayoutGetBlockSize(map, &bs)); in VecLoad_Binary() [all …]
|
| /petsc/src/sys/objects/device/tests/ |
| H A D | ex11.cxx | 46 PetscCall(PetscViewerASCIISynchronizedPrintf(vwr, "Marked Object Map:\n")); in MarkedObjectMapView() 90 …SETERRQ(comm, PETSC_ERR_PLIB, "Condition '%s' failed, marked object map in corrupt state: %s", con… in CheckMarkedObjectMap_Private() 129 // The underlying marked object map is *unordered*, and hence the order in which we in TestAllCombinations() 132 // be 2 while knext is 0. So we need to map these back to linear space so we can loop in TestAllCombinations() 142 // search the list of keys from the map for the selected key in TestAllCombinations() 146 …eckMarkedObjectMap(key_idx < std::distance(keys, keys_end), "marked object map could not find expe… in TestAllCombinations() 157 …PetscCall(CheckMarkedObjectMap(nkeys == num_expected_keys, "marked object map has %zu keys expecte… in TestAllCombinations() 163 // Check that the map contained only keys we were looking for. Any extra keys will have in TestAllCombinations() 165 …_keys.cend(); ++it) PetscCall(CheckMarkedObjectMap(*it > 0, "Marked Object Map has extra object en… in TestAllCombinations() 171 …jectMap(nkeys == 0, "synchronizing device context did not empty dependency map, have %zu keys", nk… in TestAllCombinations() [all …]
|
| /petsc/src/vec/vec/impls/shared/ |
| H A D | shvec.c | 17 …etscSharedMalloc(PetscObjectComm((PetscObject)win), win->map->n * sizeof(PetscScalar), win->map->N… in VecDuplicate_Shared() 20 PetscCall(VecSetSizes(*v, win->map->n, win->map->N)); in VecDuplicate_Shared() 22 PetscCall(PetscLayoutReference(win->map, &(*v)->map)); in VecDuplicate_Shared() 41 PetscCall(PetscSplitOwnership(PetscObjectComm((PetscObject)vv), &vv->map->n, &vv->map->N)); in VecCreate_Shared() 42 …l(PetscSharedMalloc(PetscObjectComm((PetscObject)vv), vv->map->n * sizeof(PetscScalar), vv->map->N… in VecCreate_Shared()
|
| /petsc/src/vec/is/is/impls/general/ |
| H A D | general.c | 13 PetscCall(PetscLayoutGetLocalSize(is->map, &n)); in ISDuplicate_General() 15 PetscCall(PetscLayoutGetBlockSize(is->map, &bs)); in ISDuplicate_General() 16 PetscCall(PetscLayoutSetBlockSize((*newIS)->map, bs)); in ISDuplicate_General() 40 PetscCall(PetscLayoutGetLocalSize(is->map, &n)); in ISCopy_General() 51 PetscCall(PetscLayoutGetLocalSize(is->map, &n)); in ISShift_General() 63 PetscCall(PetscLayoutGetLocalSize(is->map, &n)); in ISOnComm_General() 71 PetscCall(PetscLayoutSetBlockSize(is->map, bs)); in ISSetBlockSize_General() 83 PetscCall(PetscLayoutGetLocalSize(is->map, &n)); in ISContiguousLocal_General() 106 PetscCall(PetscLayoutGetLocalSize(is->map, &numIdx)); in ISLocate_General() 138 …PetscCheck(in->map->n <= 0 || *idx == sub->idx, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "Must restor… in ISRestoreIndices_General() [all …]
|
| /petsc/src/vec/vec/interface/ |
| H A D | veccreate.c | 51 PetscCall(PetscLayoutCreate(comm, &v->map)); in VecCreate() 93 PetscErrorCode VecCreateWithLayout_Private(PetscLayout map, Vec *vec) in VecCreateWithLayout_Private() argument 101 …PetscCall(PetscHeaderCreate(v, VEC_CLASSID, "Vec", "Vector", "Vec", map->comm, VecDestroy, VecView… in VecCreateWithLayout_Private() 102 v->map = map; in VecCreateWithLayout_Private() 103 map->refcnt++; in VecCreateWithLayout_Private() 105 v->bstash.bs = map->bs; in VecCreateWithLayout_Private()
|
| /petsc/include/ |
| H A D | petscdmplextypes.h | 45 + `DM_COORD_MAP_NONE` - The identity map 46 . `DM_COORD_MAP_SHEAR` - The shear (additive) map along some dimension 47 . `DM_COORD_MAP_FLARE` - The flare (multiplicative) map along some dimension 48 . `DM_COORD_MAP_ANNULUS` - The map from a rectangle to an annulus 49 . `DM_COORD_MAP_SHELL` - The map from a rectangular solid to an spherical shell 50 - `DM_COORD_MAP_SINUSOID` - The map from a flat rectangle to a sinusoidal surface
|
| H A D | petscdmceed.h | 33 CeedElemRestriction er; // Map from PETSc local vector to FE element vectors 34 CeedElemRestriction erL; // Map from PETSc local vector to FV left cell vectors 35 CeedElemRestriction erR; // Map from PETSc local vector to FV right cell vectors 41 CeedElemRestriction erq; // Map from PETSc local vector to quadrature points 44 CeedElemRestriction eri; // Map from PETSc local vector to quadrature points
|
| /petsc/src/sys/dll/ |
| H A D | reg.c | 184 PetscHMapFunc map; member 238 static PetscErrorCode PetscHMapFuncInsert_Private(PetscHMapFunc map, const char name[], PetscErrorC… in PetscHMapFuncInsert_Private() argument 246 PetscCall(PetscHMapFuncFind(map, name, &it, &found)); in PetscHMapFuncInsert_Private() 249 PetscCall(PetscHMapFuncIterSet(map, it, fnc)); in PetscHMapFuncInsert_Private() 254 PetscCall(PetscHMapFuncSet(map, tmp_name, fnc)); in PetscHMapFuncInsert_Private() 259 PetscHashIterGetKey(map, it, tmp_name); in PetscHMapFuncInsert_Private() 261 PetscCall(PetscHMapFuncIterDel(map, it)); in PetscHMapFuncInsert_Private() 271 PetscCall(PetscHMapFuncCreateWithSize(size, &(*fl)->map)); in PetscFunctionListCreate_Private() 312 PetscCall(PetscHMapFuncInsert_Private((*fl)->map, name, fptr)); in PetscFunctionListAdd_Private() 333 PetscCall(PetscHMapFuncDestroy(&(*fl)->map)); in PetscFunctionListDestroy() [all …]
|
| /petsc/src/vec/is/section/interface/hdf5/ |
| H A D | sectionhdf5.c | 184 PetscLayout map; in PetscSectionLoad_HDF5_SingleField() local 201 PetscCall(ISGetLayout(dofIS, &map)); in PetscSectionLoad_HDF5_SingleField() 202 PetscCall(PetscLayoutSetSize(map, N)); in PetscSectionLoad_HDF5_SingleField() 203 PetscCall(PetscLayoutSetLocalSize(map, n)); in PetscSectionLoad_HDF5_SingleField() 211 PetscCall(ISGetLayout(offIS, &map)); in PetscSectionLoad_HDF5_SingleField() 212 PetscCall(PetscLayoutSetSize(map, N)); in PetscSectionLoad_HDF5_SingleField() 213 PetscCall(PetscLayoutSetLocalSize(map, n)); in PetscSectionLoad_HDF5_SingleField() 234 PetscCall(ISGetLayout(cdofIS, &map)); in PetscSectionLoad_HDF5_SingleField() 235 PetscCall(PetscLayoutSetSize(map, N)); in PetscSectionLoad_HDF5_SingleField() 236 PetscCall(PetscLayoutSetLocalSize(map, n)); in PetscSectionLoad_HDF5_SingleField() [all …]
|
| /petsc/src/vec/vec/impls/mpi/ |
| H A D | pdvec.c | 31 PetscCall(PetscLogObjectState((PetscObject)v, "Length=%" PetscInt_FMT, v->map->N)); in VecDestroy_MPI() 56 PetscInt i, work = xin->map->n, cnt, nLen; in VecView_MPI_ASCII() 68 PetscInt nmax = 0, nmin = xin->map->n, navg; in VecView_MPI_ASCII() 70 nmax = PetscMax(nmax, xin->map->range[i + 1] - xin->map->range[i]); in VecView_MPI_ASCII() 71 nmin = PetscMin(nmin, xin->map->range[i + 1] - xin->map->range[i]); in VecView_MPI_ASCII() 73 navg = xin->map->N / size; in VecView_MPI_ASCII() 93 for (i = 0; i < xin->map->n; i++) { in VecView_MPI_ASCII() 127 for (i = 0; i < xin->map->n; i++) { in VecView_MPI_ASCII() 154 PetscCall(PetscViewerASCIIPrintf(viewer, "%" PetscInt_FMT "\n", xin->map->N / bs)); in VecView_MPI_ASCII() 215 for (i = 0; i < xin->map->n; i++) { in VecView_MPI_ASCII() [all …]
|
| /petsc/src/vec/vec/impls/seq/seqviennacl/ |
| H A D | vecviennacl.cxx | 170 PetscInt n = v->map->n; in VecViennaCLAllocateCheckHost() 195 ((Vec_ViennaCL *)v->spptr)->GPUarray_allocated = new ViennaCLVector((PetscBLASInt)v->map->n); in VecViennaCLAllocateCheck() 211 if (v->map->n > 0) { in VecViennaCLCopyToGPU() 216 … viennacl::fast_copy(*(PetscScalar **)v->data, *(PetscScalar **)v->data + v->map->n, vec->begin()); in VecViennaCLCopyToGPU() 221 PetscCall(PetscLogCpuToGpu(v->map->n * sizeof(PetscScalar))); in VecViennaCLCopyToGPU() 246 PetscCall(PetscLogGpuToCpu(v->map->n * sizeof(PetscScalar))); in VecViennaCLCopyFromGPU() 265 PetscCall(PetscArraycpy(ya, xa, xin->map->n)); in VecCopy_SeqViennaCL_Private() 274 PetscInt n = xin->map->n, i; in VecSetRandom_SeqViennaCL_Private() 290 PetscCall(PetscLogObjectState((PetscObject)v, "Length=%" PetscInt_FMT, v->map->n)); in VecDestroy_SeqViennaCL_Private() 327 if (alpha != 0.0 && xin->map->n > 0) { in VecAYPX_SeqViennaCL() [all …]
|
| /petsc/src/sys/objects/device/interface/ |
| H A D | memory.cxx | 93 // instead we need to keep an extra map to keep track of them 107 map_type map{}; member in MemoryMap 127 PetscCall(map.reserve(16)); in register_finalize_() 134 PetscCall(PetscInfo(nullptr, "Finalizing memory map\n")); in finalize_() 135 PetscCallCXX(map = map_type{}); in finalize_() 144 MemoryMap::search_for - retrieve an iterator to the key-value pair for a pointer in the map 154 If ptr is not found and must_find is false returns map.end(), otherwise raises an error 158 const auto end_it = map.end(); in search_for() 159 auto it = map.find(const_cast<map_type::key_type>(ptr)); in search_for() 166 it = std::find_if(map.begin(), end_it, [ptr](map_type::const_iterator::reference map_it) { in search_for() [all …]
|
| /petsc/src/mat/tests/ |
| H A D | ex240.c | 9 PetscInt N, mx = 5, my = 4, i, j, nc, nrow, n, ncols, rstart, *colors, *map; in main() local 34 PetscCall(PetscMalloc1(n, &map)); in main() 35 for (i = 0; i < n; i++) map[i] = i; in main() 36 PetscCall(ISLocalToGlobalMappingApply(ltog, n, map, map)); in main() 40 for (i = 0; i < n; i++) colors[map[i]] = icolors[i]; in main() 41 PetscCall(PetscFree(map)); in main()
|