| /petsc/src/ts/tutorials/ |
| H A D | ex47.c | 229 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 D | ex46.c | 299 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 D | ex53.c | 1964 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 D | ex77.c | 729 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 D | ex30.c | 1283 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 D | ex18.c | 1022 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 D | ex76.c | 1582 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 D | convest.c | 36 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 D | mgadapt.c | 90 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 D | ex76.c | 519 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 D | ex71.c | 329 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 D | ex77.c | 341 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 D | ex13.c | 387 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 D | ex2.c | 142 …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 D | petscconvestimpl.h | 29 void **ctxs; member
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexproject.c | 70 …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 D | plexfem.c | 305 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 D | ex1.c | 300 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 D | ex22.c | 140 …PetscCtx ctxs[1] … in main() local 148 PetscCall(DMProjectFunctionLocal(dm, 0, funcs, ctxs, INSERT_VALUES, localCoords)); in main()
|
| /petsc/src/ts/interface/ |
| H A D | tsmon.c | 1609 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 D | dm.c | 8260 …, 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 D | ex2.c | 614 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 D | tsconvest.c | 45 PetscCall(DMComputeL2FieldDiff(dm, t, ce->exactSol, ce->ctxs, u, errors)); in PetscConvEstComputeErrorTS_Private()
|
| /petsc/src/sys/objects/device/tests/output/ |
| H A D | ex7_with_info_host_no_device.out | 80 [0] <device> PetscDeviceContextJoin(): Joined 2 ctxs to ctx 53, mode destroy with IDs: 68, 69
|
| H A D | ex7_with_info_host_with_device.out | 80 [0] <device> PetscDeviceContextJoin(): Joined 2 ctxs to ctx 53, mode destroy with IDs: 68, 69
|