Home
last modified time | relevance | path

Searched refs:ctxs (Results 1 – 25 of 30) sorted by relevance

12

/petsc/src/ts/tutorials/
H A Dex47.c229 void *ctxs[1]; in MonitorError() local
245 PetscCall(PetscDSGetExactSolution(ds, 0, &func[0], &ctxs[0])); in MonitorError()
248 PetscCall(DMProjectFunction(dm, time, func, ctxs, INSERT_ALL_VALUES, error)); in MonitorError()
261 void *ctxs[1]; in MyTSMonitorError() local
267 PetscCall(PetscDSGetExactSolution(ds, 0, &func[0], &ctxs[0])); in MyTSMonitorError()
268 PetscCall(DMComputeL2Diff(dm, crtime, func, ctxs, u, &error)); in MyTSMonitorError()
304 void *ctxs[1]; in main() local
307 PetscCall(PetscDSGetExactSolution(ds, 0, &func[0], &ctxs[0])); in main()
308 PetscCall(DMProjectFunction(dm, t, func, ctxs, INSERT_ALL_VALUES, u)); in main()
H A Dex46.c299 void *ctxs[2]; in MonitorError() local
307 PetscCall(PetscDSGetExactSolution(ds, 0, &funcs[0], &ctxs[0])); in MonitorError()
308 PetscCall(PetscDSGetExactSolution(ds, 1, &funcs[1], &ctxs[1])); in MonitorError()
309 PetscCall(DMComputeL2FieldDiff(dm, crtime, funcs, ctxs, u, ferrors)); in MonitorError()
344 void *ctxs[2]; in main() local
348 PetscCall(PetscDSGetExactSolution(ds, 0, &funcs[0], &ctxs[0])); in main()
349 PetscCall(PetscDSGetExactSolution(ds, 1, &funcs[1], &ctxs[1])); in main()
350 PetscCall(DMProjectFunction(dm, 0.0, funcs, ctxs, INSERT_ALL_VALUES, u)); in main()
H A Dex53.c1964 void *ctxs[3]; in SetInitialConditions() local
1971 ctxs[0] = ctx; in SetInitialConditions()
1973 ctxs[1] = ctx; in SetInitialConditions()
1975 ctxs[2] = ctx; in SetInitialConditions()
1976 PetscCall(DMProjectFunction(dm, t, funcs, ctxs, INSERT_VALUES, u)); in SetInitialConditions()
1980 ctxs[0] = ctx; in SetInitialConditions()
1982 ctxs[1] = ctx; in SetInitialConditions()
1984 ctxs[2] = ctx; in SetInitialConditions()
1985 PetscCall(DMProjectFunction(dm, t, funcs, ctxs, INSERT_VALUES, u)); in SetInitialConditions()
1989 ctxs[0] = ctx; in SetInitialConditions()
[all …]
H A Dex77.c729 void *ctxs[3]; in MonitorError() local
740 for (f = 0; f < 3; ++f) PetscCall(PetscDSGetExactSolution(ds, f, &exactFuncs[f], &ctxs[f])); in MonitorError()
741 PetscCall(DMComputeL2FieldDiff(dm, crtime, exactFuncs, ctxs, u, ferrors)); in MonitorError()
752 PetscCall(DMProjectFunction(dm, 0.0, exactFuncs, ctxs, INSERT_ALL_VALUES, v)); in MonitorError()
H A Dex30.c1283 void *ctxs[NUM_FIELDS + 1]; in ProjectAuxDM() local
1334 ctxs[C_FIELD_ID] = NULL; in ProjectAuxDM()
1336 ctxs[P_FIELD_ID] = NULL; in ProjectAuxDM()
1338 ctxs[NUM_FIELDS] = ctx->source_ctx; in ProjectAuxDM()
1339 PetscCall(DMProjectFunction(dmAux, time, funcs, ctxs, INSERT_ALL_VALUES, a)); in ProjectAuxDM()
1778 void *ctxs[NUM_FIELDS] = {NULL}; in SetInitialConditionsAndTolerances() local
1797 ctxs[C_FIELD_ID] = r; in SetInitialConditionsAndTolerances()
1803 PetscCall(DMProjectFunction(dm, t, funcs, ctxs, INSERT_ALL_VALUES, u)); in SetInitialConditionsAndTolerances()
H A Dex18.c1022 void *ctxs[2] = {&t, &t}; in main() local
1060 PetscCall(DMProjectFunction(dm, 0.0, user.initialGuess, ctxs, INSERT_VALUES, u)); in main()
1061 if (user.useFV) PetscCall(SetInitialConditionFVM(dm, u, 1, user.initialGuess[1], ctxs[1])); in main()
H A Dex76.c1582 void *ctxs[3]; in MonitorError() local
1594 for (f = 0; f < 3; ++f) PetscCall(PetscDSGetExactSolution(ds, f, &exactFuncs[f], &ctxs[f])); in MonitorError()
1595 PetscCall(DMComputeL2FieldDiff(dm, crtime, exactFuncs, ctxs, u, ferrors)); in MonitorError()
1606 PetscCall(DMProjectFunction(dm, crtime, exactFuncs, ctxs, INSERT_ALL_VALUES, v)); in MonitorError()
/petsc/src/snes/utils/
H A Dconvest.c36 PetscCall(PetscFree3((*ce)->initGuess, (*ce)->exactSol, (*ce)->ctxs)); in PetscConvEstDestroy()
154 PetscCall(PetscCalloc3(ce->Nf, &ce->initGuess, ce->Nf, &ce->exactSol, ce->Nf, &ce->ctxs)); in PetscConvEstSetUp()
169 PetscCall(PetscDSGetExactSolution(ds, field, &ce->exactSol[field], &ce->ctxs[field])); in PetscConvEstSetUp()
260 PetscCall(DMProjectFunction(dm, 0.0, ce->initGuess, ce->ctxs, INSERT_VALUES, u)); in PetscConvEstInitGuessSNES_Private()
270 PetscCall(DMComputeL2FieldDiff(dm, 0.0, ce->exactSol, ce->ctxs, u, errors)); in PetscConvEstComputeErrorSNES_Private()
280 void **ctxs; in PetscConvEstComputeErrorSNES_Private() local
286 PetscCall(PetscMalloc2(Nf, &funcs, Nf, &ctxs)); in PetscConvEstComputeErrorSNES_Private()
287 … for (PetscInt f = 0; f < Nf; ++f) PetscCall(PetscDSGetExactSolution(ds, f, &funcs[f], &ctxs[f])); in PetscConvEstComputeErrorSNES_Private()
298 PetscCall(DMPlexComputeL2DiffVec(dm, 0., funcs, ctxs, u, e)); in PetscConvEstComputeErrorSNES_Private()
302 PetscCall(PetscFree2(funcs, ctxs)); in PetscConvEstComputeErrorSNES_Private()
/petsc/src/ksp/pc/impls/mg/
H A Dmgadapt.c90 void **ctxs; in PCMGCreateCoarseSpaceDefault_Private() local
99 PetscCall(PetscMalloc2(Nf, &funcs, Nf, &ctxs)); in PCMGCreateCoarseSpaceDefault_Private()
106 for (f = 0; f < Nf; ++f) ctxs[f] = &k; in PCMGCreateCoarseSpaceDefault_Private()
110 PetscCall(DMProjectFunction(dm, 0.0, funcs, ctxs, INSERT_ALL_VALUES, tmp)); in PCMGCreateCoarseSpaceDefault_Private()
114 PetscCall(PetscFree2(funcs, ctxs)); in PCMGCreateCoarseSpaceDefault_Private()
/petsc/src/snes/tutorials/
H A Dex76.c519 PetscCtx ctxs[3]; in main() local
522 PetscCall(PetscDSGetExactSolution(ds, 0, &exactFuncs[0], &ctxs[0])); in main()
523 PetscCall(PetscDSGetExactSolution(ds, 1, &exactFuncs[1], &ctxs[1])); in main()
524 PetscCall(PetscDSGetExactSolution(ds, 2, &exactFuncs[2], &ctxs[2])); in main()
525 PetscCall(DMProjectFunction(dm, 0.0, exactFuncs, ctxs, INSERT_ALL_VALUES, u)); in main()
537 PetscCtx ctxs[3]; in main() local
540 PetscCall(PetscDSGetExactSolution(ds, 0, &exactFuncs[0], &ctxs[0])); in main()
541 PetscCall(PetscDSGetExactSolution(ds, 1, &exactFuncs[1], &ctxs[1])); in main()
542 PetscCall(PetscDSGetExactSolution(ds, 2, &exactFuncs[2], &ctxs[2])); in main()
544 PetscCall(DMProjectFunction(dm, 0.0, exactFuncs, ctxs, INSERT_ALL_VALUES, r)); in main()
H A Dex71.c329 void *ctxs[2]; in main() local
332 PetscCall(PetscDSGetExactSolution(ds, 0, &exactFuncs[0], &ctxs[0])); in main()
333 PetscCall(PetscDSGetExactSolution(ds, 1, &exactFuncs[1], &ctxs[1])); in main()
334 PetscCall(DMProjectFunction(dm, 0.0, exactFuncs, ctxs, INSERT_ALL_VALUES, u)); in main()
H A Dex77.c341 PetscCtx ctxs[2]; in SetupMaterial() local
344 ctxs[0] = user; in SetupMaterial()
345 ctxs[1] = user; in SetupMaterial()
347 PetscCall(DMProjectFunctionLocal(dmAux, 0.0, matFuncs, ctxs, INSERT_ALL_VALUES, A)); in SetupMaterial()
H A Dex13.c387 PetscCtx ctxs[1] = {0}; in ComputeAdjoint() local
389 ctxs[0] = user; in ComputeAdjoint()
443 PetscCall(DMComputeL2Diff(dm, 0.0, funcs, ctxs, u, &errorL2Norm)); in ComputeAdjoint()
444 PetscCall(DMPlexComputeL2DiffVec(dm, 0.0, funcs, ctxs, u, errorL2)); in ComputeAdjoint()
/petsc/src/dm/impls/forest/tests/
H A Dex2.c142 …void *ctxs[1] … in main() local
240 PetscCall(DMProjectFunction(preForest, 0., funcs, ctxs, INSERT_VALUES, preVec)); in main()
248 PetscCall(DMProjectFunction(base, 0., funcs, ctxs, INSERT_VALUES, baseVec)); in main()
290 PetscCall(DMProjectFunction(postForest, 0., funcs, ctxs, INSERT_VALUES, postVecExact)); in main()
335 PetscCall(DMProjectFunction(base, 0., funcs, ctxs, INSERT_VALUES, baseVec)); in main()
/petsc/include/petsc/private/
H A Dpetscconvestimpl.h29 void **ctxs; member
/petsc/src/dm/impls/plex/
H A Dplexproject.c70 …t, PetscReal, const PetscReal[], PetscInt, PetscScalar *, void *), void **ctxs, PetscScalar values… in DMProjectPoint_Func_Private() argument
85 void *const ctx = ctxs ? ctxs[f] : NULL; in DMProjectPoint_Func_Private()
198 … const PetscReal[], PetscInt, const PetscScalar[], PetscScalar[]), void **ctxs, PetscScalar values… in DMProjectPoint_Field_Private() argument
357 … const PetscReal[], PetscInt, const PetscScalar[], PetscScalar[]), void **ctxs, PetscScalar values… in DMProjectPoint_BdField_Private() argument
533 …bulation *TAux, DMBoundaryConditionType type, PetscVoidFn **funcs, void **ctxs, PetscBool fieldAct… in DMProjectPoint_Private() argument
545 …**)(PetscInt, PetscReal, const PetscReal[], PetscInt, PetscScalar *, void *))funcs, ctxs, values)); in DMProjectPoint_Private()
549 … PetscReal, const PetscReal[], PetscInt, const PetscScalar[], PetscScalar[]))funcs, ctxs, values)); in DMProjectPoint_Private()
552 …etscReal[], const PetscReal[], PetscInt, const PetscScalar[], PetscScalar[]))funcs, ctxs, values)); in DMProjectPoint_Private()
713 …PetscInt ids[], DMBoundaryConditionType type, PetscVoidFn **funcs, void **ctxs, InsertMode mode, V… in DMProjectLocal_Generic_Plex() argument
1054 …ime, localU, localA, hasFE, hasFV, isFE, sp, point, T, TAux, type, funcs, ctxs, fieldActive, value… in DMProjectLocal_Generic_Plex()
[all …]
H A Dplexfem.c305 void **ctxs; in DMPlexCreateRigidBody() local
320 PetscCall(PetscCalloc2(Nf, &func, Nf, &ctxs)); in DMPlexCreateRigidBody()
333 ctxs[field] = (void *)(&ctx[0]); in DMPlexCreateRigidBody()
336 PetscCall(DMProjectFunction(dm, 0.0, func, ctxs, INSERT_VALUES, mode[d])); in DMPlexCreateRigidBody()
363 PetscCall(PetscFree2(func, ctxs)); in DMPlexCreateRigidBody()
918 void **ctxs; in DMPlexInsertBoundaryValuesEssential() local
923 PetscCall(PetscCalloc2(numFields, &funcs, numFields, &ctxs)); in DMPlexInsertBoundaryValuesEssential()
925 ctxs[field] = ctx; in DMPlexInsertBoundaryValuesEssential()
926 …PetscCall(DMProjectFunctionLabelLocal(dm, time, label, numids, ids, Nc, comps, funcs, ctxs, INSERT… in DMPlexInsertBoundaryValuesEssential()
927 PetscCall(PetscFree2(funcs, ctxs)); in DMPlexInsertBoundaryValuesEssential()
[all …]
/petsc/src/dm/field/tutorials/
H A Dex1.c300 PetscCtx ctxs[1]; in main() local
303 ctxs[0] = NULL; in main()
305 PetscCall(DMProjectFunctionLocal(dm, 0.0, func, ctxs, INSERT_ALL_VALUES, fieldvec)); in main()
/petsc/src/dm/impls/plex/tests/
H A Dex22.c140 …PetscCtx ctxs[1] … in main() local
148 PetscCall(DMProjectFunctionLocal(dm, 0, funcs, ctxs, INSERT_VALUES, localCoords)); in main()
/petsc/src/ts/interface/
H A Dtsmon.c1609 void **ctxs; in TSMonitorError() local
1613 PetscCall(PetscMalloc2(Nf, &exactFuncs, Nf, &ctxs)); in TSMonitorError()
1614 for (f = 0; f < Nf; ++f) PetscCall(PetscDSGetExactSolution(ds, f, &exactFuncs[f], &ctxs[f])); in TSMonitorError()
1615 PetscCall(DMComputeL2FieldDiff(dm, ptime, exactFuncs, ctxs, u, ferrors)); in TSMonitorError()
1628 PetscCall(DMProjectFunction(dm, ptime, exactFuncs, ctxs, INSERT_ALL_VALUES, v)); in TSMonitorError()
1633 PetscCall(PetscFree2(exactFuncs, ctxs)); in TSMonitorError()
/petsc/src/dm/interface/
H A Ddm.c8260 …, const PetscReal x[], PetscInt Nc, PetscScalar *u, PetscCtx ctx), void **ctxs, InsertMode mode, V… in DMProjectFunction() argument
8269 PetscCall(DMProjectFunctionLocal(dm, time, funcs, ctxs, mode, localX)); in DMProjectFunction()
8309 …, const PetscReal x[], PetscInt Nc, PetscScalar *u, PetscCtx ctx), void **ctxs, InsertMode mode, V… in DMProjectFunctionLocal() argument
8314 PetscUseTypeMethod(dm, projectfunctionlocal, time, funcs, ctxs, mode, localX); in DMProjectFunctionLocal()
8355 …, const PetscReal x[], PetscInt Nc, PetscScalar *u, PetscCtx ctx), void **ctxs, InsertMode mode, V… in DMProjectFunctionLabel() argument
8363 …PetscCall(DMProjectFunctionLabelLocal(dm, time, label, numIds, ids, Nc, comps, funcs, ctxs, mode, … in DMProjectFunctionLabel()
8407 …, const PetscReal x[], PetscInt Nc, PetscScalar *u, PetscCtx ctx), void **ctxs, InsertMode mode, V… in DMProjectFunctionLabelLocal() argument
8412 …hod(dm, projectfunctionlabellocal, time, label, numIds, ids, Nc, comps, funcs, ctxs, mode, localX); in DMProjectFunctionLabelLocal()
8708 …t, PetscReal, const PetscReal[], PetscInt, PetscScalar *, void *), void **ctxs, Vec X, PetscReal *… in DMComputeL2Diff() argument
8713 PetscUseTypeMethod(dm, computel2diff, time, funcs, ctxs, X, diff); in DMComputeL2Diff()
[all …]
/petsc/src/dm/impls/swarm/tests/
H A Dex2.c614 void *ctxs[1]; in TestL2Projection_Shape() local
618 ctxs[0] = (void *)user; in TestL2Projection_Shape()
640 PetscCall(DMComputeL2Diff(dm, 0.0, funcs, ctxs, uproj, &error)); in TestL2Projection_Shape()
/petsc/src/ts/utils/
H A Dtsconvest.c45 PetscCall(DMComputeL2FieldDiff(dm, t, ce->exactSol, ce->ctxs, u, errors)); in PetscConvEstComputeErrorTS_Private()
/petsc/src/sys/objects/device/tests/output/
H A Dex7_with_info_host_no_device.out80 [0] <device> PetscDeviceContextJoin(): Joined 2 ctxs to ctx 53, mode destroy with IDs: 68, 69
H A Dex7_with_info_host_with_device.out80 [0] <device> PetscDeviceContextJoin(): Joined 2 ctxs to ctx 53, mode destroy with IDs: 68, 69

12