xref: /libCEED/julia/LibCEED.jl/src/Globals.jl (revision 80a9ef0545a39c00cdcaab1ca26f8053604f3120)
144554ea0SWill Pazner"""
244554ea0SWill Pazner    CeedScalar
344554ea0SWill Pazner
444554ea0SWill PaznerScalar (floating point) type. Equivalent to `Float64`.
544554ea0SWill Pazner"""
644554ea0SWill Paznerconst CeedScalar = C.CeedScalar
7*80a9ef05SNatalie Beams
844554ea0SWill Pazner"""
944554ea0SWill Pazner    CeedInt
1044554ea0SWill Pazner
1144554ea0SWill PaznerInteger type, used for indexing. Equivalent to `Int32`.
1244554ea0SWill Pazner"""
1344554ea0SWill Paznerconst CeedInt = C.CeedInt
1444554ea0SWill Pazner
1544554ea0SWill Pazner"""
1644554ea0SWill Pazner    QuadMode
1744554ea0SWill Pazner
1844554ea0SWill PaznerOne of `GAUSS` or `GAUSS_LOBATTO`.
1944554ea0SWill Pazner"""
2044554ea0SWill Paznerconst QuadMode = C.CeedQuadMode
2144554ea0SWill Paznerconst GAUSS = C.CEED_GAUSS
2244554ea0SWill Paznerconst GAUSS_LOBATTO = C.CEED_GAUSS_LOBATTO
2344554ea0SWill Pazner
2444554ea0SWill Pazner"""
2544554ea0SWill Pazner    MemType
2644554ea0SWill Pazner
2744554ea0SWill PaznerOne of `MEM_HOST` or `MEM_DEVICE`.
2844554ea0SWill Pazner"""
2944554ea0SWill Paznerconst MemType = C.CeedMemType
3044554ea0SWill Paznerconst MEM_HOST = C.CEED_MEM_HOST
3144554ea0SWill Paznerconst MEM_DEVICE = C.CEED_MEM_DEVICE
3244554ea0SWill Pazner
3344554ea0SWill Pazner"""
3444554ea0SWill Pazner    CopyMode
3544554ea0SWill Pazner
3644554ea0SWill PaznerOne of `COPY_VALUES`, `USE_POINTER` or `OWN_POINTER`.
3744554ea0SWill Pazner
3844554ea0SWill Pazner`OWN_POINTER` is not typically supported for objects created in Julia, because those must be
3944554ea0SWill Paznerdestroyed by the garbage collector, and cannot be freed from C.
4044554ea0SWill Pazner"""
4144554ea0SWill Paznerconst CopyMode = C.CeedCopyMode
4244554ea0SWill Paznerconst COPY_VALUES = C.CEED_COPY_VALUES
4344554ea0SWill Paznerconst USE_POINTER = C.CEED_USE_POINTER
4444554ea0SWill Paznerconst OWN_POINTER = C.CEED_OWN_POINTER
4544554ea0SWill Pazner
4644554ea0SWill Pazner"""
4744554ea0SWill Pazner    EvalMode
4844554ea0SWill Pazner
4944554ea0SWill PaznerEvaluation mode used in the specification of input and output fields for Q-functions, e.g.
5044554ea0SWill Paznerin [`@interior_qf`](@ref).
5144554ea0SWill Pazner
5244554ea0SWill PaznerOne of:
5344554ea0SWill Pazner- `EVAL_NONE`
5444554ea0SWill Pazner- `EVAL_INTERP`
5544554ea0SWill Pazner- `EVAL_GRAD`
5644554ea0SWill Pazner- `EVAL_DIV`
5744554ea0SWill Pazner- `EVAL_CURL`
5844554ea0SWill Pazner- `EVAL_WEIGHT`
5944554ea0SWill Pazner
6044554ea0SWill PaznerSee the [libCEED
6144554ea0SWill Paznerdocumentation](https://libceed.readthedocs.io/en/latest/api/CeedBasis/?highlight=EVAL_MODE#c.CeedEvalMode)
6244554ea0SWill Paznerfor further information.
6344554ea0SWill Pazner"""
6444554ea0SWill Paznerconst EvalMode = C.CeedEvalMode
6544554ea0SWill Paznerconst EVAL_NONE = C.CEED_EVAL_NONE
6644554ea0SWill Paznerconst EVAL_INTERP = C.CEED_EVAL_INTERP
6744554ea0SWill Paznerconst EVAL_GRAD = C.CEED_EVAL_GRAD
6844554ea0SWill Paznerconst EVAL_DIV = C.CEED_EVAL_DIV
6944554ea0SWill Paznerconst EVAL_CURL = C.CEED_EVAL_CURL
7044554ea0SWill Paznerconst EVAL_WEIGHT = C.CEED_EVAL_WEIGHT
7144554ea0SWill Pazner
7244554ea0SWill Pazner"""
7344554ea0SWill Pazner    NormType
7444554ea0SWill Pazner
7544554ea0SWill PaznerDenotes type of vector norm. One of `NORM_1`, `NORM_2`, or `NORM_MAX`.
7644554ea0SWill Pazner"""
7744554ea0SWill Paznerconst NormType = C.CeedNormType
7844554ea0SWill Paznerconst NORM_1 = C.CEED_NORM_1
7944554ea0SWill Paznerconst NORM_2 = C.CEED_NORM_2
8044554ea0SWill Paznerconst NORM_MAX = C.CEED_NORM_MAX
8144554ea0SWill Pazner
8244554ea0SWill Pazner"""
8344554ea0SWill Pazner    TransposeMose
8444554ea0SWill Pazner
8544554ea0SWill PaznerDenotes whether a linear transformation or its transpose should be applied. Either
8644554ea0SWill Pazner`NOTRANSPOSE` or `TRANSPOSE`.
8744554ea0SWill Pazner"""
8844554ea0SWill Paznerconst TransposeMode = C.CeedTransposeMode
8944554ea0SWill Paznerconst NOTRANSPOSE = C.CEED_NOTRANSPOSE
9044554ea0SWill Paznerconst TRANSPOSE = C.CEED_TRANSPOSE
9144554ea0SWill Pazner
9244554ea0SWill Pazner"""
9344554ea0SWill Pazner    Topology
9444554ea0SWill Pazner
9544554ea0SWill PaznerType of basis shape to create non-tensor H1 element basis. One of `LINE`, `TRIANGLE`,
9644554ea0SWill Pazner`QUAD`, `TET`, `PYRAMID`, `PRISM`, or `HEX`.
9744554ea0SWill Pazner
9844554ea0SWill PaznerThe dimension can be extracted with bitshift:
9944554ea0SWill Pazner
10044554ea0SWill Pazner    dim = Int(topology) >> 16
10144554ea0SWill Pazner"""
10244554ea0SWill Paznerconst Topology = C.CeedElemTopology
10344554ea0SWill Paznerconst LINE = C.CEED_LINE
10444554ea0SWill Paznerconst TRIANGLE = C.CEED_TRIANGLE
10544554ea0SWill Paznerconst QUAD = C.CEED_QUAD
10644554ea0SWill Paznerconst TET = C.CEED_TET
10744554ea0SWill Paznerconst PYRAMID = C.CEED_PYRAMID
10844554ea0SWill Paznerconst PRISM = C.CEED_PRISM
10944554ea0SWill Paznerconst HEX = C.CEED_HEX
11044554ea0SWill Pazner
11144554ea0SWill Paznerfunction set_globals()
11244554ea0SWill Pazner    @doc """
11344554ea0SWill Pazner        STRIDES_BACKEND
11444554ea0SWill Pazner
11544554ea0SWill Pazner    Indicate that the stride is determined by the backend.
11644554ea0SWill Pazner    """
11744554ea0SWill Pazner    global STRIDES_BACKEND = C.CEED_STRIDES_BACKEND[]
11844554ea0SWill Paznerend
119