Lines Matching refs:dmc
306 static PetscErrorCode CreateCoarseProjection(DM dmc, DM dmf, Mat *Pi) in CreateCoarseProjection() argument
313 PetscCall(DMCreateGlobalVector(dmc, &ctx->tmpcoarse)); in CreateCoarseProjection()
319 PetscCall(DMCreateMassMatrix(dmc, dmc, &ctx->Mcoarse)); in CreateCoarseProjection()
321 PetscCall(DMCreateInterpolation(dmc, dmf, &ctx->Ifine, &ctx->Iscale)); in CreateCoarseProjection()
322 PetscCall(KSPCreate(PetscObjectComm((PetscObject)dmc), &ctx->kspCoarse)); in CreateCoarseProjection()
326 PetscCall(MatCreateShell(PetscObjectComm((PetscObject)dmc), m, n, M, N, ctx, Pi)); in CreateCoarseProjection()
357 DM dmcdg, dmc; in QuasiInterpolate() local
374 PetscCall(VecGetDM(y, &dmc)); in QuasiInterpolate()
375 PetscCall(DMGetLocalVector(dmc, &ly)); in QuasiInterpolate()
377 PetscCall(DMLocalToGlobalBegin(dmc, ly, INSERT_VALUES, y)); in QuasiInterpolate()
378 PetscCall(DMLocalToGlobalEnd(dmc, ly, INSERT_VALUES, y)); in QuasiInterpolate()
379 PetscCall(DMRestoreLocalVector(dmc, &ly)); in QuasiInterpolate()
383 static PetscErrorCode CreateQuasiInterpolator(DM dmc, DM dmf, Mat *P) in CreateQuasiInterpolator() argument
394 PetscCall(DMGetGlobalVector(dmc, &x)); in CreateQuasiInterpolator()
400 PetscCall(DMRestoreGlobalVector(dmc, &x)); in CreateQuasiInterpolator()
415 PetscCall(DMClone(dmc, &dmcdg)); in CreateQuasiInterpolator()
428 PetscCall(MatCreateShell(PetscObjectComm((PetscObject)dmc), m, n, M, N, ctx, P)); in CreateQuasiInterpolator()
436 DM dmc; in CoarseTest() local
442 PetscCall(DMCreate(PetscObjectComm((PetscObject)dm), &dmc)); in CoarseTest()
443 PetscCall(DMSetType(dmc, DMPLEX)); in CoarseTest()
444 PetscCall(PetscObjectSetOptionsPrefix((PetscObject)dmc, "coarse_")); in CoarseTest()
445 PetscCall(DMSetApplicationContext(dmc, user)); in CoarseTest()
446 PetscCall(DMSetFromOptions(dmc)); in CoarseTest()
447 PetscCall(DMViewFromOptions(dmc, NULL, "-dm_view")); in CoarseTest()
449 PetscCall(SetupDiscretization(dmc, "potential", SetupPrimalProblem, user)); in CoarseTest()
450 PetscCall(DMCreateGlobalVector(dmc, &uc)); in CoarseTest()
454 PetscCall(CreateQuasiInterpolator(dmc, dm, &P)); in CoarseTest()
462 PetscCall(DMCreateInterpolation(dmc, dm, &In, &sc)); in CoarseTest()
473 PetscCall(DMDestroy(&dmc)); in CoarseTest()