xref: /libCEED/julia/LibCEED.jl/src/Globals.jl (revision 3843268474bcba268b350aef47098b12729490a9)
144554ea0SWill Pazner"""
244554ea0SWill Pazner    CeedScalar
344554ea0SWill Pazner
4aeebdb96SWill PaznerScalar (floating point) type. Typically equivalent to `Float64`, but libCEED can be configured at
5aeebdb96SWill Paznercompile-time to use `Float32`. See also `get_scalar_type`.
644554ea0SWill Pazner"""
744554ea0SWill Paznerconst CeedScalar = C.CeedScalar
880a9ef05SNatalie Beams
944554ea0SWill Pazner"""
1044554ea0SWill Pazner    CeedInt
1144554ea0SWill Pazner
1244554ea0SWill PaznerInteger type, used for indexing. Equivalent to `Int32`.
1344554ea0SWill Pazner"""
1444554ea0SWill Paznerconst CeedInt = C.CeedInt
1544554ea0SWill Pazner
1644554ea0SWill Pazner"""
17*709403c1SSebastian Grimberg    CeedInt8
18*709403c1SSebastian Grimberg
19*709403c1SSebastian GrimbergInteger type, for small integers. Equivalent to `Int8`.
20*709403c1SSebastian Grimberg"""
21*709403c1SSebastian Grimbergconst CeedInt8 = C.CeedInt8
22*709403c1SSebastian Grimberg
23*709403c1SSebastian Grimberg"""
242eb0be0bSWill Pazner    CeedSize
252eb0be0bSWill Pazner
262eb0be0bSWill PaznerInteger type, used for array sizes. Equivalent to `Int`.
272eb0be0bSWill Pazner"""
282eb0be0bSWill Paznerconst CeedSize = C.CeedSize
292eb0be0bSWill Pazner
302eb0be0bSWill Pazner"""
3144554ea0SWill Pazner    QuadMode
3244554ea0SWill Pazner
3344554ea0SWill PaznerOne of `GAUSS` or `GAUSS_LOBATTO`.
3444554ea0SWill Pazner"""
3544554ea0SWill Paznerconst QuadMode = C.CeedQuadMode
3644554ea0SWill Paznerconst GAUSS = C.CEED_GAUSS
3744554ea0SWill Paznerconst GAUSS_LOBATTO = C.CEED_GAUSS_LOBATTO
3844554ea0SWill Pazner
3944554ea0SWill Pazner"""
4044554ea0SWill Pazner    MemType
4144554ea0SWill Pazner
4244554ea0SWill PaznerOne of `MEM_HOST` or `MEM_DEVICE`.
4344554ea0SWill Pazner"""
4444554ea0SWill Paznerconst MemType = C.CeedMemType
4544554ea0SWill Paznerconst MEM_HOST = C.CEED_MEM_HOST
4644554ea0SWill Paznerconst MEM_DEVICE = C.CEED_MEM_DEVICE
4744554ea0SWill Pazner
4844554ea0SWill Pazner"""
4944554ea0SWill Pazner    CopyMode
5044554ea0SWill Pazner
5144554ea0SWill PaznerOne of `COPY_VALUES`, `USE_POINTER` or `OWN_POINTER`.
5244554ea0SWill Pazner
5344554ea0SWill Pazner`OWN_POINTER` is not typically supported for objects created in Julia, because those must be
5444554ea0SWill Paznerdestroyed by the garbage collector, and cannot be freed from C.
5544554ea0SWill Pazner"""
5644554ea0SWill Paznerconst CopyMode = C.CeedCopyMode
5744554ea0SWill Paznerconst COPY_VALUES = C.CEED_COPY_VALUES
5844554ea0SWill Paznerconst USE_POINTER = C.CEED_USE_POINTER
5944554ea0SWill Paznerconst OWN_POINTER = C.CEED_OWN_POINTER
6044554ea0SWill Pazner
6144554ea0SWill Pazner"""
6244554ea0SWill Pazner    EvalMode
6344554ea0SWill Pazner
6444554ea0SWill PaznerEvaluation mode used in the specification of input and output fields for Q-functions, e.g.
6544554ea0SWill Paznerin [`@interior_qf`](@ref).
6644554ea0SWill Pazner
6744554ea0SWill PaznerOne of:
6844554ea0SWill Pazner- `EVAL_NONE`
6944554ea0SWill Pazner- `EVAL_INTERP`
7044554ea0SWill Pazner- `EVAL_GRAD`
7144554ea0SWill Pazner- `EVAL_DIV`
7244554ea0SWill Pazner- `EVAL_CURL`
7344554ea0SWill Pazner- `EVAL_WEIGHT`
7444554ea0SWill Pazner
7544554ea0SWill PaznerSee the [libCEED
7613964f07SJed Browndocumentation](https://libceed.org/en/latest/api/CeedBasis/?highlight=EVAL_MODE#c.CeedEvalMode)
7744554ea0SWill Paznerfor further information.
7844554ea0SWill Pazner"""
7944554ea0SWill Paznerconst EvalMode = C.CeedEvalMode
8044554ea0SWill Paznerconst EVAL_NONE = C.CEED_EVAL_NONE
8144554ea0SWill Paznerconst EVAL_INTERP = C.CEED_EVAL_INTERP
8244554ea0SWill Paznerconst EVAL_GRAD = C.CEED_EVAL_GRAD
8344554ea0SWill Paznerconst EVAL_DIV = C.CEED_EVAL_DIV
8444554ea0SWill Paznerconst EVAL_CURL = C.CEED_EVAL_CURL
8544554ea0SWill Paznerconst EVAL_WEIGHT = C.CEED_EVAL_WEIGHT
8644554ea0SWill Pazner
8744554ea0SWill Pazner"""
8844554ea0SWill Pazner    NormType
8944554ea0SWill Pazner
9044554ea0SWill PaznerDenotes type of vector norm. One of `NORM_1`, `NORM_2`, or `NORM_MAX`.
9144554ea0SWill Pazner"""
9244554ea0SWill Paznerconst NormType = C.CeedNormType
9344554ea0SWill Paznerconst NORM_1 = C.CEED_NORM_1
9444554ea0SWill Paznerconst NORM_2 = C.CEED_NORM_2
9544554ea0SWill Paznerconst NORM_MAX = C.CEED_NORM_MAX
9644554ea0SWill Pazner
9744554ea0SWill Pazner"""
9844554ea0SWill Pazner    TransposeMose
9944554ea0SWill Pazner
10044554ea0SWill PaznerDenotes whether a linear transformation or its transpose should be applied. Either
10144554ea0SWill Pazner`NOTRANSPOSE` or `TRANSPOSE`.
10244554ea0SWill Pazner"""
10344554ea0SWill Paznerconst TransposeMode = C.CeedTransposeMode
10444554ea0SWill Paznerconst NOTRANSPOSE = C.CEED_NOTRANSPOSE
10544554ea0SWill Paznerconst TRANSPOSE = C.CEED_TRANSPOSE
10644554ea0SWill Pazner
10744554ea0SWill Pazner"""
10844554ea0SWill Pazner    Topology
10944554ea0SWill Pazner
11044554ea0SWill PaznerType of basis shape to create non-tensor H1 element basis. One of `LINE`, `TRIANGLE`,
11144554ea0SWill Pazner`QUAD`, `TET`, `PYRAMID`, `PRISM`, or `HEX`.
11244554ea0SWill Pazner
11344554ea0SWill PaznerThe dimension can be extracted with bitshift:
11444554ea0SWill Pazner
11544554ea0SWill Pazner    dim = Int(topology) >> 16
11644554ea0SWill Pazner"""
11744554ea0SWill Paznerconst Topology = C.CeedElemTopology
11850c301a5SRezgar Shakericonst LINE = C.CEED_TOPOLOGY_LINE
11950c301a5SRezgar Shakericonst TRIANGLE = C.CEED_TOPOLOGY_TRIANGLE
12050c301a5SRezgar Shakericonst QUAD = C.CEED_TOPOLOGY_QUAD
12150c301a5SRezgar Shakericonst TET = C.CEED_TOPOLOGY_TET
12250c301a5SRezgar Shakericonst PYRAMID = C.CEED_TOPOLOGY_PYRAMID
12350c301a5SRezgar Shakericonst PRISM = C.CEED_TOPOLOGY_PRISM
12450c301a5SRezgar Shakericonst HEX = C.CEED_TOPOLOGY_HEX
12544554ea0SWill Pazner
12644554ea0SWill Paznerfunction set_globals()
12744554ea0SWill Pazner    @doc """
12844554ea0SWill Pazner        STRIDES_BACKEND
12944554ea0SWill Pazner
13044554ea0SWill Pazner    Indicate that the stride is determined by the backend.
13144554ea0SWill Pazner    """
13244554ea0SWill Pazner    global STRIDES_BACKEND = C.CEED_STRIDES_BACKEND[]
13344554ea0SWill Paznerend
134