| /petsc/src/snes/tutorials/ |
| H A D | ex55.h | 9 typedef struct AppCtx AppCtx; typedef 10 struct AppCtx { struct 14 PetscErrorCode (*mms_solution)(AppCtx *, const DMDACoor2d *, PetscScalar *); argument 15 PetscErrorCode (*mms_forcing)(AppCtx *, const DMDACoor2d *, PetscScalar *); argument 18 PETSC_EXTERN PetscErrorCode FormFunctionLocalVec(DMDALocalInfo *info, Vec x, Vec f, AppCtx *user); 19 …ERN PetscErrorCode FormObjectiveLocalVec(DMDALocalInfo *info, Vec x, PetscReal *obj, AppCtx *user); 20 …PetscErrorCode FormJacobianLocalVec(DMDALocalInfo *info, Vec x, Mat jac, Mat jacpre, AppCtx *user);
|
| /petsc/src/snes/tests/ |
| H A D | ex8.c | 140 } AppCtx; typedef 151 AppCtx *user = (AppCtx *)ctx; in constant() 163 AppCtx *user = (AppCtx *)ctx; in constantDer() 177 AppCtx *user = (AppCtx *)ctx; in linear() 189 AppCtx *user = (AppCtx *)ctx; in linearDer() 207 AppCtx *user = (AppCtx *)ctx; in quadratic() 226 AppCtx *user = (AppCtx *)ctx; in quadraticDer() 247 AppCtx *user = (AppCtx *)ctx; in cubic() 266 AppCtx *user = (AppCtx *)ctx; in cubicDer() 287 AppCtx *user = (AppCtx *)ctx; in quartic() [all …]
|
| /petsc/src/ts/tutorials/power_grid/ |
| H A D | ex3.h | 20 } AppCtx; typedef 25 AppCtx *user = (AppCtx *)ctx; in EventFunction() 37 AppCtx *user = (AppCtx *)ctx; in PostEventFunction() 54 PetscErrorCode RHSFunction(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunction() 75 PetscErrorCode RHSJacobian(TS ts, PetscReal t, Vec U, Mat A, Mat B, AppCtx *ctx) in RHSJacobian() 103 PetscErrorCode IFunction(TS ts, PetscReal t, Vec U, Vec Udot, Vec F, AppCtx *ctx) in IFunction() 126 PetscErrorCode IJacobian(TS ts, PetscReal t, Vec U, Vec Udot, PetscReal a, Mat A, Mat B, AppCtx *ct… in IJacobian() 158 AppCtx *ctx = (AppCtx *)ctx0; in RHSJacobianP() 171 PetscErrorCode CostIntegrand(TS ts, PetscReal t, Vec U, Vec R, AppCtx *ctx) in CostIntegrand() 186 PetscErrorCode DRDUJacobianTranspose(TS ts, PetscReal t, Vec U, Mat DRDU, Mat B, AppCtx *ctx) in DRDUJacobianTranspose() [all …]
|
| /petsc/src/ts/tutorials/hybrid/ |
| H A D | ex1.c | 24 } AppCtx; typedef 28 AppCtx *actx = (AppCtx *)ctx; in EventFunction() 44 AppCtx *actx = (AppCtx *)ctx; in PostEventFunction() 62 AppCtx *actx = (AppCtx *)ctx; in IFunction() 91 AppCtx *actx = (AppCtx *)ctx; in IJacobian() 133 AppCtx app; in main()
|
| H A D | ex1fwd.c | 27 } AppCtx; typedef 31 AppCtx *actx = (AppCtx *)ctx; in MyMonitor() 52 AppCtx *actx = (AppCtx *)ctx; in EventFunction() 66 PetscErrorCode ShiftGradients(TS ts, Vec U, AppCtx *actx) in ShiftGradients() 125 AppCtx *actx = (AppCtx *)ctx; in PostEventFunction() 145 AppCtx *actx = (AppCtx *)ctx; in IFunction() 174 AppCtx *actx = (AppCtx *)ctx; in IJacobian() 224 AppCtx app; in main()
|
| H A D | ex1fd.c | 24 } AppCtx; typedef 30 AppCtx *actx = (AppCtx *)ctx; in EventFunction() 44 PetscErrorCode ShiftGradients(TS ts, Vec U, AppCtx *actx) in ShiftGradients() 103 AppCtx *actx = (AppCtx *)ctx; in PostEventFunction() 122 AppCtx *actx = (AppCtx *)ctx; in IFunction() 151 AppCtx *actx = (AppCtx *)ctx; in IJacobian() 194 AppCtx app; in main() 325 AppCtx *ctx = (AppCtx *)ctx0; in FWDRun()
|
| /petsc/src/dm/impls/plex/tests/ |
| H A D | ex25.c | 10 } AppCtx; typedef 12 static PetscErrorCode ProcessOptions(MPI_Comm comm, AppCtx *options) in ProcessOptions() 22 static PetscErrorCode CreateMesh(MPI_Comm comm, AppCtx *options, DM *dm) in CreateMesh() 33 static PetscErrorCode test0(DM dm, AppCtx *options) in test0() 44 static PetscErrorCode test1(DM dm, AppCtx *options) in test1() 65 static PetscErrorCode test2(DM dm, AppCtx *options) in test2() 87 static PetscErrorCode test3(DM dm, AppCtx *options) in test3() 105 static PetscErrorCode test4(DM dm, AppCtx *options) in test4() 122 static PetscErrorCode test5(DM dm, AppCtx *options) in test5() 140 static PetscErrorCode test6(DM dm, AppCtx *options) in test6() [all …]
|
| H A D | ex14.c | 7 } AppCtx; typedef 9 PetscErrorCode ProcessOptions(MPI_Comm comm, AppCtx *options) in ProcessOptions() 20 PetscErrorCode CreateMesh(MPI_Comm comm, AppCtx *user, DM *dm) in CreateMesh() 42 AppCtx user; in main()
|
| H A D | ex33.c | 9 } AppCtx; typedef 11 PetscErrorCode ProcessOptions(MPI_Comm comm, AppCtx *options) in ProcessOptions() 24 PetscErrorCode CreateMesh(MPI_Comm comm, AppCtx *ctx, DM *dm) in CreateMesh() 39 static PetscErrorCode CreateDiscretization(DM dm, AppCtx *ctx) in CreateDiscretization() 60 static PetscErrorCode CheckVolume(DM dm, AppCtx *ctx) in CheckVolume() 79 AppCtx user; in main()
|
| H A D | ex13.c | 9 } AppCtx; typedef 11 static PetscErrorCode ProcessOptions(MPI_Comm comm, AppCtx *options) in ProcessOptions() 24 static PetscErrorCode CreateMesh(MPI_Comm comm, AppCtx *user, DM *dm) in CreateMesh() 100 static PetscErrorCode ScrambleOrientation(DM dm, AppCtx *user) in ScrambleOrientation() 114 static PetscErrorCode TestOrientation(DM dm, AppCtx *user) in TestOrientation() 126 AppCtx user; /* user-defined work context */ in main()
|
| /petsc/src/tao/leastsquares/tutorials/ |
| H A D | cs1.c | 50 } AppCtx; typedef 53 PetscErrorCode InitializeUserData(AppCtx *); 55 PetscErrorCode FormDictionaryMatrix(Mat, AppCtx *); 59 static PetscErrorCode SetTaoOptionsFromUserOptions(Tao tao, AppCtx *ctx) in SetTaoOptionsFromUserOptions() 83 static PetscErrorCode TestOutType(Tao tao, AppCtx *ctx) in TestOutType() 108 static PetscErrorCode ProcessOptions(MPI_Comm comm, AppCtx *ctx) in ProcessOptions() 134 AppCtx user; /* user-defined work context */ in main() 209 AppCtx *user = (AppCtx *)ptr; in EvaluateFunction() 233 AppCtx *user = (AppCtx *)ptr; in EvaluateJacobian() 256 PetscErrorCode FormDictionaryMatrix(Mat D, AppCtx *user) in FormDictionaryMatrix() [all …]
|
| /petsc/src/ts/tests/ |
| H A D | ex6.c | 36 } AppCtx; typedef 43 AppCtx ctx; in main() 85 AppCtx *ctx = (AppCtx *)actx; in TSFunction() 100 AppCtx *ctx = (AppCtx *)actx; in SNESFunction()
|
| H A D | ex8.c | 61 } AppCtx; typedef 68 AppCtx ctx; in main() 100 AppCtx *ctx = (AppCtx *)actx; in TSFunctionRHS() 113 AppCtx *ctx = (AppCtx *)actx; in TSFunctionI()
|
| /petsc/src/ts/tutorials/eimex/ |
| H A D | allen_cahn.c | 19 } AppCtx; typedef 33 AppCtx user; /* user-defined work context */ in main() 107 AppCtx *user = (AppCtx *)ptr; in RHSFunction() 129 AppCtx *user = (AppCtx *)ptr; in FormIFunction() 150 AppCtx *user = (AppCtx *)ctx; in FormIJacobian() 176 AppCtx *user = (AppCtx *)ctx; in FormInitialSolution()
|
| /petsc/src/ts/tutorials/ |
| H A D | ex3.c | 67 } AppCtx; typedef 72 extern PetscErrorCode InitialConditions(Vec, AppCtx *); 77 extern PetscErrorCode ExactSolution(PetscReal, Vec, AppCtx *); 81 AppCtx appctx; /* user-defined application context */ in main() 286 PetscErrorCode InitialConditions(Vec u, AppCtx *appctx) in InitialConditions() 336 PetscErrorCode ExactSolution(PetscReal t, Vec solution, AppCtx *appctx) in ExactSolution() 384 AppCtx *appctx = (AppCtx *)ctx; /* user-defined application context */ in Monitor() 465 AppCtx *appctx = (AppCtx *)ctx; /* user-defined application context */ in RHSMatrixHeat() 524 AppCtx *appctx = (AppCtx *)ctx; /* user-defined application context */ in IFunctionHeat() 534 AppCtx *appctx = (AppCtx *)ctx; /* user-defined application context */ in IJacobianHeat()
|
| H A D | ex6.c | 64 } AppCtx; typedef 69 extern PetscErrorCode InitialConditions(Vec, AppCtx *); 72 extern PetscErrorCode ExactSolution(PetscReal, Vec, AppCtx *); 77 AppCtx appctx; /* user-defined application context */ in main() 252 PetscErrorCode InitialConditions(Vec u, AppCtx *appctx) in InitialConditions() 299 PetscErrorCode ExactSolution(PetscReal t, Vec solution, AppCtx *appctx) in ExactSolution() 347 AppCtx *appctx = (AppCtx *)ctx; /* user-defined application context */ in Monitor() 428 AppCtx *appctx = (AppCtx *)ctx; /* user-defined application context */ in RHSMatrixHeat() 494 AppCtx *appctx = (AppCtx *)ctx; /* user-defined application context */ in MyBCRoutine()
|
| H A D | ex32.c | 35 } AppCtx; typedef 37 PetscErrorCode InitialConditions(Vec U, DM da, AppCtx *app) in InitialConditions() 69 AppCtx *app = (AppCtx *)ctx; in EventFunction() 83 AppCtx *app = (AppCtx *)ctx; in PostEventFunction() 99 AppCtx *app = (AppCtx *)ctx; in IFunction() 145 AppCtx *app = (AppCtx *)ctx; in IJacobian() 192 AppCtx app; in main()
|
| H A D | ex21.c | 57 } AppCtx; typedef 62 extern PetscErrorCode InitialConditions(Vec, AppCtx *); 66 extern PetscErrorCode ExactSolution(PetscReal, Vec, AppCtx *); 67 extern PetscErrorCode SetBounds(Vec, Vec, PetscScalar, PetscScalar, AppCtx *); 71 AppCtx appctx; /* user-defined application context */ in main() 239 PetscErrorCode InitialConditions(Vec u, AppCtx *appctx) in InitialConditions() 298 PetscErrorCode SetBounds(Vec xl, Vec xu, PetscScalar ul, PetscScalar uh, AppCtx *appctx) in SetBounds() 338 PetscErrorCode ExactSolution(PetscReal t, Vec solution, AppCtx *appctx) in ExactSolution() 389 AppCtx *appctx = (AppCtx *)ctx; /* user-defined application context */ in Monitor() 466 AppCtx *appctx = (AppCtx *)ctx; /* user-defined application context */ in RHSFunction() [all …]
|
| H A D | ex2.c | 56 } AppCtx; typedef 61 extern PetscErrorCode InitialConditions(Vec, AppCtx *); 65 extern PetscErrorCode ExactSolution(PetscReal, Vec, AppCtx *); 69 AppCtx appctx; /* user-defined application context */ in main() 222 PetscErrorCode InitialConditions(Vec u, AppCtx *appctx) in InitialConditions() 281 PetscErrorCode ExactSolution(PetscReal t, Vec solution, AppCtx *appctx) in ExactSolution() 332 AppCtx *appctx = (AppCtx *)ctx; /* user-defined application context */ in Monitor() 409 AppCtx *appctx = (AppCtx *)ctx; /* user-defined application context */ in RHSFunction() 522 AppCtx *appctx = (AppCtx *)ctx; /* user-defined application context */ in RHSJacobian()
|
| H A D | ex5.c | 63 } AppCtx; typedef 68 extern PetscErrorCode InitialConditions(Vec, AppCtx *); 71 extern PetscErrorCode ExactSolution(PetscReal, Vec, AppCtx *); 75 AppCtx appctx; /* user-defined application context */ in main() 249 PetscErrorCode InitialConditions(Vec u, AppCtx *appctx) in InitialConditions() 299 PetscErrorCode ExactSolution(PetscReal t, Vec solution, AppCtx *appctx) in ExactSolution() 345 AppCtx *appctx = (AppCtx *)ctx; /* user-defined application context */ in Monitor() 419 AppCtx *appctx = (AppCtx *)ctx; /* user-defined application context */ in RHSMatrixHeat()
|
| /petsc/src/ts/tutorials/autodiff/ |
| H A D | adr_ex1.cxx | 20 } AppCtx; typedef 22 PetscErrorCode IFunctionView(AppCtx *ctx, PetscViewer v) in IFunctionView() 29 PetscErrorCode IFunctionLoad(AppCtx **ctx, PetscViewer v) in IFunctionLoad() 40 PetscErrorCode IFunctionPassive(TS ts, PetscReal t, Vec U, Vec Udot, Vec F, AppCtx *ctx) in IFunctionPassive() 62 PetscErrorCode IFunctionActive1(TS ts, PetscReal t, Vec U, Vec Udot, Vec F, AppCtx *ctx) in IFunctionActive1() 99 PetscErrorCode IFunctionActive2(TS ts, PetscReal t, Vec U, Vec Udot, Vec F, AppCtx *ctx) in IFunctionActive2() 137 PetscErrorCode IJacobian(TS ts, PetscReal t, Vec U, Vec Udot, PetscReal a, Mat A, Mat B, AppCtx *ct… in IJacobian() 139 AppCtx *appctx = (AppCtx *)ctx; in IJacobian() 152 static PetscErrorCode Solution(TS ts, PetscReal t, Vec U, AppCtx *ctx) in Solution() 178 AppCtx ctx; in main()
|
| /petsc/src/dm/impls/plex/tutorials/ |
| H A D | ex9.c | 8 } AppCtx; typedef 10 static PetscErrorCode ProcessOptions(MPI_Comm comm, AppCtx *options) in ProcessOptions() 25 static PetscErrorCode CreateMesh(MPI_Comm comm, AppCtx *user, DM *dm) in CreateMesh() 40 AppCtx ctx; in main()
|
| /petsc/src/tao/leastsquares/tutorials/matlab/ |
| H A D | matlab_ls_test.c | 23 } AppCtx; typedef 27 AppCtx *user = (AppCtx *)ptr; in EvaluateResidual() 40 AppCtx *user = (AppCtx *)ptr; in EvaluateJacobian() 51 static PetscErrorCode TaoPounders(AppCtx *user) in TaoPounders() 100 AppCtx user; in main()
|
| /petsc/src/binding/petsc4py/demo/legacy/perftest/ |
| H A D | driver.c | 10 typedef struct AppCtx { struct 13 } AppCtx; argument 18 AppCtx *app = (AppCtx*) ctx; in FormInitial() 34 AppCtx *app = (AppCtx*) ctx; in FormFunction() 53 AppCtx _app,*app=&_app; in RunTest()
|
| /petsc/src/tao/constrained/tutorials/ |
| H A D | maros.c | 37 } AppCtx; typedef 41 PetscErrorCode InitializeProblem(AppCtx *); 42 PetscErrorCode DestroyProblem(AppCtx *); 60 AppCtx user; /* application context */ in main() 117 PetscErrorCode InitializeProblem(AppCtx *user) in InitializeProblem() 199 PetscErrorCode DestroyProblem(AppCtx *user) in DestroyProblem() 213 AppCtx *user = (AppCtx *)ctx; in FormFunctionGradient() 233 AppCtx *user = (AppCtx *)ctx; in FormInequalityConstraints() 242 AppCtx *user = (AppCtx *)ctx; in FormEqualityConstraints()
|