Home
last modified time | relevance | path

Searched refs:app (Results 1 – 25 of 36) sorted by relevance

12

/petsc/doc/
H A Dconf.py185 def setup(app): argument
186 app.connect('builder-inited', builder_init_handler)
187 app.connect('build-finished', build_finished_handler)
189 app.petsc_dir = os.path.abspath(os.environ['PETSC_DIR'])
191app.petsc_dir = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
192 app.build_dir = os.path.abspath(os.getcwd())
194 def builder_init_handler(app): argument
196 if app.builder.name.endswith('html'):
197 build_manpages_c2html.main('pre',app.petsc_dir,app.build_dir,app.outdir)
198 _update_htmlmap_links(app)
[all …]
/petsc/src/binding/petsc4py/demo/legacy/perftest/
H A Ddriver.c18 AppCtx *app = (AppCtx*) ctx; in FormInitial() local
23 formInitial(&app->nx,&app->ny,&app->nz,app->h,&t,x); in FormInitial()
34 AppCtx *app = (AppCtx*) ctx; in FormFunction() local
41 formFunction(&app->nx,&app->ny,&app->nz,app->h,&t,x,xdot,f); in FormFunction()
53 AppCtx _app,*app=&_app; in RunTest() local
57 app->nx = nx; app->h[0] = 1./(nx-1); in RunTest()
58 app->ny = ny; app->h[1] = 1./(ny-1); in RunTest()
59 app->nz = nz; app->h[2] = 1./(nz-1); in RunTest()
77 PetscCall(TSSetIFunction(ts,f,FormFunction,app)); in RunTest()
91 PetscCall(FormInitial(0.0,x,app)); in RunTest()
H A Ddriver.py92 app = AppCtx(nx, ny, nz)
94 ts.setIFunction(app.formFunction, f)
102 app.formInitial(0, x)
109 app.plot(ts.time, x)
/petsc/src/ts/tutorials/
H A Dex44.c39 AppCtx *app = (AppCtx *)ctx; in PostEvent() local
54 v[0] = -app->Cr * v[0]; in PostEvent()
57 app->bounces++; in PostEvent()
59 if (app->bounces >= app->maxbounces) { // 'app->bounces' may be different on different processes in PostEvent()
60 …tf(PETSC_COMM_SELF, "Processor [%d]: Ball bounced %" PetscInt_FMT " times\n", rank, app->bounces)); in PostEvent()
70 AppCtx *app = (AppCtx *)ctx; in I2Function() local
78 Res = a[0] + 9.8 + 0.5 * app->Cd * v[0] * v[0] * PetscSignReal(PetscRealPart(v[0])); in I2Function()
91 AppCtx *app = (AppCtx *)ctx; in I2Jacobian() local
100 Jac = shiftA + shiftV * app->Cd * v[0]; in I2Jacobian()
124 AppCtx app; in main() local
[all …]
H A Dex32.c37 PetscErrorCode InitialConditions(Vec U, DM da, AppCtx *app) in InitialConditions() argument
48 PetscCall(PetscMalloc1(lsize, &app->sw)); in InitialConditions()
60 app->sw[i - xs] = 1; in InitialConditions()
69 AppCtx *app = (AppCtx *)ctx; in EventFunction() local
76 for (i = 0; i < lsize; i++) fvalue[i] = PetscRealPart(u[i]) - app->uc; in EventFunction()
83 AppCtx *app = (AppCtx *)ctx; in PostEventFunction() local
89 app->sw[idx] = 0; in PostEventFunction()
99 AppCtx *app = (AppCtx *)ctx; in IFunction() local
129 f[i] = (u[i + 1] - 2 * u[i] + u[i - 1]) / h2 + app->sw[i - xs] * (-app->A * u[i]) - udot[i]; in IFunction()
145 AppCtx *app = (AppCtx *)ctx; in IJacobian() local
[all …]
H A Dex40.c35 AppCtx *app = (AppCtx *)ctx; in PostEventFunction() local
45 app->nbounces++; in PostEventFunction()
46 if (app->nbounces >= app->maxbounces) { in PostEventFunction()
47 … PetscCall(PetscPrintf(PETSC_COMM_SELF, "Ball bounced %" PetscInt_FMT " times\n", app->nbounces)); in PostEventFunction()
164 AppCtx app; in main() local
178 app.nbounces = 0; in main()
179 app.maxbounces = 10; in main()
181 PetscCall(PetscOptionsInt("-maxbounces", "", "", app.maxbounces, &app.maxbounces, NULL)); in main()
243 …ll(TSSetEventHandler(ts, 1, direction, terminate, EventFunction, PostEventFunction, (void *)&app)); in main()
256 app.nbounces = 0; in main()
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DAO.pyx55 app: Sequence[int] | IS,
62 The arrays/indices ``app`` and ``petsc`` must contain all the integers
63 ``0`` to ``len(app)-1`` with no duplicates; that is there cannot be any
69 app
88 if isinstance(app, IS):
89 isapp = (<IS>app).iset
94 app = iarray_i(app, &napp, &idxapp)
104 app: Sequence[int] | IS,
111 The arrays/indices ``app`` and ``petsc`` must contain all the integers
112 ``0`` to ``len(app)-1`` with no duplicates; that is there cannot be any
[all …]
/petsc/doc/ext/
H A Dhtml5_petsc.py20 def setup(app: Sphinx) -> None:
21 _check_version(app)
23 app.connect('builder-inited', _setup_translators)
27 def _check_version(app: Sphinx) -> None:
29 app.require_sphinx('%s.%s' % (sphinx_version_info_source[0], sphinx_version_info_source[1]))
36 def _setup_translators(app: Sphinx) -> None:
44 if app.builder.format != 'html':
47 for name, klass in app.registry.translators.items():
56 app.set_translator(name, translator, override=True)
62 app.builder.default_translator_class,
[all …]
/petsc/src/ts/tutorials/hybrid/
H A Dex1.c133 AppCtx app; in main() local
144 app.mode = 1; in main()
145 app.lambda1 = 2.75; in main()
146 app.lambda2 = 0.36; in main()
149 PetscCall(PetscOptionsReal("-lambda1", "", "", app.lambda1, &app.lambda1, NULL)); in main()
150 PetscCall(PetscOptionsReal("-lambda2", "", "", app.lambda2, &app.lambda2, NULL)); in main()
175 PetscCall(TSSetIFunction(ts, NULL, (TSIFunctionFn *)IFunction, &app)); in main()
176 PetscCall(TSSetIJacobian(ts, A, A, (TSIJacobianFn *)IJacobian, &app)); in main()
194 …ll(TSSetEventHandler(ts, 1, direction, terminate, EventFunction, PostEventFunction, (void *)&app)); in main()
H A Dex1fd.c194 AppCtx app; in main() local
209 app.mode = 1; in main()
210 app.lambda1 = 2.75; in main()
211 app.lambda2 = 0.36; in main()
214 PetscCall(PetscOptionsReal("-lambda1", "", "", app.lambda1, &app.lambda1, NULL)); in main()
215 PetscCall(PetscOptionsReal("-lambda2", "", "", app.lambda2, &app.lambda2, NULL)); in main()
247 PetscCall(TSSetIFunction(ts, NULL, (TSIFunctionFn *)IFunction, &app)); in main()
248 PetscCall(TSSetIJacobian(ts, A, A, (TSIJacobianFn *)IJacobian, &app)); in main()
266 …ll(TSSetEventHandler(ts, 1, direction, terminate, EventFunction, PostEventFunction, (void *)&app)); in main()
281 PetscCall(FWDRun(ts, U, (void *)&app)); in main()
[all …]
H A Dex1fwd.c224 AppCtx app; in main() local
236 app.mode = 1; in main()
237 app.lambda1 = 2.75; in main()
238 app.lambda2 = 0.36; in main()
239 app.print_time = 1. / 256.; in main()
243 PetscCall(PetscOptionsReal("-lambda1", "", "", app.lambda1, &app.lambda1, NULL)); in main()
244 PetscCall(PetscOptionsReal("-lambda2", "", "", app.lambda2, &app.lambda2, NULL)); in main()
282 PetscCall(TSSetIFunction(ts, NULL, (TSIFunctionFn *)IFunction, &app)); in main()
283 PetscCall(TSSetIJacobian(ts, A, A, (TSIJacobianFn *)IJacobian, &app)); in main()
292 PetscCall(TSSetRHSJacobianP(ts, Ap, RHSJacobianP, &app)); in main()
[all …]
H A Dex1adj.c201 AppCtx app; in main() local
215 app.mode = 1; in main()
216 app.lambda1 = 2.75; in main()
217 app.lambda2 = 0.36; in main()
221 PetscCall(PetscOptionsReal("-lambda1", "", "", app.lambda1, &app.lambda1, NULL)); in main()
222 PetscCall(PetscOptionsReal("-lambda2", "", "", app.lambda2, &app.lambda2, NULL)); in main()
255 PetscCall(TSSetIFunction(ts, NULL, (TSIFunctionFn *)IFunction, &app)); in main()
256 PetscCall(TSSetIJacobian(ts, A, A, (TSIJacobianFn *)IJacobian, &app)); in main()
257 PetscCall(TSSetRHSJacobianP(ts, Ap, RHSJacobianP, &app)); in main()
280 …ll(TSSetEventHandler(ts, 1, direction, terminate, EventFunction, PostEventFunction, (void *)&app)); in main()
/petsc/src/vec/is/ao/impls/mapping/
H A Daomapping.c11 PetscInt *app; /* app[i] is the partner for petsc[appPerm[i]] */ member
22 PetscCall(PetscFree4(aomap->app, aomap->appPerm, aomap->petsc, aomap->petscPerm)); in AODestroy_Mapping()
41 … "%" PetscInt_FMT " %" PetscInt_FMT " %" PetscInt_FMT "\n", i, aomap->app[i], aomap->petsc[ao… in AOView_Mapping()
49 PetscInt *app = aomap->app; in AOPetscToApplication_Mapping() local
76 else ia[i] = app[perm[mid]]; in AOPetscToApplication_Mapping()
84 PetscInt *app = aomap->app; in AOApplicationToPetsc_Mapping() local
106 if (idex == app[mid]) break; in AOApplicationToPetsc_Mapping()
107 else if (idex < app[mid]) high = mid - 1; in AOApplicationToPetsc_Mapping()
149 PetscInt *app; in AOMappingHasApplicationIndex() local
156 app = aomap->app; in AOMappingHasApplicationIndex()
[all …]
/petsc/src/ts/tests/
H A Dex21.c34 …MDALocalInfo *info, PetscReal t, PetscScalar **x, PetscScalar **xdot, PetscScalar **f, AppCtx *app) in FormIFunctionLocal() argument
41 lambda = app->lambda; in FormIFunctionLocal()
74 …scReal t, PetscScalar **x, PetscScalar **xdot, PetscScalar shift, Mat jac, Mat jacpre, AppCtx *app) in FormIJacobianLocal() argument
81 lambda = app->lambda; in FormIJacobianLocal()
145 AppCtx app; in main() local
154 app.lambda = 6.8; in main()
155 app.lambda = 6.0; in main()
156 PetscCall(PetscOptionsReal("-lambda", "", "", app.lambda, &app.lambda, NULL)); in main()
177 …ll(DMDATSSetIFunctionLocal(da, INSERT_VALUES, (DMDATSIFunctionLocalFn *)FormIFunctionLocal, &app)); in main()
178 PetscCall(DMDATSSetIJacobianLocal(da, (DMDATSIJacobianLocalFn *)FormIJacobianLocal, &app)); in main()
/petsc/src/vec/is/ao/impls/basic/
H A Daobasic.c9 PetscInt *app; /* app[i] is the partner for the ith PETSc slot */ member
30 …" PetscInt_FMT " %3" PetscInt_FMT " %3" PetscInt_FMT "\n", i, aobasic->app[i], i, aobasic->pet… in AOView_Basic()
42 PetscCall(PetscFree2(aobasic->app, aobasic->petsc)); in AODestroy_Basic()
55 ia[i] = aobasic->app[ia[i]]; in AOPetscToApplication_Basic()
104 for (j = 0; j < block; j++) temp[i * block + j] = array[aobasic->app[i] * block + j]; in AOApplicationToPetscPermuteInt_Basic()
136 for (j = 0; j < block; j++) temp[i * block + j] = array[aobasic->app[i] * block + j]; in AOApplicationToPetscPermuteReal_Basic()
223 PetscCall(PetscCalloc2(N, &aobasic->app, N, &aobasic->petsc)); in AOCreate_Basic()
228app[ip], PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Duplicate in PETSc ordering at position %" Pe… in AOCreate_Basic()
229 aobasic->app[ip] = ia + 1; in AOCreate_Basic()
237 aobasic->app[i]--; in AOCreate_Basic()
[all …]
/petsc/src/binding/petsc4py/demo/legacy/wrap-swig/
H A Drun_demo.py37 app = App(da, lambda_) variable
41 snes.setFunction(app.formFunction, F)
43 snes.setJacobian(app.formJacobian, J)
48 app.formInitGuess(X)
/petsc/src/binding/petsc4py/demo/legacy/wrap-f2py/
H A Drun_demo.py47 app = App(da, lambda_) variable
51 snes.setFunction(app.formFunction, F)
53 snes.setJacobian(app.formJacobian, J)
58 app.formInitGuess(snes, X)
/petsc/share/petsc/
H A DMakefile.basic.user34 # For a multi-file case, suppose you have the source files app.c [with main()], b.c, and c.cxx,
37 # app : b.o c.o
43 # myapp : app.o b.o c.o
49 # APP = bin/app
50 # OBJS = obj/app.o obj/b.o obj/c.o
/petsc/src/vec/is/ao/tests/
H A Dex1.c18 const PetscInt *app; in main() local
73 PetscCall(ISGetIndices(isapp, &app)); in main()
74 PetscCall(AOCreateMemoryScalable(PETSC_COMM_WORLD, n, app, NULL, &ao)); in main()
75 PetscCall(ISRestoreIndices(isapp, &app)); in main()
/petsc/src/binding/petsc4py/docs/source/
H A Dconf.py212 def _setup_autodoc(app): argument
269 app.add_autodocumenter(ClassDocumenter, override=True)
270 app.add_autodocumenter(ExceptionDocumenter, override=True)
361 def setup(app): argument
366 _setup_autodoc(app)
/petsc/systems/Apple/OSX/examples/PETSc cocoa example/PETSc cocoa example.xcodeproj/
H A Dproject.pbxproj22 …cocoa example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInI…
65 D8F8285315CB0A080091B85A /* PETSc cocoa example.app */,
130 productReference = D8F8285315CB0A080091B85A /* PETSc cocoa example.app */;
309 WRAPPER_EXTENSION = app;
324 WRAPPER_EXTENSION = app;
/petsc/systems/Apple/iOS/examples/Basic/Classes/
H A DiphoneAppDelegate.m22 // Override point for customization after app launch
/petsc/doc/community/
H A Dindex.md5 [Follow PETSc on BlueSky](https://bsky.app/profile/petsc.org).
/petsc/systems/Apple/iOS/examples/testopengl/Classes/
H A DiphoneAppDelegate.m22 // Override point for customization after app launch
/petsc/src/vec/is/ao/impls/memscalable/
H A Daomemscalable.c25 PetscInt *app, *app_loc, *petsc, *petsc_loc, len, j; in AOView_MemoryScalable() local
42 PetscCall(PetscMalloc2(map->N, &app, map->N, &petsc)); in AOView_MemoryScalable()
51 app_loc = app + map->range[i]; in AOView_MemoryScalable()
58 PetscCall(PetscFree2(app, petsc)); in AOView_MemoryScalable()
487 const PetscInt *app = myapp, *petsc = mypetsc; in AOCreateMemoryScalable() local
490 PetscCall(ISCreateGeneral(comm, napp, app, PETSC_USE_POINTER, &isapp)); in AOCreateMemoryScalable()

12