Home
last modified time | relevance | path

Searched refs:h (Results 1 – 25 of 437) sorted by relevance

12345678910>>...18

/petsc/src/mat/utils/
H A Dpheap.c32 #define Value(h, loc) ((h)->base[loc].value) argument
33 #define Id(h, loc) ((h)->base[loc].id) argument
35 static inline void Swap(PetscHeap h, PetscInt loc, PetscInt loc2) in Swap() argument
38 id = Id(h, loc); in Swap()
39 val = Value(h, loc); in Swap()
40 h->base[loc].id = Id(h, loc2); in Swap()
41 h->base[loc].value = Value(h, loc2); in Swap()
42 h->base[loc2].id = id; in Swap()
43 h->base[loc2].value = val; in Swap()
45 static inline PetscInt MinChild(PetscHeap h, PetscInt loc) in MinChild() argument
[all …]
/petsc/include/petsc/private/khash/
H A Dkhash.h208 extern void kh_destroy_##name(kh_##name##_t *h); \
209 extern void kh_clear_##name(kh_##name##_t *h); \
210 extern khint_t kh_get_##name(const kh_##name##_t *h, khkey_t key); \
211 extern int kh_resize_##name(kh_##name##_t *h, khint_t new_n_buckets); \
212 extern khint_t kh_put_##name(kh_##name##_t *h, khkey_t key, int *ret); \
213 extern void kh_del_##name(kh_##name##_t *h, khint_t x);
219 SCOPE void kh_destroy_##name(kh_##name##_t *h) \
221 if (h) { \
222 kfree((void *)h->keys); kfree(h->flags); \
223 kfree((void *)h->vals); \
[all …]
/petsc/src/sys/classes/draw/tests/
H A Dex7.c9 int i, j, w, h; in main() local
27 PetscCall(PetscDrawGetWindowSize(draw, &w, &h)); in main()
28 PetscCall(PetscDrawSetCoordinates(draw, 0, 0, --w, --h)); in main()
33 PetscCall(PetscDrawLine(draw, 0, h, 0, h, r)); in main()
34 PetscCall(PetscDrawLine(draw, w, h, w, h, r)); in main()
37 PetscCall(PetscDrawLine(draw, 0 + 2, h, w - 2, h, k)); in main()
38 PetscCall(PetscDrawLine(draw, 0, 0 + 2, 0, h - 2, k)); in main()
39 PetscCall(PetscDrawLine(draw, w, 0 + 2, w, h - 2, k)); in main()
41 PetscCall(PetscDrawLine(draw, 0 + 2, h / 2, w - 2, h - 2, b)); in main()
42 PetscCall(PetscDrawLine(draw, 0 + 1, h - 1, w - 1, 0 + 1, b)); in main()
[all …]
/petsc/src/mat/tests/
H A Dex29.c8 PetscHeap h; in main() local
13 PetscCall(PetscHeapCreate(9, &h)); in main()
14 PetscCall(PetscHeapAdd(h, 0, 100)); in main()
15 PetscCall(PetscHeapAdd(h, 1, 19)); in main()
16 PetscCall(PetscHeapAdd(h, 2, 36)); in main()
17 PetscCall(PetscHeapAdd(h, 3, 17)); in main()
18 PetscCall(PetscHeapAdd(h, 4, 3)); in main()
19 PetscCall(PetscHeapAdd(h, 5, 25)); in main()
20 PetscCall(PetscHeapAdd(h, 6, 1)); in main()
21 PetscCall(PetscHeapAdd(h, 8, 2)); in main()
[all …]
/petsc/src/sys/logging/handler/interface/
H A Dloghandler.c30 PetscLogHandler h; in PetscLogHandlerCreate() local
36 PetscCall(PetscNew(&h)); in PetscLogHandlerCreate()
37 …PetscCall(PetscHeaderCreate_Private((PetscObject)(h), PETSCLOGHANDLER_CLASSID, "PetscLogHandler", … in PetscLogHandlerCreate()
38 *handler = h; in PetscLogHandlerCreate()
56 PetscLogHandler h; in PetscLogHandlerDestroy() local
60 h = *handler; in PetscLogHandlerDestroy()
62 PetscValidHeaderSpecific(h, PETSCLOGHANDLER_CLASSID, 1); in PetscLogHandlerDestroy()
63 if (--((PetscObject)h)->refct > 0) PetscFunctionReturn(PETSC_SUCCESS); in PetscLogHandlerDestroy()
64 PetscTryTypeMethod(h, destroy); in PetscLogHandlerDestroy()
65 PetscCall(PetscLogStateDestroy(&h->state)); in PetscLogHandlerDestroy()
[all …]
/petsc/include/petsc/private/
H A Dpetsclegacycupmblas.h17 …(a, b, c, d, e, f, g, h, i, j, k, l) cublasCgemv((a), (b), (c), (d), (cuComplex *)(e), (cuCo… argument
18 …sXgemm(a, b, c, d, e, f, g, h, i, j, k, l, m, n) cublasCgemm((a), (b), (c), (d), (e), (f), (cuComp… argument
19 …sXgeam(a, b, c, d, e, f, g, h, i, j, k, l, m) cublasCgeam((a), (b), (c), (d), (e), (cuComplex *… argument
20 #define cublasXgemvStridedBatched(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) \ argument
21 …d((a), (b), (c), (d), (const cuComplex *)(e), (const cuComplex *)(f), (g), (h), (const cuComplex *…
31 … d, e, f, g, h, i, j, k, l) cublasZgemv((a), (b), (c), (d), (cuDoubleComplex *)(e), (cuDoubl… argument
32 …(a, b, c, d, e, f, g, h, i, j, k, l, m, n) cublasZgemm((a), (b), (c), (d), (e), (f), (cuDoubleComp… argument
33 …(a, b, c, d, e, f, g, h, i, j, k, l, m) cublasZgeam((a), (b), (c), (d), (e), (cuDoubleComplex *… argument
34 #define cublasXgemvStridedBatched(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) \ argument
35 …(c), (d), (const cuDoubleComplex *)(e), (const cuDoubleComplex *)(f), (g), (h), (const cuDoubleCom…
[all …]
H A Dhashtable.h38 #define kh_reset(name, h) \ argument
40 if (h) { \
41 kfree((h)->keys); \
42 kfree((h)->flags); \
43 kfree((h)->vals); \
44 memset((h), 0x00, sizeof(*(h))); \
57 #define kh_foreach(h, kvar, vvar, code) \ argument
60 for (__i = kh_begin(h); __i != kh_end(h); ++__i) { \
61 if (!kh_exist(h, __i)) continue; \
62 (kvar) = kh_key(h, __i); \
[all …]
/petsc/src/mat/impls/aij/seq/seqcusparse/
H A Dcusparsematimpl.h23 …csrilu02_bufferSize(a, b, c, d, e, f, g, h, i) cusparseCcsrilu02_bufferSize(a, b, c, d, (cuComple… argument
24 …eXcsrilu02_analysis(a, b, c, d, e, f, g, h, i, j) cusparseCcsrilu02_analysis(a, b, c, d, (cuComple… argument
25 …e cusparseXcsrilu02(a, b, c, d, e, f, g, h, i, j) cusparseCcsrilu02(a, b, c, d, (cuComple… argument
26 …Xcsric02_bufferSize(a, b, c, d, e, f, g, h, i) cusparseCcsric02_bufferSize(a, b, c, d, (cuComple… argument
27 …seXcsric02_analysis(a, b, c, d, e, f, g, h, i, j) cusparseCcsric02_analysis(a, b, c, d, (cuComple… argument
28 …ne cusparseXcsric02(a, b, c, d, e, f, g, h, i, j) cusparseCcsric02(a, b, c, d, (cuComple… argument
32 …ilu02_bufferSize(a, b, c, d, e, f, g, h, i) cusparseZcsrilu02_bufferSize(a, b, c, d, (cuDoubleCom… argument
33 …srilu02_analysis(a, b, c, d, e, f, g, h, i, j) cusparseZcsrilu02_analysis(a, b, c, d, (cuDoubleCom… argument
34 …usparseXcsrilu02(a, b, c, d, e, f, g, h, i, j) cusparseZcsrilu02(a, b, c, d, (cuDoubleCom… argument
35 …ric02_bufferSize(a, b, c, d, e, f, g, h, i) cusparseZcsric02_bufferSize(a, b, c, d, (cuDoubleCom… argument
[all …]
/petsc/src/mat/impls/aij/seq/seqhipsparse/
H A Dhipsparsematimpl.h33 …srilu02_bufferSize(a, b, c, d, e, f, g, h, i) hipsparseCcsrilu02_bufferSize(a, b, c, d, (hipCompl… argument
34 …Xcsrilu02_analysis(a, b, c, d, e, f, g, h, i, j) hipsparseCcsrilu02_analysis(a, b, c, d, (hipCompl… argument
35 …hipsparseXcsrilu02(a, b, c, d, e, f, g, h, i, j) hipsparseCcsrilu02(a, b, c, d, (hipCompl… argument
36 …csric02_bufferSize(a, b, c, d, e, f, g, h, i) hipsparseCcsric02_bufferSize(a, b, c, d, (hipCompl… argument
37 …eXcsric02_analysis(a, b, c, d, e, f, g, h, i, j) hipsparseCcsric02_analysis(a, b, c, d, (hipCompl… argument
38 … hipsparseXcsric02(a, b, c, d, e, f, g, h, i, j) hipsparseCcsric02(a, b, c, d, (hipCompl… argument
42 …lu02_bufferSize(a, b, c, d, e, f, g, h, i) hipsparseZcsrilu02_bufferSize(a, b, c, d, (hipDoubleCo… argument
43 …rilu02_analysis(a, b, c, d, e, f, g, h, i, j) hipsparseZcsrilu02_analysis(a, b, c, d, (hipDoubleCo… argument
44 …sparseXcsrilu02(a, b, c, d, e, f, g, h, i, j) hipsparseZcsrilu02(a, b, c, d, (hipDoubleCo… argument
45 …ic02_bufferSize(a, b, c, d, e, f, g, h, i) hipsparseZcsric02_bufferSize(a, b, c, d, (hipDoubleCo… argument
[all …]
/petsc/
H A D.gitignore75 *.h.html
82 src/dm/mesh/tutorials/*_quadrature.h
107 src/binding/petsc4py/src/include/petsc4py/petsc4py.PETSc.h
108 src/binding/petsc4py/src/include/petsc4py/petsc4py.PETSc_api.h
110 src/binding/petsc4py/src/libpetsc4py/libpetsc4py.h
112 src/snes/tutorials/ex52\.h
113 src/snes/tutorials/ex52_inline\.h
114 src/snes/tutorials/ex56_inline\.h
115 src/snes/tutorials/ex56\.h
117 src/snes/tutorials/ex57_inline\.h
[all …]
/petsc/src/sys/tutorials/
H A Dex7.c61 static PetscErrorCode PetscLogHandlerEventBegin_Ex7(PetscLogHandler h, PetscLogEvent e, PetscObject… in PetscLogHandlerEventBegin_Ex7() argument
71 PetscCall(PetscLogHandlerGetState(h, &state)); in PetscLogHandlerEventBegin_Ex7()
75 ctx = (HandlerCtx)h->data; in PetscLogHandlerEventBegin_Ex7()
84 static PetscErrorCode PetscLogHandlerEventEnd_Ex7(PetscLogHandler h, PetscLogEvent e, PetscObject o… in PetscLogHandlerEventEnd_Ex7() argument
92 ctx = (HandlerCtx)h->data; in PetscLogHandlerEventEnd_Ex7()
93 PetscCall(PetscLogHandlerGetState(h, &state)); in PetscLogHandlerEventEnd_Ex7()
102 static PetscErrorCode PetscLogHandlerEventSync_Ex7(PetscLogHandler h, PetscLogEvent e, MPI_Comm com… in PetscLogHandlerEventSync_Ex7() argument
112 PetscCall(PetscLogHandlerGetState(h, &state)); in PetscLogHandlerEventSync_Ex7()
118 static PetscErrorCode PetscLogHandlerObjectCreate_Ex7(PetscLogHandler h, PetscObject obj) in PetscLogHandlerObjectCreate_Ex7() argument
123 ctx = (HandlerCtx)h->data; in PetscLogHandlerObjectCreate_Ex7()
[all …]
/petsc/src/vec/is/utils/hdf5/
H A Dhdf5io.c37 HDF5ReadCtx h = NULL; in PetscViewerHDF5ReadInitialize_Private() local
41 PetscCall(PetscNew(&h)); in PetscViewerHDF5ReadInitialize_Private()
42 h->name = name; in PetscViewerHDF5ReadInitialize_Private()
43 PetscCall(PetscViewerHDF5OpenGroup(viewer, NULL, &h->file, &h->group)); in PetscViewerHDF5ReadInitialize_Private()
44 PetscCallHDF5Return(h->dataset, H5Dopen2, (h->group, name, H5P_DEFAULT)); in PetscViewerHDF5ReadInitialize_Private()
45 PetscCallHDF5Return(h->dataspace, H5Dget_space, (h->dataset)); in PetscViewerHDF5ReadInitialize_Private()
46 …PetscCall(PetscViewerHDF5ReadAttribute(viewer, name, "complex", PETSC_BOOL, &h->complexVal, &h->co… in PetscViewerHDF5ReadInitialize_Private()
51 h->runs = 0; in PetscViewerHDF5ReadInitialize_Private()
52 h->cind = NULL; in PetscViewerHDF5ReadInitialize_Private()
53 *ctx = h; in PetscViewerHDF5ReadInitialize_Private()
[all …]
/petsc/src/ts/tutorials/output/
H A Dex8_1.out1 step 0 t=0.00000000e+00 h= 1.00e-03 |x|= 0.00e+00 |x_e|= 0.00e+00 |x-x_e|= 0.00e+00
2 step 1 t=1.00000000e-03 h= 1.00e-02 |x|= 9.95e-03 |x_e|= 9.95e-03 |x-x_e|= 2.52e-10
3 step 2 t=1.10000000e-02 h= 1.00e-01 |x|= 1.04e-01 |x_e|= 1.04e-01 |x-x_e|= 2.17e-06
4 step 3 t=1.11000000e-01 h= 1.87e-01 |x|= 6.74e-01 |x_e|= 6.69e-01 |x-x_e|= 5.73e-03
5 step 4 t=2.98272277e-01 h= 3.49e-01 |x|= 9.36e-01 |x_e|= 9.25e-01 |x-x_e|= 1.04e-02
6 step 5 t=6.47239215e-01 h= 9.51e-01 |x|= 8.52e-01 |x_e|= 8.48e-01 |x-x_e|= 3.74e-03
7 step 6 t=1.59828874e+00 h= 4.07e+00 |x|= 7.61e-02 |x_e|= 7.18e-02 |x-x_e|= 4.32e-03
8 step 7 t=4.67458203e+00 h= 3.16e+00 |x|= 1.55e-01 |x_e|= 1.36e-01 |x-x_e|= 1.84e-02
9 step 8 t=7.83373000e+00 h= 3.28e+00 |x|= 1.39e-01 |x_e|= 1.19e-01 |x-x_e|= 1.96e-02
10 step 9 t=1.11123905e+01 h= 3.02e+00 |x|= 9.42e-03 |x_e|= 1.71e-02 |x-x_e|= 2.65e-02
[all …]
/petsc/src/sys/tests/linter/output/
H A DtestValidPointers.patch2 #include <petsc/private/petscimpl.h>
4 … *a, char *b, PetscInt *c, PetscMPIInt *d, PetscInt *e, PetscBool *f, PetscScalar *g, PetscReal *h)
5 … *a, char *b, PetscInt *c, PetscMPIInt *d, PetscInt *e, PetscBool *f, PetscScalar *g, PetscReal *h)
49 PetscAssertPointer(h, 9);
55 PetscAssertPointer(h, 9);
60 - PetscAssertPointer(h, 9);
61 + PetscAssertPointer(h, 8);
67 … *a, char *b, PetscInt *c, PetscMPIInt *d, PetscInt *e, PetscBool *f, PetscScalar *g, PetscReal *h)
68 … *a, char *b, PetscInt *c, PetscMPIInt *d, PetscInt *e, PetscBool *f, PetscScalar *g, PetscReal *h)
112 PetscAssertPointer(h, 9);
[all …]
/petsc/src/sys/classes/draw/impls/x/
H A Dxtext.c19 PetscErrorCode PetscDrawXiFontFixed(PetscDraw_X *XBWin, int w, int h, PetscDrawXiFont **outfont) in PetscDrawXiFontFixed() argument
26 PetscCall(PetscDrawXiMatchFontSize(font, w, h)); in PetscDrawXiFontFixed()
37 int w, h, descent; member
85 nfonts[j].h = info[i].ascent + info[i].descent; in PetscDrawXiInitFonts()
87 if (nfonts[j].w <= 0 || nfonts[j].h <= 0) continue; in PetscDrawXiInitFonts()
107 nfonts[j].h = info[i].ascent + info[i].descent; in PetscDrawXiInitFonts()
109 if (nfonts[j].w <= 0 || nfonts[j].h <= 0) continue; in PetscDrawXiInitFonts()
119 static PetscErrorCode PetscDrawXiMatchFontSize(PetscDrawXiFont *font, int w, int h) in PetscDrawXiMatchFontSize() argument
125 if (nfonts[i].w == w && nfonts[i].h == h) { in PetscDrawXiMatchFontSize()
127 font->font_h = h; in PetscDrawXiMatchFontSize()
[all …]
H A Dxops.c11 #define YTRANS(draw, xwin, y) (((xwin)->h - 1) - (int)(((xwin)->h - 1) * ((draw)->port_yl + (((y - …
14 #define JTRANS(draw, xwin, j) ((draw)->coor_yl + (((PetscReal)(j)) / ((xwin)->h - 1) + (draw)->port…
19 int xa, ya, xb, yb, xmax = XiWin->w - 1, ymax = XiWin->h - 1; in PetscDrawSetViewport_X()
134 int x, y, w, h, c = (c1 + c2 + c3 + c4) / 4; in PetscDrawRectangle_X() local
142 h = YTRANS(draw, XiWin, yl) + 1 - y; in PetscDrawRectangle_X()
143 if (h <= 0) h = 1; in PetscDrawRectangle_X()
144 XFillRectangle(XiWin->disp, PetscDrawXiDrawable(XiWin), XiWin->gc.set, x, y, w, h); in PetscDrawRectangle_X()
151 int xA, yA, w, h; in PetscDrawEllipse_X() local
159 h = YTRANS(draw, XiWin, y - b / 2) + 1 - yA; in PetscDrawEllipse_X()
160 h = PetscAbs(h); in PetscDrawEllipse_X()
[all …]
/petsc/src/ksp/ksp/tutorials/
H A Dex67.c141 PetscReal h; in FormRightHandSide() local
157 h = 1.0 / M; in FormRightHandSide()
158 for (i = xs; i < xs + xm; i++) ff[i] = -PetscSinReal(2.0 * PETSC_PI * i * h) + 1.0; in FormRightHandSide()
173 PetscReal h; in FormMatrix() local
184 h = 1.0 / M; in FormMatrix()
192 A[0] = A[2] = 1.0 / (h * h); in FormMatrix()
193 A[1] = -2.0 / (h * h); in FormMatrix()
216 A[0] = A[2] = 1.0 / (h * h); in FormMatrix()
217 A[1] = -2.0 / (h * h); in FormMatrix()
224 A[0] = A[2] = 1.0 / (h * h); in FormMatrix()
[all …]
/petsc/src/sys/logging/handler/impls/trace/
H A Dlogtrace.c12 static PetscErrorCode PetscLogHandlerEventBegin_Trace(PetscLogHandler h, PetscLogEvent event, Petsc… in PetscLogHandlerEventBegin_Trace() argument
14 PetscLogHandler_Trace tr = (PetscLogHandler_Trace)h->data; in PetscLogHandlerEventBegin_Trace()
24 PetscCallMPI(MPI_Comm_rank(PetscObjectComm((PetscObject)h), &rank)); in PetscLogHandlerEventBegin_Trace()
25 PetscCall(PetscLogHandlerGetState(h, &state)); in PetscLogHandlerEventBegin_Trace()
37 static PetscErrorCode PetscLogHandlerEventEnd_Trace(PetscLogHandler h, PetscLogEvent event, PetscOb… in PetscLogHandlerEventEnd_Trace() argument
39 PetscLogHandler_Trace tr = (PetscLogHandler_Trace)h->data; in PetscLogHandlerEventEnd_Trace()
48 PetscCallMPI(MPI_Comm_rank(PetscObjectComm((PetscObject)h), &rank)); in PetscLogHandlerEventEnd_Trace()
49 PetscCall(PetscLogHandlerGetState(h, &state)); in PetscLogHandlerEventEnd_Trace()
61 static PetscErrorCode PetscLogHandlerDestroy_Trace(PetscLogHandler h) in PetscLogHandlerDestroy_Trace() argument
64 PetscCall(PetscFree(h->data)); in PetscLogHandlerDestroy_Trace()
[all …]
/petsc/lib/petsc/bin/maint/
H A Dcreatepatch22 if [ ! -f include/petscversion.h ]; then
46 version_release=`grep '^#define PETSC_VERSION_RELEASE ' include/petscversion.h |tr -s ' ' | cut -d …
47 version_major=`grep '^#define PETSC_VERSION_MAJOR ' include/petscversion.h |tr -s ' ' | cut -d ' ' …
48 version_minor=`grep '^#define PETSC_VERSION_MINOR ' include/petscversion.h |tr -s ' ' | cut -d ' ' …
49 version_subminor=`grep '^#define PETSC_VERSION_SUBMINOR ' include/petscversion.h |tr -s ' ' | cut -…
68 /bin/mv include/petscversion.h include/petscversion.h.bak
69 cat include/petscversion.h.bak | \
70 …ION_SUBMINOR .*/#define PETSC_VERSION_SUBMINOR ${new_version_subminor}/" > include/petscversion.h
71 /bin/rm -f include/petscversion.h.bak
86 git commit -m"Increase patchlevel to ${newver}" include/petscversion.h doc/install/download.md src/…
/petsc/src/sys/logging/handler/impls/nested/
H A Dlognested.c5 PETSC_INTERN PetscErrorCode PetscLogHandlerNestedSetThreshold(PetscLogHandler h, PetscLogDouble new… in PetscLogHandlerNestedSetThreshold() argument
7 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)h->data; in PetscLogHandlerNestedSetThreshold()
17 static PetscErrorCode PetscLogEventGetNestedEvent(PetscLogHandler h, PetscLogEvent e, PetscLogEvent… in PetscLogEventGetNestedEvent() argument
19 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)h->data; in PetscLogEventGetNestedEvent()
26 PetscCall(PetscLogHandlerGetState(h, &state)); in PetscLogEventGetNestedEvent()
48 static PetscErrorCode PetscLogStageGetNestedEvent(PetscLogHandler h, PetscLogStage stage, PetscLogE… in PetscLogStageGetNestedEvent() argument
50 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)h->data; in PetscLogStageGetNestedEvent()
57 PetscCall(PetscLogHandlerGetState(h, &state)); in PetscLogStageGetNestedEvent()
85 static PetscErrorCode PetscLogNestedFindNestedId(PetscLogHandler h, NestedId orig_id, PetscInt *pop… in PetscLogNestedFindNestedId() argument
87 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)h->data; in PetscLogNestedFindNestedId()
[all …]
/petsc/src/sys/tests/linter/
H A DtestValidPointers.c3 … *a, char *b, PetscInt *c, PetscMPIInt *d, PetscInt *e, PetscBool *f, PetscScalar *g, PetscReal *h) in testValidPointers() argument
13 PetscAssertPointer(h, 9); in testValidPointers()
23 PetscAssertPointer(h, 8); in testValidPointers()
27 … *a, char *b, PetscInt *c, PetscMPIInt *d, PetscInt *e, PetscBool *f, PetscScalar *g, PetscReal *h) in testValidPointers2() argument
37 PetscAssertPointer(h, 9); in testValidPointers2()
47 PetscAssertPointer(h, 8); in testValidPointers2()
51 …ar **b, PetscInt **c, PetscMPIInt **d, PetscInt **e, PetscBool **f, PetscScalar **g, PetscReal **h) in testValidPointers3() argument
61 PetscAssertPointer(h, 8); in testValidPointers3()
71 PetscAssertPointer(h, 8); in testValidPointers3()
/petsc/src/ts/tutorials/network/
H A DpipeImpls.c27 x[i].h = H0 - c * Q0 * PetscAbsScalar(Q0) * coords[i]; in PipeComputeSteadyState()
52 return (x[i + 1].h - x[i].h) / dx; in dhdx()
54 return (x[i].h - x[i - 1].h) / dx; in dhdx()
56 return (x[i + 1].h - x[i - 1].h) / (2 * dx); in dhdx()
77 ha = xold[i - 1].h; in PipeIFunctionLocal_Lax()
78 hb = xold[i + 1].h; in PipeIFunctionLocal_Lax()
86 f[2 * (i - 1) + 3] = (x[i].h - xold_i) + dt * c * dqdx(xold, i, ilast, dx); in PipeIFunctionLocal_Lax()
90 …] = x[start].q - xold[start + 1].q - ((GRAV * A) / a) * (x[start].h - xold[start + 1].h) + dt * R … in PipeIFunctionLocal_Lax()
91 …] = x[ilast].q - xold[ilast - 1].q + ((GRAV * A) / a) * (x[ilast].h - xold[ilast - 1].h) + dt * R … in PipeIFunctionLocal_Lax()
/petsc/src/ts/tutorials/advection-diffusion-reaction/
H A Dex3.c157 PetscScalar *u, h; in InitialConditions() local
165 h = 1.0 / M; in InitialConditions()
183 …mend; i++) u[i] = PetscSinScalar(PETSC_PI * i * 6. * h) + 3. * PetscSinScalar(PETSC_PI * i * 2. * in InitialConditions()
205 PetscScalar *u, ex1, ex2, sc1, sc2, h; in Solution() local
213 h = 1.0 / M; in Solution()
226 sc1 = PETSC_PI * 6. * h; in Solution()
227 sc2 = PETSC_PI * 2. * h; in Solution()
262 PetscScalar v[3], h; in RHSMatrixHeat() local
269 h = 1.0 / M; in RHSMatrixHeat()
279 v[0] = appctx->d / (h * h); in RHSMatrixHeat()
[all …]
/petsc/src/sys/objects/
H A Dinherit.c22 PetscErrorCode PetscHeaderCreate_Function(PetscErrorCode ierr, PetscObject *h, PetscClassId classid… in PetscHeaderCreate_Function() argument
26 PetscCall(PetscHeaderCreate_Private(*h, classid, class_name, descr, mansec, comm, destroy, view)); in PetscHeaderCreate_Function()
27 PetscCall(PetscLogObjectCreate(*h)); in PetscHeaderCreate_Function()
34 PetscErrorCode PetscHeaderCreate_Private(PetscObject h, PetscClassId classid, const char class_name… in PetscHeaderCreate_Private() argument
41 h->classid = classid; in PetscHeaderCreate_Private()
42 h->class_name = (char *)class_name; in PetscHeaderCreate_Private()
43 h->description = (char *)descr; in PetscHeaderCreate_Private()
44 h->mansec = (char *)mansec; in PetscHeaderCreate_Private()
45 h->refct = 1; in PetscHeaderCreate_Private()
46 h->non_cyclic_references = NULL; in PetscHeaderCreate_Private()
[all …]
/petsc/src/sys/classes/draw/impls/image/
H A Ddrawimage.c14 #define YTRANS(draw, img, y) (((img)->h - 1) - (int)(((img)->h - 1) * ((draw)->port_yl + ((((y) - (…
17 #define JTRANS(draw, img, j) ((draw)->coor_yl + (((PetscReal)(j)) / ((img)->h - 1) + (draw)->port_y…
25 int xmax = img->w - 1, ymax = img->h - 1; in PetscDrawSetViewport_Image()
173 int y = YTRANS(draw, img, yr), h = YTRANS(draw, img, yl) + 1 - y; in PetscDrawRectangle_Image() local
175 PetscImageDrawRectangle(img, x, y, w, h, c); in PetscDrawRectangle_Image()
190 int yc = YTRANS(draw, img, y), h = YTRANS(draw, img, y - b / 2) + 0 - yc; in PetscDrawEllipse_Image() local
191 if (PetscAbsReal(a - b) <= 0) w = h = PetscMin(w, h); /* workaround truncation errors */ in PetscDrawEllipse_Image()
192 PetscImageDrawEllipse(img, xc, yc, w, h, c); in PetscDrawEllipse_Image()
221 static PetscErrorCode PetscDrawStringGetSize_Image(PetscDraw draw, PetscReal *w, PetscReal *h) in PetscDrawStringGetSize_Image() argument
230 if (h) *h = th * (draw->coor_yr - draw->coor_yl) / (img->h * (draw->port_yr - draw->port_yl)); in PetscDrawStringGetSize_Image()
[all …]

12345678910>>...18