xref: /libCEED/interface/ceed-types.c (revision e79b91d9f61753a734e6e21c778d772fcdbcc265)
1 // Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at
2 // the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
3 // reserved. See files LICENSE and NOTICE for details.
4 //
5 // This file is part of CEED, a collection of benchmarks, miniapps, software
6 // libraries and APIs for efficient high-order finite element and spectral
7 // element discretizations for exascale applications. For more information and
8 // source code availability see http://github.com/ceed.
9 //
10 // The CEED research is supported by the Exascale Computing Project 17-SC-20-SC,
11 // a collaborative effort of two U.S. Department of Energy organizations (Office
12 // of Science and the National Nuclear Security Administration) responsible for
13 // the planning and preparation of a capable exascale ecosystem, including
14 // software, applications, hardware, advanced system engineering and early
15 // testbed platforms, in support of the nation's exascale computing imperative.
16 
17 #include <ceed/ceed.h>
18 #include <ceed/backend.h>
19 
20 const char *const CeedErrorTypesShifted[] = {
21   [CEED_ERROR_SUCCESS - CEED_ERROR_UNSUPPORTED] = "success",
22   [CEED_ERROR_MINOR - CEED_ERROR_UNSUPPORTED] = "generic minor error",
23   [CEED_ERROR_DIMENSION - CEED_ERROR_UNSUPPORTED] = "dimension mismatch",
24   [CEED_ERROR_INCOMPLETE - CEED_ERROR_UNSUPPORTED] = "object setup incomplete",
25   [CEED_ERROR_INCOMPATIBLE - CEED_ERROR_UNSUPPORTED] = "incompatible arguments",
26   [CEED_ERROR_ACCESS - CEED_ERROR_UNSUPPORTED] = "access lock in use",
27   [CEED_ERROR_MAJOR - CEED_ERROR_UNSUPPORTED] = "generic major error",
28   [CEED_ERROR_BACKEND - CEED_ERROR_UNSUPPORTED] = "internal backend error",
29   [CEED_ERROR_UNSUPPORTED - CEED_ERROR_UNSUPPORTED] = "operation unsupported by backend",
30 };
31 const char *const *CeedErrorTypes =  &CeedErrorTypesShifted[-
32                                      CEED_ERROR_UNSUPPORTED];
33 
34 const char *const CeedMemTypes[] = {
35   [CEED_MEM_HOST] = "host",
36   [CEED_MEM_DEVICE] = "device",
37 };
38 
39 const char *const CeedCopyModes[] = {
40   [CEED_COPY_VALUES] = "copy values",
41   [CEED_USE_POINTER] = "use pointer",
42   [CEED_OWN_POINTER] = "own pointer",
43 };
44 
45 const char *const CeedTransposeModes[] = {
46   [CEED_TRANSPOSE] = "transpose",
47   [CEED_NOTRANSPOSE] = "no transpose",
48 };
49 
50 const char *const CeedEvalModes[] = {
51   [CEED_EVAL_NONE] = "none",
52   [CEED_EVAL_INTERP] = "interpolation",
53   [CEED_EVAL_GRAD] = "gradient",
54   [CEED_EVAL_DIV] = "divergence",
55   [CEED_EVAL_CURL] = "curl",
56   [CEED_EVAL_WEIGHT] = "quadrature weights",
57 };
58 
59 const char *const CeedQuadModes[] = {
60   [CEED_GAUSS] = "Gauss",
61   [CEED_GAUSS_LOBATTO] = "Gauss Lobatto",
62 };
63 
64 const char *const CeedElemTopologies[] = {
65   [CEED_TOPOLOGY_LINE] = "line",
66   [CEED_TOPOLOGY_TRIANGLE] = "triangle",
67   [CEED_TOPOLOGY_QUAD] = "quadrilateral",
68   [CEED_TOPOLOGY_TET] = "tetrahedron",
69   [CEED_TOPOLOGY_PYRAMID] = "pyramid",
70   [CEED_TOPOLOGY_PRISM] = "prism",
71   [CEED_TOPOLOGY_HEX] = "hexahedron",
72 };
73 
74 const char *const CeedContextFieldTypes[] = {
75   [CEED_CONTEXT_FIELD_DOUBLE] = "double",
76   [CEED_CONTEXT_FIELD_INT32] = "int32",
77 };
78 
79 const char *const CeedFESpaces[] = {
80   [CEED_FE_SPACE_H1] = "H^1 space",
81   [CEED_FE_SPACE_HDIV] = "H(div) space",
82 };
83