forked from AMReX-Combustion/PelePhysics
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gjs.py
48 lines (44 loc) · 1.27 KB
/
gjs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"""Gauss-Jordan functions."""
import ceptr.writer as cw
def emptygjs(fstream):
"""Write an empty gauss-jordan solver."""
cw.writer(fstream)
cw.writer(fstream, cw.comment("gauss-jordan solver external routine"))
cw.writer(
fstream,
cw.comment(
"Replace this routine with the one generated by the Gauss Jordan"
" solver of DW"
),
)
cw.writer(
fstream,
"AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void"
" sgjsolve(amrex::Real* /*A*/, amrex::Real* /*x*/, amrex::Real*"
" /*b*/) {",
)
cw.writer(
fstream,
'amrex::Abort("sgjsolve not implemented, choose a different solver ");',
)
cw.writer(fstream, "}")
cw.writer(fstream)
cw.writer(
fstream,
cw.comment(
"Replace this routine with the one generated by the Gauss Jordan"
" solver of DW"
),
)
cw.writer(
fstream,
"AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void"
" sgjsolve_simplified(amrex::Real* /*A*/, amrex::Real* /*x*/,"
" amrex::Real* /*b*/) {",
)
cw.writer(
fstream,
'amrex::Abort("sgjsolve_simplified not implemented, choose a'
' different solver ");',
)
cw.writer(fstream, "}")