| /petsc/src/dm/interface/ |
| H A D | dmget.c | 41 DM vdm; in DMGetLocalVector() local 46 PetscCall(VecGetDM(*g, &vdm)); in DMGetLocalVector() 47 PetscCheck(!vdm, PetscObjectComm((PetscObject)vdm), PETSC_ERR_LIB, "Invalid vector"); in DMGetLocalVector() 90 DM vdm; in DMRestoreLocalVector() local 92 PetscCall(VecGetDM(*g, &vdm)); in DMRestoreLocalVector() 93 …PetscCheck(vdm == dm, PetscObjectComm((PetscObject)dm), PETSC_ERR_ARG_WRONGSTATE, "Invalid vector"… in DMRestoreLocalVector() 150 DM vdm; in DMGetGlobalVector() local 155 PetscCall(VecGetDM(*g, &vdm)); in DMGetGlobalVector() 156 PetscCheck(!vdm, PetscObjectComm((PetscObject)vdm), PETSC_ERR_LIB, "Invalid vector"); in DMGetGlobalVector() 201 DM vdm; in DMClearGlobalVectors() local [all …]
|
| H A D | dm.c | 1041 DM vdm; in DMCreateGlobalVector() local 1043 PetscCall(VecGetDM(*vec, &vdm)); in DMCreateGlobalVector() 1044 …PetscCheck(vdm, PETSC_COMM_SELF, PETSC_ERR_PLIB, "DM type '%s' did not attach the DM to the vector… in DMCreateGlobalVector() 1075 DM vdm; in DMCreateLocalVector() local 1077 PetscCall(VecGetDM(*vec, &vdm)); in DMCreateLocalVector() 1078 …PetscCheck(vdm, PETSC_COMM_SELF, PETSC_ERR_LIB, "DM type '%s' did not attach the DM to the vector"… in DMCreateLocalVector()
|
| /petsc/src/ts/tutorials/hamiltonian/ |
| H A D | ex3.c | 396 static PetscErrorCode CreateVelocityDM(DM sw, DM *vdm) in CreateVelocityDM() argument 414 *vdm = ctx->plex[0]; in CreateVelocityDM() 415 PetscCall(PetscObjectReference((PetscObject)*vdm)); in CreateVelocityDM() 417 PetscCall(PetscObjectSetName((PetscObject)*vdm, "velocity")); in CreateVelocityDM() 419 PetscCall(DMCreate(PETSC_COMM_SELF, vdm)); in CreateVelocityDM() 420 PetscCall(DMSetType(*vdm, DMPLEX)); in CreateVelocityDM() 421 PetscCall(DMPlexSetOptionsPrefix(*vdm, prefix)); in CreateVelocityDM() 422 PetscCall(DMSetFromOptions(*vdm)); in CreateVelocityDM() 423 PetscCall(PetscObjectSetName((PetscObject)*vdm, "velocity")); in CreateVelocityDM() 425 PetscCall(DMViewFromOptions(*vdm, NULL, "-dm_view")); in CreateVelocityDM() [all …]
|
| H A D | ex2.c | 298 DM vdm; in SetupContext() local 307 PetscCall(DMSwarmCellDMGetDM(celldm, &vdm)); in SetupContext() 308 PetscCall(DMGetDimension(vdm, &dim)); in SetupContext() 309 PetscCall(DMGetBoundingBox(vdm, dmboxlower, dmboxupper)); in SetupContext() 456 DM vdm; in computeVelocityFEMMoments() local 463 PetscCall(DMSwarmCellDMGetDM(celldm, &vdm)); in computeVelocityFEMMoments() 468 PetscCall(PetscObjectQuery((PetscObject)sw, "__vdm__", (PetscObject *)&vdm)); in computeVelocityFEMMoments() 480 PetscCall(DMGetBoundingBox(vdm, vmin, vmax)); in computeVelocityFEMMoments() 491 PetscCall(DMGetCoordinatesLocal(vdm, &coordinatesLocal)); in computeVelocityFEMMoments() 492 PetscCall(DMGetCoordinates(vdm, &coordinates)); in computeVelocityFEMMoments() [all …]
|
| H A D | ex4.c | 383 DM vdm; in SetupContext() local 392 PetscCall(DMSwarmCellDMGetDM(celldm, &vdm)); in SetupContext() 393 PetscCall(DMGetDimension(vdm, &dim)); in SetupContext() 394 PetscCall(DMGetBoundingBox(vdm, dmboxlower, dmboxupper)); in SetupContext() 618 DM vdm; in computeVelocityFEMMoments() local 625 PetscCall(DMSwarmCellDMGetDM(celldm, &vdm)); in computeVelocityFEMMoments() 626 PetscCall(DMGetGlobalVector(vdm, &u[0])); in computeVelocityFEMMoments() 627 PetscCall(DMSwarmProjectFields(sw, vdm, 1, fields, u, SCATTER_FORWARD)); in computeVelocityFEMMoments() 628 PetscCall(DMPlexComputeMoments(vdm, u[0], moments)); in computeVelocityFEMMoments() 629 PetscCall(DMRestoreGlobalVector(vdm, &u[0])); in computeVelocityFEMMoments() [all …]
|
| /petsc/src/dm/impls/shell/ |
| H A D | dmshell.c | 398 DM vdm; in DMShellSetGlobalVector() local 405 PetscCall(VecGetDM(X, &vdm)); in DMShellSetGlobalVector() 416 if (vdm == dm) PetscFunctionReturn(PETSC_SUCCESS); in DMShellSetGlobalVector() 490 DM vdm; in DMShellSetLocalVector() local 497 PetscCall(VecGetDM(X, &vdm)); in DMShellSetLocalVector() 508 if (vdm == dm) PetscFunctionReturn(PETSC_SUCCESS); in DMShellSetLocalVector()
|
| /petsc/src/ts/tutorials/ |
| H A D | ex77.c | 432 DM sdm, dm, vdm; in FreeStreaming() local 448 PetscCall(DMCreateSubDM(dm, 1, vf, &vis, &vdm)); in FreeStreaming() 450 PetscCall(DMGetLocalVector(vdm, &locvel)); in FreeStreaming() 451 PetscCall(DMPlexInsertBoundaryValues(vdm, PETSC_TRUE, locvel, adv->ti, NULL, NULL, NULL)); in FreeStreaming() 452 PetscCall(DMGlobalToLocalBegin(vdm, vel, INSERT_VALUES, locvel)); in FreeStreaming() 453 PetscCall(DMGlobalToLocalEnd(vdm, vel, INSERT_VALUES, locvel)); in FreeStreaming() 465 PetscCall(DMInterpolationSetUp(ictx, vdm, PETSC_FALSE, PETSC_TRUE)); in FreeStreaming() 467 PetscCall(DMInterpolationEvaluate(ictx, vdm, locvel, pvel)); in FreeStreaming() 469 PetscCall(DMRestoreLocalVector(vdm, &locvel)); in FreeStreaming() 470 PetscCall(DMDestroy(&vdm)); in FreeStreaming()
|
| H A D | ex30.c | 2086 DM vdm; in Monitor() local 2089 PetscCall(VecGetDM(diagnostic, &vdm)); in Monitor() 2092 PetscCall(DMView(vdm, ctx->view_hdf5_ctx->viewer)); in Monitor() 2095 PetscCall(DMGetOutputSequenceNumber(vdm, &seqnum, NULL)); in Monitor() 2096 PetscCall(DMSetOutputSequenceNumber(vdm, seqnum + 1, time)); in Monitor()
|
| /petsc/src/ksp/ksp/utils/dm/ |
| H A D | dmproject.c | 1010 DM xdm, vdm; in DMSwarmRemap_Colella_Internal() local 1044 PetscCall(PetscObjectQuery((PetscObject)sw, "__vdm__", (PetscObject *)&vdm)); in DMSwarmRemap_Colella_Internal() 1045 PetscCall(DMGetCoordinateDim(vdm, &vcdim)); in DMSwarmRemap_Colella_Internal() 1046 PetscCall(DMGetBoundingBox(vdm, vmin, vmax)); in DMSwarmRemap_Colella_Internal() 1047 PetscCall(DMPlexGetHeightStratum(vdm, 0, &vcStart, &vcEnd)); in DMSwarmRemap_Colella_Internal() 1048 PetscCall(DMPlexGetCellCoordinates(vdm, vcStart, &isDG, &Nc, &array, &coords)); in DMSwarmRemap_Colella_Internal() 1051 PetscCall(DMPlexRestoreCellCoordinates(vdm, vcStart, &isDG, &Nc, &array, &coords)); in DMSwarmRemap_Colella_Internal() 1071 PetscCall(DMGetBoundingBox(vdm, vmin, vmax)); in DMSwarmRemap_Colella_Internal() 1171 DM xdm, vdm, rdm; in DMSwarmRemap_PFAK_Internal() local 1183 PetscCall(DMSwarmCellDMGetDM(rcelldm, &vdm)); in DMSwarmRemap_PFAK_Internal() [all …]
|
| /petsc/src/ts/utils/dmplexlandau/ |
| H A D | plexland.c | 2230 DM vdm; in DMPlexLandauAccess() local 2231 PetscCall(DMCreateSubDM(ctx->plex[grid], 1, vf, &vis, &vdm)); in DMPlexLandauAccess() 2232 PetscCall(DMSetApplicationContext(vdm, ctx)); // the user might want this in DMPlexLandauAccess() 2233 PetscCall(DMCreateGlobalVector(vdm, &vec)); in DMPlexLandauAccess() 2239 PetscCall(func(vdm, vec, i0, grid, b_id, user_ctx)); in DMPlexLandauAccess() 2251 PetscCall(DMDestroy(&vdm)); in DMPlexLandauAccess()
|