Home
last modified time | relevance | path

Searched refs:ds (Results 1 – 25 of 103) sorted by relevance

12345

/petsc/src/dm/dt/interface/
H A Ddtds.c109 static PetscErrorCode PetscDSView_Ascii(PetscDS ds, PetscViewer viewer) in PetscDSView_Ascii() argument
116 PetscCall(PetscDSGetNumFields(ds, &Nf)); in PetscDSView_Ascii()
120 …er, " cell total dim %" PetscInt_FMT " total comp %" PetscInt_FMT "\n", ds->totDim, ds->totComp)); in PetscDSView_Ascii()
121 if (ds->isCohesive) PetscCall(PetscViewerASCIIPrintf(viewer, " cohesive cell\n")); in PetscDSView_Ascii()
130 PetscCall(PetscDSGetDiscretization(ds, f, &obj)); in PetscDSView_Ascii()
143 …} else SETERRQ(PetscObjectComm((PetscObject)ds), PETSC_ERR_ARG_WRONG, "Unknown discretization type… in PetscDSView_Ascii()
146 if (ds->implicit[f]) PetscCall(PetscViewerASCIIPrintf(viewer, " (implicit)")); in PetscDSView_Ascii()
152 PetscCall(PetscViewerASCIIPrintf(viewer, " %" PetscInt_FMT "-jet", ds->jetDegree[f])); in PetscDSView_Ascii()
160 for (b = ds->boundary; b; b = b->next) { in PetscDSView_Ascii()
209 PetscCall(PetscDSGetConstants(ds, &numConstants, &constants)); in PetscDSView_Ascii()
[all …]
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DDS.pyx18 self.obj = <PetscObject*> &self.ds
19 self.ds = NULL
38 CHKERR(PetscDSView(self.ds, vwr))
50 CHKERR(PetscDSDestroy(&self.ds))
73 CHKERR(PetscCLEAR(self.obj)); self.ds = newds
93 CHKERR(PetscDSSetType(self.ds, cval))
106 CHKERR(PetscDSGetType(self.ds, &cval))
119 CHKERR(PetscDSSetFromOptions(self.ds))
131 CHKERR(PetscDSSetUp(self.ds))
150 CHKERR(PetscDSGetSpatialDimension(self.ds, &dim))
[all …]
/petsc/src/dm/ftn-mod/
H A Dpetscdmmod.F9038 subroutine PetscDSGetTabulationSetSizes(ds, i, tab, ierr)
43 PetscDS ds
50 subroutine PetscDSGetTabulationSetPointers(ds, i, T, ierr)
55 PetscDS ds
110 subroutine PetscDSGetTabulation(ds, tab, ierr) argument
113 PetscDS ds
116 call PetscDSGetNumFields(ds, Nf, ierr)
121 call PetscDSGetTabulationSetSizes(ds, i, tab(i)%ptr, ierr)
124 call PetscDSGetTabulationSetPointers(ds, i, tab(i)%ptr%T, ierr)
129 subroutine PetscDSRestoreTabulation(ds, tab, ierr) argument
[all …]
/petsc/src/tao/complementarity/tutorials/
H A Dblackscholes.c105 PetscReal ds, dt; /* Discretization properties */ member
176 user.ds = user.es / (user.ms - 1); in main()
188 sval = (gxs + i) * user.ds; in main()
273 sval = (xs + i) * user->ds; in ComputeVariableBounds()
309 PetscReal dt = user->dt, ds = user->ds; in FormConstraints() local
341 …) * x[i] - Vt1[i] / dt + (c[i] / (4 * ds)) * (x[i + 1] - x[i - 1] + Vt1[i + 1] - Vt1[i - 1]) + (d[… in FormConstraints()
381 PetscReal dt = user->dt, ds = user->ds; in FormJacobian() local
407 val[0] = -c[i] / (4 * ds) + d[i] / (2 * ds * ds); in FormJacobian()
408 val[1] = 1.0 / dt + rate - d[i] / (ds * ds); in FormJacobian()
409 val[2] = c[i] / (4 * ds) + d[i] / (2 * ds * ds); in FormJacobian()
/petsc/src/dm/dt/fe/impls/basic/
H A Dfebasic.c162 PETSC_INTERN PetscErrorCode PetscFEIntegrate_Basic(PetscDS ds, PetscInt field, PetscInt Ne, PetscFE… in PetscFEIntegrate_Basic() argument
164 const PetscInt debug = ds->printIntegrate; in PetscFEIntegrate_Basic()
179 PetscCall(PetscDSGetObjective(ds, field, &obj_func)); in PetscFEIntegrate_Basic()
181 PetscCall(PetscDSGetDiscretization(ds, field, (PetscObject *)&fe)); in PetscFEIntegrate_Basic()
185 PetscCall(PetscDSGetNumFields(ds, &Nf)); in PetscFEIntegrate_Basic()
186 PetscCall(PetscDSGetTotalDimension(ds, &totDim)); in PetscFEIntegrate_Basic()
187 PetscCall(PetscDSGetComponentOffsets(ds, &uOff)); in PetscFEIntegrate_Basic()
188 PetscCall(PetscDSGetComponentDerivativeOffsets(ds, &uOff_x)); in PetscFEIntegrate_Basic()
189 PetscCall(PetscDSGetTabulation(ds, &T)); in PetscFEIntegrate_Basic()
190 PetscCall(PetscDSGetEvaluationArrays(ds, &u, NULL, &u_x)); in PetscFEIntegrate_Basic()
[all …]
/petsc/src/dm/impls/swarm/
H A Dswarmpic_da.c10 PetscReal ds[] = {0.0, 0.0, 0.0}; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular() local
25 for (d = 0; d < dim; d++) ds[d] = 2.0 / ((PetscReal)np[d]); in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular()
32 xi[dim * cnt + 0] = -1.0 + 0.5 * ds[d] + ii * ds[0]; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular()
41 xi[dim * cnt + 0] = -1.0 + 0.5 * ds[0] + ii * ds[0]; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular()
42 xi[dim * cnt + 1] = -1.0 + 0.5 * ds[1] + jj * ds[1]; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular()
53 xi[dim * cnt + 0] = -1.0 + 0.5 * ds[0] + ii * ds[0]; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular()
54 xi[dim * cnt + 1] = -1.0 + 0.5 * ds[1] + jj * ds[1]; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular()
55 xi[dim * cnt + 2] = -1.0 + 0.5 * ds[2] + kk * ds[2]; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular()
/petsc/src/ts/tutorials/
H A Dex46.c215 PetscDS ds; in SetupProblem() local
222 PetscCall(DMGetDS(dm, &ds)); in SetupProblem()
228 PetscCall(PetscDSSetResidual(ds, 0, f0_mms1_u, f1_u)); in SetupProblem()
229 PetscCall(PetscDSSetResidual(ds, 1, f0_p, f1_p)); in SetupProblem()
230 PetscCall(PetscDSSetJacobian(ds, 0, 0, g0_uu, g1_uu, NULL, g3_uu)); in SetupProblem()
231 PetscCall(PetscDSSetJacobian(ds, 0, 1, NULL, NULL, g2_up, NULL)); in SetupProblem()
232 PetscCall(PetscDSSetJacobian(ds, 1, 0, NULL, g1_pu, NULL, NULL)); in SetupProblem()
233 PetscCall(PetscDSSetExactSolution(ds, 0, mms1_u_2d, ctx)); in SetupProblem()
234 PetscCall(PetscDSSetExactSolution(ds, 1, mms1_p_2d, ctx)); in SetupProblem()
238 PetscCall(PetscDSSetResidual(ds, 0, f0_mms2_u, f1_u)); in SetupProblem()
[all …]
H A Dex47.c143 PetscDS ds; in SetupProblem() local
148 PetscCall(DMGetDS(dm, &ds)); in SetupProblem()
151 PetscCall(PetscDSSetResidual(ds, 0, f0_prim_phi, NULL)); in SetupProblem()
152 PetscCall(PetscDSSetJacobian(ds, 0, 0, g0_prim_phi, g1_prim_phi, NULL, NULL)); in SetupProblem()
155 PetscCall(PetscDSSetResidual(ds, 0, f0_ibp_phi, f1_ibp_phi)); in SetupProblem()
156 PetscCall(PetscDSSetJacobian(ds, 0, 0, g0_prim_phi, NULL, g2_ibp_phi, NULL)); in SetupProblem()
159 PetscCall(PetscDSSetExactSolution(ds, 0, analytic_phi, ctx)); in SetupProblem()
227 PetscDS ds; in MonitorError() local
244 PetscCall(DMGetDS(dm, &ds)); in MonitorError()
245 PetscCall(PetscDSGetExactSolution(ds, 0, &func[0], &ctxs[0])); in MonitorError()
[all …]
/petsc/src/dm/impls/plex/tutorials/
H A Dex4f90.F908 PetscDS :: ds
28 PetscCallA(DMGetDS(dm, ds, ierr))
29 PetscCallA(PetscDSGetTabulation(ds, tab, ierr))
34 PetscCallA(PetscDSRestoreTabulation(ds, tab, ierr))
36 PetscCallA(PetscDSGetDiscretization(ds, zero, obj, ierr))
/petsc/src/tao/tutorials/
H A Dex1.c156 PetscDS ds; in SetupProblem() local
161 PetscCall(DMGetDS(dm, &ds)); in SetupProblem()
162 PetscCall(PetscDSSetResidual(ds, 0, f0_u, f1_u)); in SetupProblem()
163 PetscCall(PetscDSSetResidual(ds, 1, f0_a, f1_a)); in SetupProblem()
164 PetscCall(PetscDSSetResidual(ds, 2, f0_l, f1_l)); in SetupProblem()
165 PetscCall(PetscDSSetJacobian(ds, 0, 0, g0_uu, NULL, NULL, NULL)); in SetupProblem()
166 PetscCall(PetscDSSetJacobian(ds, 0, 1, NULL, NULL, g2_ua, NULL)); in SetupProblem()
167 PetscCall(PetscDSSetJacobian(ds, 0, 2, NULL, NULL, NULL, g3_ul)); in SetupProblem()
168 PetscCall(PetscDSSetJacobian(ds, 1, 1, g0_aa, NULL, NULL, NULL)); in SetupProblem()
169 PetscCall(PetscDSSetJacobian(ds, 2, 1, NULL, NULL, g2_la, NULL)); in SetupProblem()
[all …]
H A Dex2.c151 PetscDS ds; in SetupProblem() local
156 PetscCall(DMGetDS(dm, &ds)); in SetupProblem()
157 PetscCall(PetscDSSetResidual(ds, 0, user->useDualPenalty == PETSC_TRUE ? f0_u_full : f0_u, f1_u)); in SetupProblem()
158 PetscCall(PetscDSSetResidual(ds, 1, f0_a, NULL)); in SetupProblem()
159 PetscCall(PetscDSSetResidual(ds, 2, f0_l, f1_l)); in SetupProblem()
160 …PetscCall(PetscDSSetJacobian(ds, 0, 0, user->useDualPenalty == PETSC_TRUE ? g0_uu_full : g0_uu, NU… in SetupProblem()
161 PetscCall(PetscDSSetJacobian(ds, 0, 2, NULL, NULL, NULL, g3_ul)); in SetupProblem()
162 PetscCall(PetscDSSetJacobian(ds, 1, 1, g0_aa, NULL, NULL, NULL)); in SetupProblem()
163 PetscCall(PetscDSSetJacobian(ds, 1, 2, g0_al, NULL, NULL, NULL)); in SetupProblem()
164 PetscCall(PetscDSSetJacobian(ds, 2, 1, g0_la, NULL, NULL, NULL)); in SetupProblem()
[all …]
/petsc/src/snes/tutorials/
H A Dex27.c377 PetscDS ds; in SetupPrimalProblem() local
384 PetscCall(DMGetDS(dm, &ds)); in SetupPrimalProblem()
387 PetscCall(PetscDSSetJacobian(ds, 0, 0, NULL, NULL, NULL, g3_primal_uu)); in SetupPrimalProblem()
391 PetscCall(PetscDSSetResidual(ds, 0, f0_quadratic_primal, f1_primal)); in SetupPrimalProblem()
398 …PetscCall(PetscDSGetBoundary(ds, bd, &wf, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NU… in SetupPrimalProblem()
406 …PetscCall(PetscDSGetBoundary(ds, bd, &wf, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NU… in SetupPrimalProblem()
409 PetscCall(PetscDSSetExactSolution(ds, 0, quadratic_u, user)); in SetupPrimalProblem()
412 PetscCall(PetscDSSetResidual(ds, 0, f0_trig_primal, f1_primal)); in SetupPrimalProblem()
419 …PetscCall(PetscDSGetBoundary(ds, bd, &wf, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NU… in SetupPrimalProblem()
427 …PetscCall(PetscDSGetBoundary(ds, bd, &wf, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NU… in SetupPrimalProblem()
[all …]
H A Dex24.c228 PetscDS ds; in SetupPrimalProblem() local
236 PetscCall(DMGetDS(dm, &ds)); in SetupPrimalProblem()
237 PetscCall(PetscDSSetResidual(ds, 0, f0_q, f1_q)); in SetupPrimalProblem()
238 PetscCall(PetscDSSetJacobian(ds, 0, 0, g0_qq, NULL, NULL, NULL)); in SetupPrimalProblem()
239 PetscCall(PetscDSSetJacobian(ds, 0, 1, NULL, NULL, g2_qu, NULL)); in SetupPrimalProblem()
240 PetscCall(PetscDSSetJacobian(ds, 1, 0, NULL, g1_uq, NULL, NULL)); in SetupPrimalProblem()
243 PetscCall(PetscDSSetResidual(ds, 1, f0_linear_u, NULL)); in SetupPrimalProblem()
245 …PetscCall(PetscDSGetBoundary(ds, bd, &wf, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NU… in SetupPrimalProblem()
247 PetscCall(PetscDSSetExactSolution(ds, 0, linear_q, user)); in SetupPrimalProblem()
248 PetscCall(PetscDSSetExactSolution(ds, 1, linear_u, user)); in SetupPrimalProblem()
[all …]
H A Dex17.c455 PetscDS ds; in SetupPrimalProblem() local
462 PetscCall(DMGetDS(dm, &ds)); in SetupPrimalProblem()
463 PetscCall(PetscDSGetWeakForm(ds, &wf)); in SetupPrimalProblem()
464 PetscCall(PetscDSGetSpatialDimension(ds, &dim)); in SetupPrimalProblem()
468 PetscCall(PetscDSSetResidual(ds, 0, f0_mass_u, NULL)); in SetupPrimalProblem()
469 PetscCall(PetscDSSetJacobian(ds, 0, 0, g0_mass_uu, NULL, NULL, NULL)); in SetupPrimalProblem()
479 …SETERRQ(PetscObjectComm((PetscObject)ds), PETSC_ERR_ARG_WRONG, "Invalid dimension: %" PetscInt_FMT… in SetupPrimalProblem()
483 PetscCall(PetscDSSetResidual(ds, 0, f0_vlap_quadratic_u, f1_vlap_u)); in SetupPrimalProblem()
484 PetscCall(PetscDSSetJacobian(ds, 0, 0, NULL, NULL, NULL, g3_vlap_uu)); in SetupPrimalProblem()
493 …SETERRQ(PetscObjectComm((PetscObject)ds), PETSC_ERR_ARG_WRONG, "Invalid dimension: %" PetscInt_FMT… in SetupPrimalProblem()
[all …]
H A Dex26.c119 PetscDS ds; in SetupPrimalProblem() local
124 PetscCall(DMGetDS(dm, &ds)); in SetupPrimalProblem()
127 PetscCall(PetscDSSetResidual(ds, 0, f0_trig_u, f1_u)); in SetupPrimalProblem()
128 PetscCall(PetscDSSetJacobian(ds, 0, 0, g0_uu, NULL, NULL, g3_uu)); in SetupPrimalProblem()
129 PetscCall(PetscDSSetExactSolution(ds, 0, trig_u, user)); in SetupPrimalProblem()
133 PetscCall(PetscDSSetResidual(ds, 0, f0_quad_u, f1_u)); in SetupPrimalProblem()
134 PetscCall(PetscDSSetJacobian(ds, 0, 0, g0_uu, NULL, NULL, g3_uu)); in SetupPrimalProblem()
135 PetscCall(PetscDSSetExactSolution(ds, 0, quad_u, user)); in SetupPrimalProblem()
175 PetscDS ds; in main() local
197 PetscCall(DMGetDS(dm, &ds)); in main()
[all …]
H A Dex18.c138 …PetscScalar t0, tn, ts, te, tw, an, as, ae, aw, dn, ds, de, dw, fn = 0.0, fs = 0.0, fe = 0.0, fw… in FormFunction() local
183 ds = PetscPowScalar(as, beta); in FormFunction()
184 fs = ds * (t0 - ts); in FormFunction()
206 ds = PetscPowScalar(as, beta); in FormFunction()
207 fs = ds * (t0 - ts); in FormFunction()
232 ds = PetscPowScalar(as, beta); in FormFunction()
233 fs = ds * (t0 - ts); in FormFunction()
276 ds = PetscPowScalar(as, beta); in FormFunction()
277 fs = ds * (t0 - ts); in FormFunction()
297 PetscScalar dn, ds, de, dw, an, as, ae, aw, bn, bs, be, bw, gn, gs, ge, gw; in FormJacobian() local
[all …]
H A Dex64.c168 PetscDS ds; in SetupEqn() local
174 PetscCall(DMGetDS(dm, &ds)); in SetupEqn()
175 PetscCall(PetscDSSetResidual(ds, 0, NULL, u_1)); in SetupEqn()
176 PetscCall(PetscDSSetResidual(ds, 1, p_0, NULL)); in SetupEqn()
177 PetscCall(PetscDSSetResidual(ds, 2, w_0, w_1)); in SetupEqn()
178 PetscCall(PetscDSSetJacobian(ds, 0, 0, NULL, NULL, NULL, Ju_1_u1u1)); in SetupEqn()
179 PetscCall(PetscDSSetJacobian(ds, 0, 1, NULL, NULL, Ju_1_u1p0, NULL)); in SetupEqn()
180 PetscCall(PetscDSSetJacobian(ds, 1, 0, NULL, Jp_0_p0u1, NULL, NULL)); in SetupEqn()
181 PetscCall(PetscDSSetJacobian(ds, 1, 1, Jp_0_p0p0, NULL, NULL, NULL)); in SetupEqn()
182 PetscCall(PetscDSSetJacobian(ds, 1, 2, Jp_0_p0w0, NULL, NULL, NULL)); in SetupEqn()
[all …]
H A Dex71.c221 PetscDS ds; in SetupProblem() local
229 PetscCall(DMGetDS(dm, &ds)); in SetupProblem()
230 PetscCall(PetscDSSetResidual(ds, 0, NULL, f1_u)); in SetupProblem()
231 PetscCall(PetscDSSetResidual(ds, 1, f0_p, NULL)); in SetupProblem()
232 PetscCall(PetscDSSetJacobian(ds, 0, 0, NULL, NULL, NULL, g3_uu)); in SetupProblem()
233 PetscCall(PetscDSSetJacobian(ds, 0, 1, NULL, NULL, g2_up, NULL)); in SetupProblem()
234 PetscCall(PetscDSSetJacobian(ds, 1, 0, NULL, g1_pu, NULL, NULL)); in SetupProblem()
239 …PetscCall(PetscDSGetBoundary(ds, bd, &wf, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NU… in SetupProblem()
252 PetscCall(PetscDSSetConstants(ds, 4, constants)); in SetupProblem()
260 PetscCall(PetscDSSetExactSolution(ds, 0, quadratic_u, ctx)); in SetupProblem()
[all …]
/petsc/src/dm/dt/fe/tests/
H A Dex2.c50 PetscDS ds; in SetupPrimalProblem() local
55 PetscCall(DMGetDS(dm, &ds)); in SetupPrimalProblem()
56 PetscCall(PetscDSSetResidual(ds, 0, f0_trig_u, f1_u)); in SetupPrimalProblem()
57 PetscCall(PetscDSSetJacobian(ds, 0, 0, NULL, NULL, NULL, g3_uu)); in SetupPrimalProblem()
58 PetscCall(PetscDSSetExactSolution(ds, 0, trig_u, user)); in SetupPrimalProblem()
120 static PetscErrorCode CreateFEGeometry(DM dm, PetscDS ds, IS cellIS, PetscQuadrature *affineQuad, P… in CreateFEGeometry() argument
130 PetscCall(PetscDSGetNumFields(ds, &Nf)); in CreateFEGeometry()
141 PetscCall(PetscDSGetDiscretization(ds, f, (PetscObject *)&fe)); in CreateFEGeometry()
150 static PetscErrorCode DestroyFEGeometry(DM dm, PetscDS ds, IS cellIS, PetscQuadrature *affineQuad, … in DestroyFEGeometry() argument
156 PetscCall(PetscDSGetNumFields(ds, &Nf)); in DestroyFEGeometry()
[all …]
/petsc/src/dm/dt/interface/ftn-custom/
H A Dzdtdsf90.c25 PETSC_EXTERN void petscdsgettabulationsetsizes_(PetscDS *ds, PetscInt *i, PetscTabulationFtn *tftn,… in petscdsgettabulationsetsizes_() argument
29 *ierr = PetscDSGetTabulation(*ds, &tab); in petscdsgettabulationsetsizes_()
34 PETSC_EXTERN void petscdsgettabulationsetpointers_(PetscDS *ds, PetscInt *i, F90Array1d *ptrB, Pets… in petscdsgettabulationsetpointers_() argument
39 *ierr = PetscDSGetTabulation(*ds, &tab); in petscdsgettabulationsetpointers_()
/petsc/src/snes/tests/
H A Dex15.c230 PetscDS ds; in SetupPrimalProblem() local
236 PetscCall(DMGetDS(dm, &ds)); in SetupPrimalProblem()
237 PetscCall(PetscDSGetWeakForm(ds, &wf)); in SetupPrimalProblem()
239 PetscCall(PetscDSSetResidual(ds, 0, f0_q, f1_q)); in SetupPrimalProblem()
241 PetscCall(PetscDSSetResidual(ds, 1, f0_phi_backgroundCharge, NULL)); in SetupPrimalProblem()
243 PetscCall(PetscDSSetResidual(ds, 1, f0_phi, NULL)); in SetupPrimalProblem()
245 PetscCall(PetscDSSetJacobian(ds, 0, 0, g0_qq, NULL, NULL, NULL)); in SetupPrimalProblem()
246 PetscCall(PetscDSSetJacobian(ds, 0, 1, NULL, NULL, g2_qphi, NULL)); in SetupPrimalProblem()
247 PetscCall(PetscDSSetJacobian(ds, 1, 0, NULL, g1_phiq, NULL, NULL)); in SetupPrimalProblem()
250 PetscCall(PetscDSSetExactSolution(ds, 0, const_q, user)); in SetupPrimalProblem()
[all …]
/petsc/src/dm/dt/tests/
H A Dex10.c121 PetscDS ds; in SetupProblem() local
128 PetscCall(DMGetDS(dm, &ds)); in SetupProblem()
130 PetscCall(PetscDSSetResidual(ds, 0, f0_v, f1_v)); in SetupProblem()
131 PetscCall(PetscDSSetResidual(ds, 1, f0_q_linear, NULL)); in SetupProblem()
132 PetscCall(PetscDSSetJacobian(ds, 0, 0, g0_vu, NULL, NULL, NULL)); in SetupProblem()
133 PetscCall(PetscDSSetJacobian(ds, 0, 1, NULL, NULL, g2_vp, NULL)); in SetupProblem()
134 PetscCall(PetscDSSetJacobian(ds, 1, 0, NULL, g1_qu, NULL, NULL)); in SetupProblem()
137 …PetscCall(PetscDSAddBoundary(ds, DM_BC_NATURAL, "Boundary Integral", label, 1, &id, 0, 0, NULL, (P… in SetupProblem()
138 …PetscCall(PetscDSGetBoundary(ds, bd, &wf, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NU… in SetupProblem()
141 PetscCall(PetscDSSetExactSolution(ds, 0, linear_u, NULL)); in SetupProblem()
[all …]
/petsc/src/dm/interface/
H A Ddmi.c276 PetscCall(PetscDSCopyConstants(dm->probs[field].ds, (*subdm)->probs[0].ds)); in DMSelectFields_Private()
277 PetscCall(PetscDSCopyBoundary(dm->probs[field].ds, 1, fnum, (*subdm)->probs[0].ds)); in DMSelectFields_Private()
278 PetscCall(PetscDSSelectEquations(dm->probs[field].ds, 1, fnum, (*subdm)->probs[0].ds)); in DMSelectFields_Private()
319 const PetscInt Nf = dm->probs[d].ds->Nf; in DMSelectFields_Private()
331 PetscCall(PetscDSCopyConstants(dm->probs[d].ds, (*subdm)->probs[e].ds)); in DMSelectFields_Private()
332 PetscCall(PetscDSCopyBoundary(dm->probs[d].ds, numFields, fields, (*subdm)->probs[e].ds)); in DMSelectFields_Private()
355 …PetscDSSelectDiscretizations(dm->probs[0].ds, nf, fidx, PETSC_DETERMINE, PETSC_DETERMINE, (*subdm)… in DMSelectFields_Private()
356 PetscCall(PetscDSSelectEquations(dm->probs[0].ds, nf, fidx, (*subdm)->probs[0].ds)); in DMSelectFields_Private()
362 PetscCall(PetscDSCopyConstants(dm->probs[0].ds, (*subdm)->probs[0].ds)); in DMSelectFields_Private()
363 PetscCall(PetscDSCopyBoundary(dm->probs[0].ds, PETSC_DETERMINE, NULL, (*subdm)->probs[0].ds)); in DMSelectFields_Private()
[all …]
/petsc/src/snes/utils/
H A Ddmplexsnes.c43 PetscDS ds; in SNESCorrectDiscretePressure_Private() local
54 PetscCall(DMGetDS(dm, &ds)); in SNESCorrectDiscretePressure_Private()
55 PetscCall(PetscDSSetObjective(ds, pfield, pressure_Private)); in SNESCorrectDiscretePressure_Private()
60 PetscCall(PetscDSGetNumFields(ds, &Nf)); in SNESCorrectDiscretePressure_Private()
295 PetscDS ds; in DMPlexSNESComputeResidualFEM() local
299 PetscCall(DMGetRegionNumDS(dm, s, &key.label, NULL, &ds, NULL)); in DMPlexSNESComputeResidualFEM()
351 PetscDS ds; in DMPlexSNESComputeResidualDS() local
355 PetscCall(DMGetRegionNumDS(dm, s, &label, NULL, &ds, NULL)); in DMPlexSNESComputeResidualDS()
365 PetscCall(PetscHMapFormGetSize(ds->wf->form[resmap[m]], &Nkm)); in DMPlexSNESComputeResidualDS()
369 … for (m = 0; m < Nm; ++m) PetscCall(PetscHMapFormGetKeys(ds->wf->form[resmap[m]], &off, reskeys)); in DMPlexSNESComputeResidualDS()
[all …]
/petsc/src/dm/impls/plex/tests/
H A Dex73.c115 PetscDS ds; in CreateDiscretization() local
160 PetscCall(DMGetDS(dm, &ds)); in CreateDiscretization()
161 PetscCall(PetscDSSetResidual(ds, 0, identity, NULL)); in CreateDiscretization()
162 PetscCall(PetscDSSetResidual(ds, 1, divergence, NULL)); in CreateDiscretization()
164 if (dim == 2) PetscCall(PetscDSSetExactSolution(ds, 0, solenoidal_totaldeg_2d, &user->degree)); in CreateDiscretization()
165 else PetscCall(PetscDSSetExactSolution(ds, 0, solenoidal_totaldeg_3d, &user->degree)); in CreateDiscretization()
167 PetscCall(PetscDSSetExactSolution(ds, 0, source_totaldeg, &user->degree)); in CreateDiscretization()
169 PetscCall(PetscDSSetExactSolution(ds, 1, zero, &user->degree)); in CreateDiscretization()
183 PetscCall(PetscDSSetConstants(ds, 1, constants)); in CreateDiscretization()
216 PetscDS ds; in main() local
[all …]

12345