| /petsc/src/dm/impls/stag/ |
| H A D | stag1d.c | 136 DM_Stag *const stag = (DM_Stag *)dm->data; in DMSetUp_Stag_1d() local 147 …PetscCheck(stag->N[0] >= 1, comm, PETSC_ERR_ARG_OUTOFRANGE, "Global grid size of %" PetscInt_FMT "… in DMSetUp_Stag_1d() 150 …PetscCheck(stag->N[0] >= size, comm, PETSC_ERR_ARG_OUTOFRANGE, "More ranks (%d) than elements (%" … in DMSetUp_Stag_1d() 151 if (!stag->l[0]) { in DMSetUp_Stag_1d() 153 PetscCall(PetscMalloc1(stag->nRanks[0], &stag->l[0])); in DMSetUp_Stag_1d() 154 …for (j = 0; j < stag->nRanks[0]; ++j) stag->l[0][j] = stag->N[0] / stag->nRanks[0] + (stag->N[0] %… in DMSetUp_Stag_1d() 158 for (j = 0; j < size; ++j) Nchk += stag->l[0][j]; in DMSetUp_Stag_1d() 159 …stag->N[0], comm, PETSC_ERR_ARG_OUTOFRANGE, "Sum of specified local sizes (%" PetscInt_FMT ") is n… in DMSetUp_Stag_1d() 161 stag->n[0] = stag->l[0][rank]; in DMSetUp_Stag_1d() 164 stag->rank[0] = rank; in DMSetUp_Stag_1d() [all …]
|
| H A D | stag2d.c | 194 DM_Stag *const stag = (DM_Stag *)dm->data; in DMSetUp_Stag_2d() local 212 stag->rank[0] = rank % stag->nRanks[0]; in DMSetUp_Stag_2d() 213 stag->rank[1] = rank / stag->nRanks[0]; in DMSetUp_Stag_2d() 215 stag->firstRank[i] = PetscNot(stag->rank[i]); in DMSetUp_Stag_2d() 216 stag->lastRank[i] = (PetscBool)(stag->rank[i] == stag->nRanks[i] - 1); in DMSetUp_Stag_2d() 226 if (!stag->l[i]) { in DMSetUp_Stag_2d() 227 const PetscInt Ni = stag->N[i], nRanksi = stag->nRanks[i]; in DMSetUp_Stag_2d() 228 PetscCall(PetscMalloc1(stag->nRanks[i], &stag->l[i])); in DMSetUp_Stag_2d() 229 for (j = 0; j < stag->nRanks[i]; ++j) stag->l[i][j] = Ni / nRanksi + ((Ni % nRanksi) > j); in DMSetUp_Stag_2d() 234 for (i = 0; i < dim; ++i) stag->n[i] = stag->l[i][stag->rank[i]]; in DMSetUp_Stag_2d() [all …]
|
| H A D | stag3d.c | 292 DM_Stag *const stag = (DM_Stag *)dm->data; in DMSetUp_Stag_3d() local 305 stag->rank[0] = rank % stag->nRanks[0]; in DMSetUp_Stag_3d() 306 stag->rank[1] = rank % (stag->nRanks[0] * stag->nRanks[1]) / stag->nRanks[0]; in DMSetUp_Stag_3d() 307 stag->rank[2] = rank / (stag->nRanks[0] * stag->nRanks[1]); in DMSetUp_Stag_3d() 309 stag->firstRank[d] = PetscNot(stag->rank[d]); in DMSetUp_Stag_3d() 310 stag->lastRank[d] = (PetscBool)(stag->rank[d] == stag->nRanks[d] - 1); in DMSetUp_Stag_3d() 318 if (!stag->l[i]) { in DMSetUp_Stag_3d() 319 const PetscInt Ni = stag->N[i], nRanksi = stag->nRanks[i]; in DMSetUp_Stag_3d() 320 PetscCall(PetscMalloc1(stag->nRanks[i], &stag->l[i])); in DMSetUp_Stag_3d() 321 for (j = 0; j < stag->nRanks[i]; ++j) stag->l[i][j] = Ni / nRanksi + ((Ni % nRanksi) > j); in DMSetUp_Stag_3d() [all …]
|
| H A D | stagutils.c | 26 const DM_Stag *const stag = (DM_Stag *)dm->data; in DMStagGetBoundaryTypes() local 32 if (boundaryTypeX) *boundaryTypeX = stag->boundaryType[0]; in DMStagGetBoundaryTypes() 33 if (boundaryTypeY && dim > 1) *boundaryTypeY = stag->boundaryType[1]; in DMStagGetBoundaryTypes() 34 if (boundaryTypeZ && dim > 2) *boundaryTypeZ = stag->boundaryType[2]; in DMStagGetBoundaryTypes() 263 const DM_Stag *const stag = (DM_Stag *)dm->data; in DMStagGetCorners() local 267 if (x) *x = stag->start[0]; in DMStagGetCorners() 268 if (y) *y = stag->start[1]; in DMStagGetCorners() 269 if (z) *z = stag->start[2]; in DMStagGetCorners() 270 if (m) *m = stag->n[0]; in DMStagGetCorners() 271 if (n) *n = stag->n[1]; in DMStagGetCorners() [all …]
|
| H A D | stagintern.c | 33 DM_Stag *const stag = (DM_Stag *)dm->data; in DMStagDuplicateWithoutSetup() local 46 …stag->boundaryType[0], stag->boundaryType[1], stag->boundaryType[2], stag->N[0], stag->N[1], stag-… in DMStagDuplicateWithoutSetup() 47 stag->stencilWidth, stag->l[0], stag->l[1], stag->l[2], *newdm)); in DMStagDuplicateWithoutSetup() 51 PetscCall(PetscStrallocpy(stag->coordinateDMType, (char **)&newstag->coordinateDMType)); in DMStagDuplicateWithoutSetup() 52 PetscCall(PetscArraycpy(newstag->refineFactor, stag->refineFactor, DMSTAG_MAX_DIM)); in DMStagDuplicateWithoutSetup()
|
| H A D | stag.c | 262 const DM_Stag *const stag = (DM_Stag *)dm->data; in DMCoarsen_Stag() local 270 …for (d = 0; d < dim; ++d) PetscCheck(stag->N[d] % stag->refineFactor[d] == 0, PetscObjectComm((Pet… in DMCoarsen_Stag() 271 …Call(DMStagSetGlobalSizes(*dmc, stag->N[0] / stag->refineFactor[0], stag->N[1] / stag->refineFacto… in DMCoarsen_Stag() 273 PetscCall(PetscMalloc1(stag->nRanks[d], &l[d])); in DMCoarsen_Stag() 274 for (i = 0; i < stag->nRanks[d]; ++i) { in DMCoarsen_Stag() 275 …PetscCheck(stag->l[d][i] % stag->refineFactor[d] == 0, PetscObjectComm((PetscObject)dm), PETSC_ERR… in DMCoarsen_Stag() 276 l[d][i] = stag->l[d][i] / stag->refineFactor[d]; /* Just divide everything */ in DMCoarsen_Stag() 313 const DM_Stag *const stag = (DM_Stag *)dm->data; in DMRefine_Stag() local 320 …Call(DMStagSetGlobalSizes(*dmf, stag->N[0] * stag->refineFactor[0], stag->N[1] * stag->refineFacto… in DMRefine_Stag() 323 PetscCall(PetscMalloc1(stag->nRanks[d], &l[d])); in DMRefine_Stag() [all …]
|
| H A D | stagstencil.c | 140 const DM_Stag *const stag = (DM_Stag *)dm->data; in DMStagGetLocationDOF() local 151 *dof = stag->dof[0]; in DMStagGetLocationDOF() 154 *dof = stag->dof[1]; in DMStagGetLocationDOF() 166 *dof = stag->dof[0]; in DMStagGetLocationDOF() 172 *dof = stag->dof[1]; in DMStagGetLocationDOF() 175 *dof = stag->dof[2]; in DMStagGetLocationDOF() 191 *dof = stag->dof[0]; in DMStagGetLocationDOF() 205 *dof = stag->dof[1]; in DMStagGetLocationDOF() 213 *dof = stag->dof[2]; in DMStagGetLocationDOF() 216 *dof = stag->dof[3]; in DMStagGetLocationDOF() [all …]
|
| H A D | stagda.c | 9 DM_Stag *const stag = (DM_Stag *)dm->data; in DMStagCreateCompatibleDMDA() local 20 PetscCall(PetscMalloc1(stag->nRanks[i], &l[i])); in DMStagCreateCompatibleDMDA() 21 for (j = 0; j < stag->nRanks[i]; ++j) l[i][j] = stag->l[i][j]; in DMStagCreateCompatibleDMDA() 22 N[i] = stag->N[i]; in DMStagCreateCompatibleDMDA() 35 l[0][stag->nRanks[0] - 1] += 1; /* extra vertex in direction 0 on last rank in dimension 0 */ in DMStagCreateCompatibleDMDA() 41 l[1][stag->nRanks[1] - 1] += 1; /* extra vertex in direction 1 on last rank in dimension 1 */ in DMStagCreateCompatibleDMDA() 47 l[2][stag->nRanks[2] - 1] += 1; /* extra vertex in direction 2 on last rank in dimension 2 */ in DMStagCreateCompatibleDMDA() 56 l[i][stag->nRanks[i] - 1] += 1; in DMStagCreateCompatibleDMDA() 66 l[i][stag->nRanks[i] - 1] += 1; in DMStagCreateCompatibleDMDA() 76 l[i][stag->nRanks[i] - 1] += 1; in DMStagCreateCompatibleDMDA() [all …]
|
| /petsc/src/dm/impls/stag/tutorials/output/ |
| H A D | ex1_periodic_seq.out | 2 type: stag 13 type: stag 24 type: stag 35 type: stag 46 type: stag
|
| H A D | ex1_ghosted_vacuous.out | 2 type: stag 19 type: stag 36 type: stag 53 type: stag 70 type: stag
|
| H A D | ex1_periodic.out | 2 type: stag 19 type: stag 36 type: stag 53 type: stag 70 type: stag
|
| H A D | ex1_1.out | 2 type: stag 31 type: stag 60 type: stag 112 type: stag 141 type: stag
|
| /petsc/src/dm/impls/stag/tests/output/ |
| H A D | ex16_1.out | 2 type: stag 13 type: stag 24 type: stag
|
| H A D | ex16_4.out | 2 type: stag 16 type: stag 30 type: stag
|
| H A D | ex16_2.out | 2 type: stag 16 type: stag 30 type: stag
|
| H A D | ex16_7.out | 2 type: stag 19 type: stag 36 type: stag
|
| H A D | ex42_dim-2.out | 2 type: stag 37 type: stag 77 type: stag 106 type: stag
|
| H A D | ex42_dim-1.out | 2 type: stag 25 type: stag 47 type: stag
|
| H A D | ex42_dim-3.out | 2 type: stag 86 type: stag 243 type: stag 365 type: stag 413 type: stag
|
| H A D | ex14_1.out | 2 type: stag 13 type: stag
|
| H A D | ex14_4.out | 2 type: stag 16 type: stag
|
| H A D | ex16_5.out | 2 type: stag 28 type: stag 54 type: stag
|
| H A D | ex14_2.out | 2 type: stag 28 type: stag
|
| H A D | ex16_8.out | 2 type: stag 36 type: stag 70 type: stag
|
| H A D | ex16_3.out | 2 type: stag 37 type: stag 72 type: stag
|