| /petsc/src/dm/impls/moab/tests/ |
| H A D | ex3.cxx | 14 PetscInt nlevels; /* Number of levels in mesh hierarchy */ member 25 options->nlevels = 1; in ProcessOptions() 39 …els", "Number of levels in the hierarchy", "ex3.cxx", options->nlevels, &options->nlevels, NULL, 0… in ProcessOptions() 96 PetscCall(PetscMalloc(sizeof(DM) * (user.nlevels + 1), &dmhierarchy)); in main() 97 for (i = 0; i <= user.nlevels; i++) dmhierarchy[i] = NULL; in main() 104 if (user.nlevels) { in main() 105 PetscCall(PetscMalloc1(user.nlevels, °rees)); in main() 106 for (i = 0; i < user.nlevels; i++) degrees[i] = user.degree; in main() 107 …scPrintf(comm, "Generate the MOAB mesh hierarchy with %" PetscInt_FMT " levels.\n", user.nlevels)); in main() 108 PetscCall(DMMoabGenerateHierarchy(user.dm, user.nlevels, degrees)); in main() [all …]
|
| /petsc/src/ksp/ksp/tutorials/amrex/ |
| H A D | MyTest.cxx | 134 int nlevels = max_level + 1; in initGrids() local 135 geom.resize(nlevels); in initGrids() 136 grids.resize(nlevels); in initGrids() 143 for (int ilev = 0; ilev < nlevels; ++ilev) { in initGrids() 149 for (int ilev = 0; ilev < nlevels; ++ilev) { in initGrids() 159 int nlevels = max_level + 1; in initData() local 160 dmap.resize(nlevels); in initData() 161 factory.resize(nlevels); in initData() 162 phi.resize(nlevels); in initData() 163 rhs.resize(nlevels); in initData() [all …]
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex36.cxx | 77 PetscInt problem, dim, n, nlevels; member 130 if (user.nlevels) { in main() 132 PetscCall(PetscMalloc(sizeof(DM) * (user.nlevels + 1), &dmhierarchy)); in main() 133 for (k = 0; k <= user.nlevels; k++) dmhierarchy[k] = NULL; in main() 135 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Number of mesh hierarchy levels: %d\n", user.nlevels)); in main() 136 PetscCall(DMMoabGenerateHierarchy(dm, user.nlevels, NULL)); in main() 143 PetscCall(DMRefineHierarchy(dm, user.nlevels, &dmhierarchy[1])); in main() 145 …for (k = 1; k <= user.nlevels; k++) PetscCall(DMRefine(dmhierarchy[k - 1], MPI_COMM_NULL, &dmhiera… in main() 147 dmref = dmhierarchy[user.nlevels]; in main() 152 PetscCall(PCMGSetLevels(pc, user.nlevels + 1, NULL)); in main() [all …]
|
| H A D | ex35.cxx | 94 PetscInt dim, n, problem, nlevels; member 145 if (user.nlevels) { in main() 147 PetscCall(PetscMalloc(sizeof(DM) * (user.nlevels + 1), &dmhierarchy)); in main() 148 for (k = 0; k <= user.nlevels; k++) dmhierarchy[k] = NULL; in main() 150 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Number of mesh hierarchy levels: %d\n", user.nlevels)); in main() 151 PetscCall(DMMoabGenerateHierarchy(dm, user.nlevels, NULL)); in main() 157 PetscCall(DMRefineHierarchy(dm, user.nlevels, &dmhierarchy[1])); in main() 159 …for (k = 1; k <= user.nlevels; k++) PetscCall(DMRefine(dmhierarchy[k - 1], MPI_COMM_NULL, &dmhiera… in main() 161 dmref = dmhierarchy[user.nlevels]; in main() 166 PetscCall(PCMGSetLevels(pc, user.nlevels + 1, NULL)); in main() [all …]
|
| H A D | ex42.c | 1734 PetscInt nlevels, k; in PCMGSetupViaCoarsen() local 1740 nlevels = 1; in PCMGSetupViaCoarsen() 1741 PetscCall(PetscOptionsGetInt(NULL, NULL, "-levels", &nlevels, 0)); in PCMGSetupViaCoarsen() 1743 PetscCall(PetscMalloc1(nlevels, &da_list)); in PCMGSetupViaCoarsen() 1744 for (k = 0; k < nlevels; k++) da_list[k] = NULL; in PCMGSetupViaCoarsen() 1745 PetscCall(PetscMalloc1(nlevels, &daclist)); in PCMGSetupViaCoarsen() 1746 for (k = 0; k < nlevels; k++) daclist[k] = NULL; in PCMGSetupViaCoarsen() 1749 finest = nlevels - 1; in PCMGSetupViaCoarsen() 1752 PetscCall(DMCoarsenHierarchy(da_fine, nlevels - 1, &daclist[1])); in PCMGSetupViaCoarsen() 1753 for (k = 0; k < nlevels; k++) { in PCMGSetupViaCoarsen() [all …]
|
| /petsc/src/dm/impls/moab/ |
| H A D | dmmbmg.cxx | 32 PetscErrorCode DMMoabGenerateHierarchy(DM dm, PetscInt nlevels, PetscInt *ldegrees) in DMMoabGenerateHierarchy() argument 44 PetscCall(PetscMalloc1(nlevels, &pdegrees)); in DMMoabGenerateHierarchy() 45 …for (ilevel = 0; ilevel < nlevels; ilevel++) pdegrees[ilevel] = 2; /* default = Degree 2 refinemen… in DMMoabGenerateHierarchy() 49 dmmoab->nhlevels = nlevels; in DMMoabGenerateHierarchy() 58 PetscCall(PetscMalloc1(nlevels + 1, &dmmoab->hsets)); in DMMoabGenerateHierarchy() 61 merr = dmmoab->hierarchy->generate_mesh_hierarchy(nlevels, pdegrees, hsets, false); in DMMoabGenerateHierarchy() 73 for (ilevel = 1; ilevel <= nlevels; ilevel++) { in DMMoabGenerateHierarchy() 107 PETSC_EXTERN PetscErrorCode DMRefineHierarchy_Moab(DM dm, PetscInt nlevels, DM dmf[]) in DMRefineHierarchy_Moab() argument 113 …for (i = 1; i < nlevels; i++) PetscCall(DMRefine(dmf[i - 1], PetscObjectComm((PetscObject)dm), &dm… in DMRefineHierarchy_Moab() 133 PETSC_EXTERN PetscErrorCode DMCoarsenHierarchy_Moab(DM dm, PetscInt nlevels, DM dmc[]) in DMCoarsenHierarchy_Moab() argument [all …]
|
| H A D | dmmoab.cxx | 29 PETSC_EXTERN PetscErrorCode DMRefineHierarchy_Moab(DM dm, PetscInt nlevels, DM dmRefined[]); 30 PETSC_EXTERN PetscErrorCode DMCoarsenHierarchy_Moab(DM dm, PetscInt nlevels, DM dmCoarsened[]);
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexcoarsen.c | 12 PetscErrorCode DMCoarsenHierarchy_Plex(DM dm, PetscInt nlevels, DM dmCoarsened[]) in DMCoarsenHierarchy_Plex() argument 20 for (c = nlevels - 1; c >= 0; --c) { in DMCoarsenHierarchy_Plex()
|
| H A D | plexrefine.c | 408 PetscErrorCode DMRefineHierarchy_Plex(DM dm, PetscInt nlevels, DM rdm[]) in DMRefineHierarchy_Plex() argument 418 for (r = 0; r < nlevels; ++r) { in DMRefineHierarchy_Plex() 456 for (r = 0; r < nlevels; ++r) { in DMRefineHierarchy_Plex()
|
| /petsc/src/ksp/pc/impls/mg/ |
| H A D | mgfunc.c | 287 …nlevels, PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_OUTOFRANGE, "Level %" PetscInt_FMT " must… in PCMGGetInterpolation() 361 …nlevels, PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_OUTOFRANGE, "Level %" PetscInt_FMT " must… in PCMGGetRestriction() 393 …nlevels, PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_OUTOFRANGE, "Level %" PetscInt_FMT " must… in PCMGSetRScale() 427 …nlevels, PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_OUTOFRANGE, "Level %" PetscInt_FMT " must… in PCMGGetRScale() 512 …nlevels, PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_OUTOFRANGE, "Level %" PetscInt_FMT " must… in PCMGGetInjection()
|
| H A D | mg.c | 355 if (mg->nlevels == levels) PetscFunctionReturn(PETSC_SUCCESS); in PCMGSetLevels_MG() 371 mg->nlevels = levels; in PCMGSetLevels_MG() 695 levels = PetscMax(mg->nlevels, 1); in PCSetFromOptions_MG() 1260 *levels = mg->nlevels; in PCMGGetLevels_MG() 1323 PetscCheck(mg->nlevels > 0, PETSC_COMM_SELF, PETSC_ERR_PLIB, "MG has no levels"); in PCMGGetGridComplexity() 1324 for (lev = 0; lev < mg->nlevels; lev++) { in PCMGGetGridComplexity() 1331 if (lev == mg->nlevels - 1) { in PCMGGetGridComplexity() 1852 PetscCall(PetscMalloc1(mg->nlevels, &mat)); in PCGetInterpolations_MG() 1853 for (l = 1; l < mg->nlevels; l++) { in PCGetInterpolations_MG() 1857 *num_levels = mg->nlevels; in PCGetInterpolations_MG() [all …]
|
| /petsc/src/dm/impls/da/ |
| H A D | da.c | 1312 PetscErrorCode DMRefineHierarchy_DA(DM da, PetscInt nlevels, DM daf[]) in DMRefineHierarchy_DA() argument 1318 …PetscCheck(nlevels >= 0, PetscObjectComm((PetscObject)da), PETSC_ERR_ARG_OUTOFRANGE, "nlevels cann… in DMRefineHierarchy_DA() 1319 if (nlevels == 0) PetscFunctionReturn(PETSC_SUCCESS); in DMRefineHierarchy_DA() 1323 PetscCall(PetscMalloc3(nlevels, &refx, nlevels, &refy, nlevels, &refz)); in DMRefineHierarchy_DA() 1324 …for (i = 0; i < nlevels; i++) PetscCall(DMDAGetRefinementFactor(da, &refx[i], &refy[i], &refz[i])); in DMRefineHierarchy_DA() 1325 n = nlevels; in DMRefineHierarchy_DA() 1327 n = nlevels; in DMRefineHierarchy_DA() 1329 n = nlevels; in DMRefineHierarchy_DA() 1334 for (i = 1; i < nlevels; i++) { in DMRefineHierarchy_DA() 1342 PetscErrorCode DMCoarsenHierarchy_DA(DM da, PetscInt nlevels, DM dac[]) in DMCoarsenHierarchy_DA() argument [all …]
|
| /petsc/src/sys/utils/ |
| H A D | sorti.c | 1204 …PetscInt i, j, cnt, nmask = 0, nlevels = 0, *level, *levelcnt, levelmax = 0, *workid, *workparent… in PetscProcessTree() local 1233 nlevels = PetscMax(nlevels, level[i]); in PetscProcessTree() 1237 PetscCall(PetscCalloc1(nlevels, &levelcnt)); in PetscProcessTree() 1242 for (i = 0; i < nlevels; i++) levelmax = PetscMax(levelmax, levelcnt[i]); in PetscProcessTree() 1247 for (j = 1; j <= nlevels; j++) { in PetscProcessTree() 1269 for (j = 0; j < nlevels; j++) { in PetscProcessTree() 1273 *Nlevels = nlevels; in PetscProcessTree()
|
| /petsc/include/petsc/private/ |
| H A D | pcmgimpl.h | 68 PetscInt nlevels; member
|
| /petsc/src/dm/partitioner/impls/multistage/ |
| H A D | mspart.c | 146 …ultistage_CreateStages(MPI_Comm comm, const PetscInt *options, PetscInt *nlevels, MPI_Group *level… in PetscPartitionerMultistage_CreateStages() argument 162 *nlevels = 1; in PetscPartitionerMultistage_CreateStages() 201 *nlevels = 1; in PetscPartitionerMultistage_CreateStages() 231 *nlevels = 2; in PetscPartitionerMultistage_CreateStages() 275 *nlevels = l; in PetscPartitionerMultistage_CreateStages()
|
| /petsc/src/binding/petsc4py/src/petsc4py/PETSc/ |
| H A D | DM.pyx | 1648 def refineHierarchy(self, nlevels: int) -> list: 1655 nlevels 1663 cdef PetscInt i, n = asInt(nlevels) 1675 def coarsenHierarchy(self, nlevels: int) -> list: 1682 nlevels 1690 cdef PetscInt i, n = asInt(nlevels) 1723 nlevels
|
| /petsc/src/ksp/pc/impls/hypre/ |
| H A D | hypre.c | 46 PetscInt nlevels; member 153 static PetscErrorCode PCGetCoarseOperators_BoomerAMG(PC pc, PetscInt *nlevels, Mat *operators[]) in PCGetCoarseOperators_BoomerAMG() argument 172 *nlevels = num_levels; in PCGetCoarseOperators_BoomerAMG() 182 static PetscErrorCode PCGetInterpolations_BoomerAMG(PC pc, PetscInt *nlevels, Mat *interpolations[]) in PCGetInterpolations_BoomerAMG() argument 201 *nlevels = num_levels; in PCGetInterpolations_BoomerAMG() 1506 …c_hypre_parasails_nlevels", "Number of number of levels", "None", jac->nlevels, &jac->nlevels, 0)); in PCSetFromOptions_HYPRE_ParaSails() 1508 …g) PetscCallHYPRE(HYPRE_ParaSailsSetParams(jac->hsolver, jac->threshold, (HYPRE_Int)jac->nlevels)); in PCSetFromOptions_HYPRE_ParaSails() 1542 PetscCall(PetscViewerASCIIPrintf(viewer, " nlevels %" PetscInt_FMT "\n", jac->nlevels)); in PCView_HYPRE_ParaSails() 2263 jac->nlevels = 1; in PCHYPRESetType_HYPRE() 2272 PetscCallHYPRE(HYPRE_ParaSailsSetParams(jac->hsolver, jac->threshold, (HYPRE_Int)jac->nlevels)); in PCHYPRESetType_HYPRE()
|
| /petsc/src/snes/tutorials/ |
| H A D | ex48.c | 1247 static PetscErrorCode DMRefineHierarchy_THI(DM dac0, PetscInt nlevels, DM hierarchy[]) argument 1258 if (nlevels > 1) { 1259 PetscCall(DMRefineHierarchy(dac0, nlevels - 1, hierarchy)); 1260 dac = hierarchy[nlevels - 2]; 1281 hierarchy[nlevels - 1] = daf;
|
| /petsc/src/dm/interface/ |
| H A D | dm.c | 3694 PetscErrorCode DMRefineHierarchy(DM dm, PetscInt nlevels, DM dmf[]) in DMRefineHierarchy() argument 3698 …PetscCheck(nlevels >= 0, PetscObjectComm((PetscObject)dm), PETSC_ERR_ARG_OUTOFRANGE, "nlevels cann… in DMRefineHierarchy() 3699 if (nlevels == 0) PetscFunctionReturn(PETSC_SUCCESS); in DMRefineHierarchy() 3705 …for (i = 1; i < nlevels; i++) PetscCall(DMRefine(dmf[i - 1], PetscObjectComm((PetscObject)dm), &dm… in DMRefineHierarchy() 3706 } else PetscUseTypeMethod(dm, refinehierarchy, nlevels, dmf); in DMRefineHierarchy() 3726 PetscErrorCode DMCoarsenHierarchy(DM dm, PetscInt nlevels, DM dmc[]) in DMCoarsenHierarchy() argument 3730 …PetscCheck(nlevels >= 0, PetscObjectComm((PetscObject)dm), PETSC_ERR_ARG_OUTOFRANGE, "nlevels cann… in DMCoarsenHierarchy() 3731 if (nlevels == 0) PetscFunctionReturn(PETSC_SUCCESS); in DMCoarsenHierarchy() 3737 …for (i = 1; i < nlevels; i++) PetscCall(DMCoarsen(dmc[i - 1], PetscObjectComm((PetscObject)dm), &d… in DMCoarsenHierarchy() 3738 } else PetscUseTypeMethod(dm, coarsenhierarchy, nlevels, dmc); in DMCoarsenHierarchy()
|
| /petsc/src/ts/tutorials/ |
| H A D | ex14.c | 239 PetscInt nlevels; member 527 thi->nlevels = 1; in THICreate() 607 …tionsInt("-thi_nlevels", "Number of levels of refinement", "", thi->nlevels, &thi->nlevels, NULL)); in THICreate() 1559 for (i = 0; i < thi->nlevels; i++) { in main()
|
| /petsc/src/ksp/pc/impls/gamg/ |
| H A D | gamg.c | 1712 …for (PetscInt i = 0; i < mg->nlevels; i++) PetscCall(PetscViewerASCIIPrintf(viewer, " %g", (double… in PCView_GAMG() 1739 for (PetscInt i = 0; i < mg->nlevels; i++) { in PCView_GAMG()
|