xref: /libCEED/julia/LibCEED.jl/src/Globals.jl (revision 44554ea01e90fce366fc2a203c44be15754a38d6)
1*44554ea0SWill Pazner"""
2*44554ea0SWill Pazner    CeedScalar
3*44554ea0SWill Pazner
4*44554ea0SWill PaznerScalar (floating point) type. Equivalent to `Float64`.
5*44554ea0SWill Pazner"""
6*44554ea0SWill Paznerconst CeedScalar = C.CeedScalar
7*44554ea0SWill Pazner"""
8*44554ea0SWill Pazner    CeedInt
9*44554ea0SWill Pazner
10*44554ea0SWill PaznerInteger type, used for indexing. Equivalent to `Int32`.
11*44554ea0SWill Pazner"""
12*44554ea0SWill Paznerconst CeedInt = C.CeedInt
13*44554ea0SWill Pazner
14*44554ea0SWill Pazner"""
15*44554ea0SWill Pazner    QuadMode
16*44554ea0SWill Pazner
17*44554ea0SWill PaznerOne of `GAUSS` or `GAUSS_LOBATTO`.
18*44554ea0SWill Pazner"""
19*44554ea0SWill Paznerconst QuadMode = C.CeedQuadMode
20*44554ea0SWill Paznerconst GAUSS = C.CEED_GAUSS
21*44554ea0SWill Paznerconst GAUSS_LOBATTO = C.CEED_GAUSS_LOBATTO
22*44554ea0SWill Pazner
23*44554ea0SWill Pazner"""
24*44554ea0SWill Pazner    MemType
25*44554ea0SWill Pazner
26*44554ea0SWill PaznerOne of `MEM_HOST` or `MEM_DEVICE`.
27*44554ea0SWill Pazner"""
28*44554ea0SWill Paznerconst MemType = C.CeedMemType
29*44554ea0SWill Paznerconst MEM_HOST = C.CEED_MEM_HOST
30*44554ea0SWill Paznerconst MEM_DEVICE = C.CEED_MEM_DEVICE
31*44554ea0SWill Pazner
32*44554ea0SWill Pazner"""
33*44554ea0SWill Pazner    CopyMode
34*44554ea0SWill Pazner
35*44554ea0SWill PaznerOne of `COPY_VALUES`, `USE_POINTER` or `OWN_POINTER`.
36*44554ea0SWill Pazner
37*44554ea0SWill Pazner`OWN_POINTER` is not typically supported for objects created in Julia, because those must be
38*44554ea0SWill Paznerdestroyed by the garbage collector, and cannot be freed from C.
39*44554ea0SWill Pazner"""
40*44554ea0SWill Paznerconst CopyMode = C.CeedCopyMode
41*44554ea0SWill Paznerconst COPY_VALUES = C.CEED_COPY_VALUES
42*44554ea0SWill Paznerconst USE_POINTER = C.CEED_USE_POINTER
43*44554ea0SWill Paznerconst OWN_POINTER = C.CEED_OWN_POINTER
44*44554ea0SWill Pazner
45*44554ea0SWill Pazner"""
46*44554ea0SWill Pazner    EvalMode
47*44554ea0SWill Pazner
48*44554ea0SWill PaznerEvaluation mode used in the specification of input and output fields for Q-functions, e.g.
49*44554ea0SWill Paznerin [`@interior_qf`](@ref).
50*44554ea0SWill Pazner
51*44554ea0SWill PaznerOne of:
52*44554ea0SWill Pazner- `EVAL_NONE`
53*44554ea0SWill Pazner- `EVAL_INTERP`
54*44554ea0SWill Pazner- `EVAL_GRAD`
55*44554ea0SWill Pazner- `EVAL_DIV`
56*44554ea0SWill Pazner- `EVAL_CURL`
57*44554ea0SWill Pazner- `EVAL_WEIGHT`
58*44554ea0SWill Pazner
59*44554ea0SWill PaznerSee the [libCEED
60*44554ea0SWill Paznerdocumentation](https://libceed.readthedocs.io/en/latest/api/CeedBasis/?highlight=EVAL_MODE#c.CeedEvalMode)
61*44554ea0SWill Paznerfor further information.
62*44554ea0SWill Pazner"""
63*44554ea0SWill Paznerconst EvalMode = C.CeedEvalMode
64*44554ea0SWill Paznerconst EVAL_NONE = C.CEED_EVAL_NONE
65*44554ea0SWill Paznerconst EVAL_INTERP = C.CEED_EVAL_INTERP
66*44554ea0SWill Paznerconst EVAL_GRAD = C.CEED_EVAL_GRAD
67*44554ea0SWill Paznerconst EVAL_DIV = C.CEED_EVAL_DIV
68*44554ea0SWill Paznerconst EVAL_CURL = C.CEED_EVAL_CURL
69*44554ea0SWill Paznerconst EVAL_WEIGHT = C.CEED_EVAL_WEIGHT
70*44554ea0SWill Pazner
71*44554ea0SWill Pazner"""
72*44554ea0SWill Pazner    NormType
73*44554ea0SWill Pazner
74*44554ea0SWill PaznerDenotes type of vector norm. One of `NORM_1`, `NORM_2`, or `NORM_MAX`.
75*44554ea0SWill Pazner"""
76*44554ea0SWill Paznerconst NormType = C.CeedNormType
77*44554ea0SWill Paznerconst NORM_1 = C.CEED_NORM_1
78*44554ea0SWill Paznerconst NORM_2 = C.CEED_NORM_2
79*44554ea0SWill Paznerconst NORM_MAX = C.CEED_NORM_MAX
80*44554ea0SWill Pazner
81*44554ea0SWill Pazner"""
82*44554ea0SWill Pazner    TransposeMose
83*44554ea0SWill Pazner
84*44554ea0SWill PaznerDenotes whether a linear transformation or its transpose should be applied. Either
85*44554ea0SWill Pazner`NOTRANSPOSE` or `TRANSPOSE`.
86*44554ea0SWill Pazner"""
87*44554ea0SWill Paznerconst TransposeMode = C.CeedTransposeMode
88*44554ea0SWill Paznerconst NOTRANSPOSE = C.CEED_NOTRANSPOSE
89*44554ea0SWill Paznerconst TRANSPOSE = C.CEED_TRANSPOSE
90*44554ea0SWill Pazner
91*44554ea0SWill Pazner"""
92*44554ea0SWill Pazner    Topology
93*44554ea0SWill Pazner
94*44554ea0SWill PaznerType of basis shape to create non-tensor H1 element basis. One of `LINE`, `TRIANGLE`,
95*44554ea0SWill Pazner`QUAD`, `TET`, `PYRAMID`, `PRISM`, or `HEX`.
96*44554ea0SWill Pazner
97*44554ea0SWill PaznerThe dimension can be extracted with bitshift:
98*44554ea0SWill Pazner
99*44554ea0SWill Pazner    dim = Int(topology) >> 16
100*44554ea0SWill Pazner"""
101*44554ea0SWill Paznerconst Topology = C.CeedElemTopology
102*44554ea0SWill Paznerconst LINE = C.CEED_LINE
103*44554ea0SWill Paznerconst TRIANGLE = C.CEED_TRIANGLE
104*44554ea0SWill Paznerconst QUAD = C.CEED_QUAD
105*44554ea0SWill Paznerconst TET = C.CEED_TET
106*44554ea0SWill Paznerconst PYRAMID = C.CEED_PYRAMID
107*44554ea0SWill Paznerconst PRISM = C.CEED_PRISM
108*44554ea0SWill Paznerconst HEX = C.CEED_HEX
109*44554ea0SWill Pazner
110*44554ea0SWill Paznerfunction set_globals()
111*44554ea0SWill Pazner    @doc """
112*44554ea0SWill Pazner        STRIDES_BACKEND
113*44554ea0SWill Pazner
114*44554ea0SWill Pazner    Indicate that the stride is determined by the backend.
115*44554ea0SWill Pazner    """
116*44554ea0SWill Pazner    global STRIDES_BACKEND = C.CEED_STRIDES_BACKEND[]
117*44554ea0SWill Paznerend
118