Home
last modified time | relevance | path

Searched refs:dmSol (Results 1 – 9 of 9) sorted by relevance

/petsc/src/dm/impls/stag/tests/ !
H A Dex5.c19 DM dmSol; in main() local
30 …StagCreate1d(PETSC_COMM_WORLD, DM_BOUNDARY_GHOSTED, 3, 1, 1, DMSTAG_STENCIL_BOX, 1, NULL, &dmSol)); in main()
31 PetscCall(DMSetFromOptions(dmSol)); in main()
32 PetscCall(DMSetUp(dmSol)); in main()
35 PetscCall(DMCreateGlobalVector(dmSol, &rhs)); in main()
36 PetscCall(DMCreateGlobalVector(dmSol, &solRef)); in main()
37 PetscCall(DMGetLocalVector(dmSol, &solRefLocal)); in main()
38 PetscCall(DMGetLocalVector(dmSol, &rhsLocal)); in main()
39 PetscCall(DMStagVecGetArray(dmSol, solRefLocal, &arrSol)); in main()
41 PetscCall(DMStagGetCorners(dmSol, &start, NULL, NULL, &n, NULL, NULL, &nExtra, NULL, NULL)); in main()
[all …]
H A Dex11.c15 DM dmSol; in main() local
33 …D, 3, 3, PETSC_DECIDE, PETSC_DECIDE, dof0, dof1, dof2, DMSTAG_STENCIL_BOX, 1, NULL, NULL, &dmSol)); in main()
34 PetscCall(DMSetFromOptions(dmSol)); in main()
35 PetscCall(DMSetUp(dmSol)); in main()
38 PetscCall(DMCreateGlobalVector(dmSol, &rhs)); in main()
39 PetscCall(DMCreateGlobalVector(dmSol, &solRef)); in main()
40 PetscCall(DMGetLocalVector(dmSol, &solRefLocal)); in main()
41 PetscCall(DMGetLocalVector(dmSol, &rhsLocal)); in main()
42 PetscCall(DMStagVecGetArray(dmSol, solRefLocal, &arrSol)); in main()
44 …PetscCall(DMStagGetCorners(dmSol, &startx, &starty, NULL, &nx, &ny, NULL, &nExtrax, &nExtray, NULL… in main()
[all …]
H A Dex8.c15 DM dmSol; in main() local
33 …SC_DECIDE, PETSC_DECIDE, dof0, dof1, dof2, dof3, DMSTAG_STENCIL_BOX, 1, NULL, NULL, NULL, &dmSol)); in main()
34 PetscCall(DMSetFromOptions(dmSol)); in main()
35 PetscCall(DMSetUp(dmSol)); in main()
38 PetscCall(DMCreateGlobalVector(dmSol, &rhs)); in main()
39 PetscCall(DMCreateGlobalVector(dmSol, &solRef)); in main()
40 PetscCall(DMGetLocalVector(dmSol, &solRefLocal)); in main()
41 PetscCall(DMGetLocalVector(dmSol, &rhsLocal)); in main()
42 PetscCall(DMStagVecGetArray(dmSol, solRefLocal, &arrSol)); in main()
44 …PetscCall(DMStagGetCorners(dmSol, &startx, &starty, &startz, &nx, &ny, &nz, &nExtrax, &nExtray, &n… in main()
[all …]
H A Dex18.c80 DM dmSol, dmSolc, dmuu, dmuuc; in main() local
107 …TSC_DECIDE, PETSC_DECIDE, dof0, dof1, dof2, DMSTAG_STENCIL_BOX, stencilWidth, NULL, NULL, &dmSol)); in main()
108 PetscCall(DMSetFromOptions(dmSol)); in main()
109 PetscCall(DMSetUp(dmSol)); in main()
113 PetscCall(DMCoarsen(dmSol, MPI_COMM_NULL, &dmSolc)); in main()
118 PetscCall(DMStagCreateCompatibleDMStag(dmSol, 0, 1, 0, 0, &dmuu)); /* vel-only */ in main()
124 PetscCall(DMStagSetUniformCoordinatesProduct(dmSol, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0)); in main()
141 PetscCall(DMStagCreateISFromStencils(dmSol, 2, stencil_set, &isuf)); in main()
142 PetscCall(DMStagCreateISFromStencils(dmSol, 1, &stencil_set[2], &ispf)); in main()
151 PetscCall(CreateSystem(dmSol, &A, &rhs)); in main()
[all …]
H A Dex30.c41 DM dmSol; in main() local
49 …PETSC_DECIDE, dof0, dof1, dof2, dof3, DMSTAG_STENCIL_BOX, stencilWidth, NULL, NULL, NULL, &dmSol)); in main()
50 PetscCall(DMSetFromOptions(dmSol)); in main()
51 PetscCall(DMSetUp(dmSol)); in main()
52 PetscCall(DMStagSetUniformCoordinatesExplicit(dmSol, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0)); in main()
54 PetscCall(CreateMat(dmSol, &A)); in main()
55 PetscCall(CheckMat(dmSol, A)); in main()
57 PetscCall(DMDestroy(&dmSol)); in main()
62 static PetscErrorCode CreateMat(DM dmSol, Mat *pA) in CreateMat() argument
74 PetscCall(DMCreateMatrix(dmSol, pA)); in CreateMat()
[all …]
/petsc/src/dm/impls/stag/tutorials/ !
H A Dex1.c84 DM dmSol, dmForcing; in main() local
106 …(DMStagCreate1d(PETSC_COMM_WORLD, DM_BOUNDARY_NONE, 3, 1, 1, DMSTAG_STENCIL_BOX, 1, NULL, &dmSol)); in main()
107 PetscCall(DMSetFromOptions(dmSol)); in main()
108 PetscCall(DMSetUp(dmSol)); in main()
112 PetscCall(DMStagSetUniformCoordinatesExplicit(dmSol, 0.0, domainSize, 0.0, 0.0, 0.0, 0.0)); in main()
115 PetscCall(DMStagGetBoundaryTypes(dmSol, &boundary, NULL, NULL)); in main()
131 PetscCall(DMCreateGlobalVector(dmSol, &solRef)); in main()
132 PetscCall(DMGetLocalVector(dmSol, &solRefLocal)); in main()
133 PetscCall(DMStagVecGetArray(dmSol, solRefLocal, &arrSol)); in main()
134 PetscCall(DMGetCoordinateDM(dmSol, &dmCoordSol)); in main()
[all …]
H A Dex2.c78 DM dmSol; in main() local
95 …TSC_DECIDE, PETSC_DECIDE, dof0, dof1, dof2, DMSTAG_STENCIL_BOX, stencilWidth, NULL, NULL, &dmSol)); in main()
96 PetscCall(DMSetFromOptions(dmSol)); in main()
97 PetscCall(DMSetUp(dmSol)); in main()
101 PetscCall(DMStagSetUniformCoordinatesProduct(dmSol, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0)); in main()
104 PetscCall(CreateReferenceSolution(dmSol, &solRef)); in main()
107 PetscCall(CreateSystem(dmSol, &A, &rhs, pinPressure)); in main()
112 if (!pinPressure) PetscCall(AttachNullspace(dmSol, A)); in main()
116 PetscCall(DMCreateGlobalVector(dmSol, &sol)); in main()
135 PetscCall(DMDestroy(&dmSol)); in main()
[all …]
H A Dex3.c107 DM dmSol; in main() local
124 …PETSC_DECIDE, dof0, dof1, dof2, dof3, DMSTAG_STENCIL_BOX, stencilWidth, NULL, NULL, NULL, &dmSol)); in main()
125 PetscCall(DMSetFromOptions(dmSol)); in main()
126 PetscCall(DMSetUp(dmSol)); in main()
127 PetscCall(DMStagSetUniformCoordinatesExplicit(dmSol, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0)); in main()
133 PetscCall(CreateReferenceSolution(dmSol, &solRef)); in main()
136 PetscCall(CreateSystem(dmSol, &A, &rhs, pinPressure)); in main()
139 if (!pinPressure) PetscCall(AttachNullspace(dmSol, A)); in main()
142 PetscCall(DMCreateGlobalVector(dmSol, &sol)); in main()
161 PetscCall(DMDestroy(&dmSol)); in main()
[all …]
H A Dex4.c2010 static PetscErrorCode AttachNullspace(DM dmSol, Mat A) in AttachNullspace() argument
2018 PetscCall(DMStagCreateCompatibleDMStag(dmSol, 0, 0, 1, 0, &dmPressure)); in AttachNullspace()
2023 PetscCall(DMCreateGlobalVector(dmSol, &basis)); in AttachNullspace()
2024 PetscCall(DMStagMigrateVec(dmPressure, constantPressure, dmSol, basis)); in AttachNullspace()
2025 …PetscCall(MatNullSpaceCreate(PetscObjectComm((PetscObject)dmSol), PETSC_FALSE, 1, &basis, &matNull… in AttachNullspace()