| /petsc/src/ksp/pc/tests/ |
| H A D | ex5.c | 4 -l N Use N Levels. \n\ 31 PetscInt x_mesh = 15, levels = 3, cycles = 1, use_jacobi = 0; in main() local 44 PetscCall(PetscOptionsGetInt(NULL, NULL, "-l", &levels, NULL)); in main() 55 PetscCall(PetscMalloc1(levels, &N)); in main() 57 for (i = 1; i < levels; i++) { in main() 59 …PetscCheck(N[i] >= 1, PETSC_COMM_WORLD, PETSC_ERR_USER, "Too many levels or N is not large enough"… in main() 62 PetscCall(Create1dLaplacian(N[levels - 1], &cmat)); in main() 68 PetscCall(PCMGSetLevels(pcmg, levels, NULL)); in main() 78 for (i = 0; i < levels - 1; i++) { in main() 81 PetscCall(PCMGSetResidual(pcmg, levels - 1 - i, residual, NULL)); in main() [all …]
|
| /petsc/src/ksp/pc/impls/mg/ |
| H A D | mg.c | 49 if (mglevels->level == mglevels->levels - 1 && mg->ttol && reason) { in PCMGMCycle_Private() 127 PC_MG_Levels **mglevels = mg->levels; in PCApplyRichardson_MG() 130 PetscInt levels = mglevels[0]->levels, i; in PCApplyRichardson_MG() local 134 for (i = 0; i < levels; i++) { in PCApplyRichardson_MG() 141 PetscCall(KSPGetPC(mglevels[levels - 1]->smoothd, &tpc)); in PCApplyRichardson_MG() 143 PetscCall(KSPGetPC(mglevels[levels - 1]->smoothu, &tpc)); in PCApplyRichardson_MG() 146 PetscCall(VecDestroy(&mglevels[levels - 1]->b)); in PCApplyRichardson_MG() 147 mglevels[levels - 1]->b = b; in PCApplyRichardson_MG() 149 if (!mglevels[levels - 1]->b) { in PCApplyRichardson_MG() 152 PetscCall(KSPCreateVecs(mglevels[levels - 1]->smoothd, 1, &vec, 0, NULL)); in PCApplyRichardson_MG() [all …]
|
| H A D | mgfunc.c | 119 PC_MG_Levels **mglevels = mg->levels; in PCMGGetCoarseSolve() 146 PC_MG_Levels **mglevels = mg->levels; in PCMGSetResidual() 150 …, PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_WRONGSTATE, "Must set MG levels before calling"); in PCMGSetResidual() 180 PC_MG_Levels **mglevels = mg->levels; in PCMGSetResidualTranspose() 184 …, PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_WRONGSTATE, "Must set MG levels before calling"); in PCMGSetResidualTranspose() 219 PC_MG_Levels **mglevels = mg->levels; in PCMGSetInterpolation() 223 …, PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_WRONGSTATE, "Must set MG levels before calling"); in PCMGSetInterpolation() 250 PC_MG_Levels **mglevels = mg->levels; in PCMGSetOperators() 256 …, PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_WRONGSTATE, "Must set MG levels before calling"); in PCMGSetOperators() 281 PC_MG_Levels **mglevels = mg->levels; in PCMGGetInterpolation() [all …]
|
| H A D | fmg.c | 8 PetscInt i, l = mglevels[0]->levels; in PCMGFCycle_Private() 12 /* restrict the RHS through all levels to coarsest. */ in PCMGFCycle_Private() 20 /* work our way up through the levels */ in PCMGFCycle_Private() 59 PetscInt i, l = mglevels[0]->levels; in PCMGKCycle_Private() 62 /* restrict the RHS through all levels to coarsest. */ in PCMGKCycle_Private() 70 /* work our way up through the levels */ in PCMGKCycle_Private()
|
| /petsc/src/dm/partitioner/impls/multistage/ |
| H A D | mspart.c | 21 PetscInt levels; member 66 …rASCIIPrintf(viewer, "Multistage graph partitioner: total stages %" PetscInt_FMT "\n", p->levels)); in PetscPartitionerView_Multistage() 69 for (PetscInt l = 0; l < p->levels; l++) { in PetscPartitionerView_Multistage() 139 for (PetscInt l = 0; l < p->levels; l++) PetscCall(PetscViewerASCIIPopTab(viewer)); in PetscPartitionerView_Multistage() 146 …istage_CreateStages(MPI_Comm comm, const PetscInt *options, PetscInt *nlevels, MPI_Group *levels[]) in PetscPartitionerMultistage_CreateStages() argument 163 *levels = lgroup; in PetscPartitionerMultistage_CreateStages() 202 *levels = lgroup; in PetscPartitionerMultistage_CreateStages() 232 *levels = lgroup; in PetscPartitionerMultistage_CreateStages() 276 *levels = lgroup; in PetscPartitionerMultistage_CreateStages() 299 PetscInt nstages = p->levels; in PetscPartitionerReset_Multistage() [all …]
|
| /petsc/src/snes/impls/fas/ |
| H A D | fasfunc.c | 57 SNESFASSetLevels - Sets the number of levels to use with `SNESFAS`. 62 . levels - the number of levels 69 If the number of levels is one then the solver uses the `-fas_levels` prefix 74 PetscErrorCode SNESFASSetLevels(SNES snes, PetscInt levels, MPI_Comm *comms) in SNESFASSetLevels() argument 87 if (levels == fas->levels) { in SNESFASSetLevels() 90 /* user has changed the number of levels; reset */ in SNESFASSetLevels() 92 /* destroy any coarser levels if necessary */ in SNESFASSetLevels() 99 PetscCall(PetscObjectComposedDataSetInt((PetscObject)snes, PetscMGLevelId, levels - 1)); in SNESFASSetLevels() 100 for (i = levels - 1; i >= 0; i--) { in SNESFASSetLevels() 103 fas->levels = levels; in SNESFASSetLevels() [all …]
|
| H A D | fasimpls.h | 10 PetscInt levels; /* if level + 1 = levels; we're the last turtle */ member 30 PetscBool usedmfornumberoflevels; /* uses a DM to generate a number of the levels */
|
| H A D | fas.c | 89 if (dm_levels > fas->levels) { in SNESSetUp_FAS() 90 /* reset the number of levels */ in SNESSetUp_FAS() 139 …if (fas->smoothd && fas->level != fas->levels - 1) PetscCall(SNESSetFunction(fas->smoothd, NULL, S… in SNESSetUp_FAS() 140 …if (fas->smoothu && fas->level != fas->levels - 1) PetscCall(SNESSetFunction(fas->smoothu, NULL, S… in SNESSetUp_FAS() 155 if (fas->level != fas->levels - 1) { in SNESSetUp_FAS() 183 PetscInt levels = 1; in SNESSetFromOptions_FAS() local 196 /* number of levels -- only process most options on the finest level */ in SNESSetFromOptions_FAS() 198 …scCall(PetscOptionsInt("-snes_fas_levels", "Number of Levels", "SNESFASSetLevels", levels, &levels… in SNESSetFromOptions_FAS() 200 PetscCall(DMGetRefineLevel(snes->dm, &levels)); in SNESSetFromOptions_FAS() 201 levels++; in SNESSetFromOptions_FAS() [all …]
|
| /petsc/src/ksp/pc/impls/mg/ftn-custom/ |
| H A D | zmgf.c | 10 PETSC_EXTERN void pcmgsetlevels_(PC *pc, PetscInt *levels, MPI_Fint fcomms[], PetscErrorCode *ierr) in pcmgsetlevels_() argument 15 *ierr = PetscMalloc1(*levels, &ccomms); in pcmgsetlevels_() 17 for (PetscInt i = 0; i < *levels; i++) ccomms[i] = MPI_Comm_f2c(fcomms[i]); in pcmgsetlevels_() 19 *ierr = PCMGSetLevels(*pc, *levels, ccomms); in pcmgsetlevels_()
|
| /petsc/src/ksp/pc/impls/factor/ |
| H A D | factimpl.c | 86 PetscErrorCode PCFactorGetLevels_Factor(PC pc, PetscInt *levels) in PCFactorGetLevels_Factor() argument 91 *levels = ilu->info.levels; in PCFactorGetLevels_Factor() 122 PetscErrorCode PCFactorSetLevels_Factor(PC pc, PetscInt levels) in PCFactorSetLevels_Factor() argument 127 if (!pc->setupcalled) ilu->info.levels = levels; in PCFactorSetLevels_Factor() 128 else if (ilu->info.levels != levels) { in PCFactorSetLevels_Factor() 131 ilu->info.levels = levels; in PCFactorSetLevels_Factor() 132 …tscObjectComm((PetscObject)pc), PETSC_ERR_ARG_WRONGSTATE, "Cannot change levels after use with ILU… in PCFactorSetLevels_Factor() 281 } else if (factor->info.levels == 1) { in PCView_Factor() 282 …scViewerASCIIPrintf(viewer, " %" PetscInt_FMT " level of fill\n", (PetscInt)factor->info.levels)); in PCView_Factor() 284 …PetscViewerASCIIPrintf(viewer, " %" PetscInt_FMT " levels of fill\n", (PetscInt)factor->info.leve… in PCView_Factor() [all …]
|
| H A D | factor.c | 293 PCFactorGetLevels - Gets the number of levels of fill to use. 301 . levels - number of levels of fill 307 PetscErrorCode PCFactorGetLevels(PC pc, PetscInt *levels) in PCFactorGetLevels() argument 311 PetscUseMethod(pc, "PCFactorGetLevels_C", (PC, PetscInt *), (pc, levels)); in PCFactorGetLevels() 316 PCFactorSetLevels - Sets the number of levels of fill to use. 322 - levels - number of levels of fill 325 . -pc_factor_levels <levels> - Sets fill level 331 PetscErrorCode PCFactorSetLevels(PC pc, PetscInt levels) in PCFactorSetLevels() argument 335 …PetscCheck(levels >= 0, PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_OUTOFRANGE, "negative leve… in PCFactorSetLevels() 336 PetscValidLogicalCollectiveInt(pc, levels, 2); in PCFactorSetLevels() [all …]
|
| /petsc/src/ksp/pc/impls/hpddm/ |
| H A D | pchpddm.cxx | 28 if (data->levels) { in PCReset_HPDDM() 29 for (PetscInt i = 0; i < PETSC_PCHPDDM_MAXLEVELS && data->levels[i]; ++i) { in PCReset_HPDDM() 30 PetscCall(KSPDestroy(&data->levels[i]->ksp)); in PCReset_HPDDM() 31 PetscCall(PCDestroy(&data->levels[i]->pc)); in PCReset_HPDDM() 32 PetscCall(PetscFree(data->levels[i])); in PCReset_HPDDM() 34 PetscCall(PetscFree(data->levels)); in PCReset_HPDDM() 329 PC_HPDDM_Level **levels = data->levels; in PCSetFromOptions_HPDDM() local 338 if (!data->levels) { in PCSetFromOptions_HPDDM() 339 PetscCall(PetscCalloc1(PETSC_PCHPDDM_MAXLEVELS, &levels)); in PCSetFromOptions_HPDDM() 340 data->levels = levels; in PCSetFromOptions_HPDDM() [all …]
|
| /petsc/include/petsc/private/ |
| H A D | pcmgimpl.h | 12 Level (0) is always the coarsest level and Level (levels-1) is the finest. 17 PetscInt levels; /* number of active levels used */ member 51 This data structure is shared by all the levels. 56 PetscInt maxlevels; /* total number of levels allocated */ 58 …PetscBool usedmfornumberoflevels; /* sets the number of levels by getting this information … 69 PC_MG_Levels **levels; member
|
| /petsc/doc/ |
| H A D | build_man_index.py | 21 def printindex(outfilename, headfilename, levels, titles, tables): argument 41 for i, level in enumerate(levels): 149 # and create and return a table for it, wrt levels specified. 150 def createtable(dirname,levels,secname,editbranch): argument 159 for level in levels: table.append([]) 163 if level.lower() in levels: 164 table[levels.index(level.lower())].append(filename) 225 levels = ['beginner','intermediate','advanced','developer','deprecated','none'] 246 table = createtable(dirname,levels,secname,edit_branch) 249 printindex(outfilename,headfilename,levels,titles,table)
|
| /petsc/src/mat/impls/aij/seq/bas/ |
| H A D | basfactor.c | 14 PetscReal fill = info->fill, levels = info->levels; in MatICCFactorSymbolic_SeqAIJ_Bas() local 26 if (!levels && perm_identity) { in MatICCFactorSymbolic_SeqAIJ_Bas() 38 } else { /* case: levels>0 || (levels=0 && !perm_identity) */ in MatICCFactorSymbolic_SeqAIJ_Bas() 49 PetscCall(spbas_power(Pattern_0, (int)levels + 1, &Pattern_P)); in MatICCFactorSymbolic_SeqAIJ_Bas() 58 } /* end of case: levels>0 || (levels=0 && !perm_identity) */ in MatICCFactorSymbolic_SeqAIJ_Bas()
|
| /petsc/src/dm/impls/stag/tutorials/ |
| H A D | ex4.c | 5 "-levels: number of grids to create, by coarsening\n" 35 LevelCtx *levels; member 94 NULL, NULL, &ctx->levels[ctx->n_levels - 1]->dm_stokes)); in main() 97 … DMSTAG_STENCIL_BOX, 1, NULL, NULL, NULL, &ctx->levels[ctx->n_levels - 1]->dm_stokes)); in main() 99 dm_stokes = ctx->levels[ctx->n_levels - 1]->dm_stokes; in main() 105 …if (ctx->dim == 2) PetscCall(DMStagCreateCompatibleDMStag(dm_stokes, 2, 0, 1, 0, &ctx->levels[ctx-… in main() 106 …= 3) PetscCall(DMStagCreateCompatibleDMStag(dm_stokes, 0, 2, 0, 1, &ctx->levels[ctx->n_levels - 1]… in main() 108 dm_coefficients = ctx->levels[ctx->n_levels - 1]->dm_coefficients; in main() 114 …PetscCall(DMCoarsen(ctx->levels[level]->dm_stokes, MPI_COMM_NULL, &ctx->levels[level - 1]->dm_stok… in main() 115 …PetscCall(DMCoarsen(ctx->levels[level]->dm_coefficients, MPI_COMM_NULL, &ctx->levels[level - 1]->d… in main() [all …]
|
| /petsc/src/dm/impls/moab/tests/ |
| H A D | ex3.cxx | 14 PetscInt nlevels; /* Number of levels in mesh hierarchy */ 39 …PetscCall(PetscOptionsBoundedInt("-levels", "Number of levels in the hierarchy", "ex3.cxx", option… in ProcessOptions() 107 …tscPrintf(comm, "Generate the MOAB mesh hierarchy with %" PetscInt_FMT " levels.\n", user.nlevels)… in main() 152 args: -debug -n 2 -dim 2 -levels 2 -simplex 156 args: -debug -n 2 -dim 3 -levels 2 161 args: -debug -n 2 -dim 3 -ghost 1 -levels 2
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex35.cxx | 18 mpiexec -n $NP ./ex35 -problem 1 -error -n 16 -levels 5 -pc_type gamg 19 mpiexec -n $NP ./ex35 -problem 1 -error -n 32 -levels 4 -pc_type gamg 20 mpiexec -n $NP ./ex35 -problem 1 -error -n 64 -levels 3 -pc_type mg 21 mpiexec -n $NP ./ex35 -problem 1 -error -n 128 -levels 2 -pc_type mg 22 mpiexec -n $NP ./ex35 -problem 1 -error -n 256 -levels 1 -mg 23 mpiexec -n $NP ./ex35 -problem 1 -error -n 512 -levels 0 -mg 27 mpiexec -n $NP ./ex35 -problem 1 -file ./external_mesh.h5m -levels 2 -error -pc_type mg 53 mpiexec -n $NP ./ex35 -problem 2 -file ./external_mesh.h5m -levels 1 -pc_type gamg 71 mpiexec -n $NP ./ex35 -problem 3 -file input/square_with_hole.h5m -mg -levels 2 -io -ksp_monitor 78 Usage: ./ex35 -problem 1 -error -n 4 -levels 3 -mg\n \ [all …]
|
| H A D | ex36.cxx | 24 mpiexec -n $NP ./ex36 -problem 1 -error -n 4 -levels 5 -pc_type gamg 25 mpiexec -n $NP ./ex36 -problem 1 -error -n 8 -levels 4 -pc_type gamg 26 mpiexec -n $NP ./ex36 -problem 1 -error -n 16 -levels 3 -pc_type mg 27 mpiexec -n $NP ./ex36 -problem 1 -error -n 32 -levels 2 -pc_type mg 28 mpiexec -n $NP ./ex36 -problem 1 -error -n 64 -levels 1 -mg 29 mpiexec -n $NP ./ex36 -problem 1 -error -n 128 -levels 0 -mg 33 mpiexec -n $NP ./ex36 -problem 1 -file ./external_mesh.h5m -levels 2 -error -pc_type mg 59 mpiexec -n $NP ./ex36 -problem 2 -file ./external_mesh.h5m -levels 1 -pc_type gamg 135 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Number of mesh hierarchy levels: %d\n", user.nlevels)); in main() 538 …PetscCall(PetscOptionsInt("-levels", "Number of levels in the multigrid hierarchy", "ex36.cxx", us… in InitializeOptions() [all …]
|
| /petsc/src/snes/tutorials/output/ |
| H A D | ex19_6.out | 65 0 levels of fill 93 0 levels of fill 121 0 levels of fill 149 0 levels of fill
|
| H A D | ex5_7_ksp_view_pre.out | 12 type is MULTIPLICATIVE, levels=0 cycles=unknown 19 Number of levels of aggressive coarsening 1 43 type is MULTIPLICATIVE, levels=2 cycles=v 50 Number of levels of aggressive coarsening 1 144 type is MULTIPLICATIVE, levels=2 cycles=v 151 Number of levels of aggressive coarsening 1 255 type is MULTIPLICATIVE, levels=2 cycles=v 262 Number of levels of aggressive coarsening 1
|
| /petsc/src/dm/impls/moab/ |
| H A D | dmmbmg.cxx | 25 + nlevels - The number of levels of refinement needed to generate the hierarchy 102 + nlevels - The number of levels of refinement needed to generate the hierarchy 128 + nlevels - The number of levels of refinement needed to generate the hierarchy 158 + interpl - The interpolation operator for transferring data between the levels 187 …ix %" PetscInt_FMT " X %" PetscInt_FMT " to apply transformation between levels %" PetscInt_FMT " … in DMCreateInterpolation_Moab() 287 …/* Get coordinates for connectivity entities in canonical order for both coarse and finer levels */ in DMCreateInterpolation_Moab() 326 …/* Get coordinates for connectivity entities in canonical order for both coarse and finer levels */ in DMCreateInterpolation_Moab() 337 /* Compute the actual interpolation weights when projecting solution/residual between levels */ in DMCreateInterpolation_Moab() 357 between the levels should be evaluated correctly to preserve convergence of GMG. in DMCreateInterpolation_Moab() 402 + nlevels - The number of levels of refinement needed to generate the hierarchy [all …]
|
| /petsc/src/ksp/pc/tests/output/ |
| H A D | ex9f_1.out | 11 0 levels of fill 44 0 levels of fill 72 0 levels of fill
|
| /petsc/src/ksp/ksp/tests/output/ |
| H A D | ex3_hypre.out | 14 Maximum number of levels 25 20 Number of levels of aggressive coarsening 0
|
| H A D | ex3_hypre_alt.out | 14 Maximum number of levels 25 20 Number of levels of aggressive coarsening 0
|