Lines Matching refs:dmlocalsnes
34 static PetscErrorCode DMLocalSNESGetContext(DM dm, DMSNES sdm, DMSNES_Local **dmlocalsnes) in DMLocalSNESGetContext() argument
37 *dmlocalsnes = NULL; in DMLocalSNESGetContext()
44 *dmlocalsnes = (DMSNES_Local *)sdm->data; in DMLocalSNESGetContext()
50 DMSNES_Local *dmlocalsnes = (DMSNES_Local *)ctx; in SNESComputeObjective_DMLocal() local
62 …if (dmlocalsnes->boundarylocal) PetscCall((*dmlocalsnes->boundarylocal)(dm, Xloc, dmlocalsnes->bou… in SNESComputeObjective_DMLocal()
67 …if (transform && dmlocalsnes->boundarylocal) PetscCall((*dmlocalsnes->boundarylocal)(dm, Xloc, dml… in SNESComputeObjective_DMLocal()
69 PetscCall((*dmlocalsnes->objectivelocal)(dm, Xloc, obj, dmlocalsnes->objectivelocalctx)); in SNESComputeObjective_DMLocal()
78 DMSNES_Local *dmlocalsnes = (DMSNES_Local *)ctx; in SNESComputeFunction_DMLocal() local
93 …if (dmlocalsnes->boundarylocal) PetscCall((*dmlocalsnes->boundarylocal)(dm, Xloc, dmlocalsnes->bou… in SNESComputeFunction_DMLocal()
98 …if (transform && dmlocalsnes->boundarylocal) PetscCall((*dmlocalsnes->boundarylocal)(dm, Xloc, dml… in SNESComputeFunction_DMLocal()
100 PetscCall((*dmlocalsnes->residuallocal)(dm, Xloc, Floc, dmlocalsnes->residuallocalctx)); in SNESComputeFunction_DMLocal()
129 DMSNES_Local *dmlocalsnes = (DMSNES_Local *)ctx; in SNESComputeJacobian_DMLocal() local
136 if (dmlocalsnes->jacobianlocal) { in SNESComputeJacobian_DMLocal()
140 …if (dmlocalsnes->boundarylocal) PetscCall((*dmlocalsnes->boundarylocal)(dm, Xloc, dmlocalsnes->bou… in SNESComputeJacobian_DMLocal()
145 …if (transform && dmlocalsnes->boundarylocal) PetscCall((*dmlocalsnes->boundarylocal)(dm, Xloc, dml… in SNESComputeJacobian_DMLocal()
147 PetscCall((*dmlocalsnes->jacobianlocal)(dm, Xloc, A, B, dmlocalsnes->jacobianlocalctx)); in SNESComputeJacobian_DMLocal()
161 …MatFDColoringSetFunction(fdcoloring, (MatFDColoringFn *)SNESComputeFunction_DMLocal, dmlocalsnes)); in SNESComputeJacobian_DMLocal()
209 DMSNES_Local *dmlocalsnes; in DMSNESSetObjectiveLocal() local
214 PetscCall(DMLocalSNESGetContext(dm, sdm, &dmlocalsnes)); in DMSNESSetObjectiveLocal()
216 dmlocalsnes->objectivelocal = func; in DMSNESSetObjectiveLocal()
217 dmlocalsnes->objectivelocalctx = ctx; in DMSNESSetObjectiveLocal()
219 PetscCall(DMSNESSetObjective(dm, SNESComputeObjective_DMLocal, dmlocalsnes)); in DMSNESSetObjectiveLocal()
248 DMSNES_Local *dmlocalsnes; in DMSNESSetFunctionLocal() local
253 PetscCall(DMLocalSNESGetContext(dm, sdm, &dmlocalsnes)); in DMSNESSetFunctionLocal()
255 dmlocalsnes->residuallocal = func; in DMSNESSetFunctionLocal()
256 dmlocalsnes->residuallocalctx = ctx; in DMSNESSetFunctionLocal()
258 PetscCall(DMSNESSetFunction(dm, SNESComputeFunction_DMLocal, dmlocalsnes)); in DMSNESSetFunctionLocal()
260 PetscCall(DMSNESSetJacobian(dm, SNESComputeJacobian_DMLocal, dmlocalsnes)); in DMSNESSetFunctionLocal()
287 DMSNES_Local *dmlocalsnes; in DMSNESSetBoundaryLocal() local
292 PetscCall(DMLocalSNESGetContext(dm, sdm, &dmlocalsnes)); in DMSNESSetBoundaryLocal()
294 dmlocalsnes->boundarylocal = func; in DMSNESSetBoundaryLocal()
295 dmlocalsnes->boundarylocalctx = ctx; in DMSNESSetBoundaryLocal()
323 DMSNES_Local *dmlocalsnes; in DMSNESSetJacobianLocal() local
328 PetscCall(DMLocalSNESGetContext(dm, sdm, &dmlocalsnes)); in DMSNESSetJacobianLocal()
330 dmlocalsnes->jacobianlocal = func; in DMSNESSetJacobianLocal()
331 dmlocalsnes->jacobianlocalctx = ctx; in DMSNESSetJacobianLocal()
333 PetscCall(DMSNESSetJacobian(dm, SNESComputeJacobian_DMLocal, dmlocalsnes)); in DMSNESSetJacobianLocal()
356 DMSNES_Local *dmlocalsnes; in DMSNESGetObjectiveLocal() local
361 PetscCall(DMLocalSNESGetContext(dm, sdm, &dmlocalsnes)); in DMSNESGetObjectiveLocal()
362 if (func) *func = dmlocalsnes->objectivelocal; in DMSNESGetObjectiveLocal()
363 if (ctx) *(void **)ctx = dmlocalsnes->objectivelocalctx; in DMSNESGetObjectiveLocal()
386 DMSNES_Local *dmlocalsnes; in DMSNESGetFunctionLocal() local
391 PetscCall(DMLocalSNESGetContext(dm, sdm, &dmlocalsnes)); in DMSNESGetFunctionLocal()
392 if (func) *func = dmlocalsnes->residuallocal; in DMSNESGetFunctionLocal()
393 if (ctx) *(void **)ctx = dmlocalsnes->residuallocalctx; in DMSNESGetFunctionLocal()
416 DMSNES_Local *dmlocalsnes; in DMSNESGetBoundaryLocal() local
421 PetscCall(DMLocalSNESGetContext(dm, sdm, &dmlocalsnes)); in DMSNESGetBoundaryLocal()
422 if (func) *func = dmlocalsnes->boundarylocal; in DMSNESGetBoundaryLocal()
423 if (ctx) *(void **)ctx = dmlocalsnes->boundarylocalctx; in DMSNESGetBoundaryLocal()
446 DMSNES_Local *dmlocalsnes; in DMSNESGetJacobianLocal() local
451 PetscCall(DMLocalSNESGetContext(dm, sdm, &dmlocalsnes)); in DMSNESGetJacobianLocal()
452 if (func) *func = dmlocalsnes->jacobianlocal; in DMSNESGetJacobianLocal()
453 if (ctx) *(void **)ctx = dmlocalsnes->jacobianlocalctx; in DMSNESGetJacobianLocal()