xref: /libCEED/interface/ceed-types.c (revision cfa59c5b0c41ee3c7ca5285b7ce2579e871e5f29)
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.h>
18 
19 const char *const CeedErrorTypesShifted[] = {
20   [CEED_ERROR_SUCCESS - CEED_ERROR_UNSUPPORTED] = "success",
21   [CEED_ERROR_MINOR - CEED_ERROR_UNSUPPORTED] = "generic minor error",
22   [CEED_ERROR_DIMENSION - CEED_ERROR_UNSUPPORTED] = "dimension mismatch",
23   [CEED_ERROR_INCOMPLETE - CEED_ERROR_UNSUPPORTED] = "object setup incomplete",
24   [CEED_ERROR_ACCESS - CEED_ERROR_UNSUPPORTED] = "access lock in use",
25   [CEED_ERROR_MAJOR - CEED_ERROR_UNSUPPORTED] = "generic major error",
26   [CEED_ERROR_BACKEND - CEED_ERROR_UNSUPPORTED] = "internal backend error",
27   [CEED_ERROR_UNSUPPORTED - CEED_ERROR_UNSUPPORTED] = "operation unsupported by backend",
28 };
29 const char *const *CeedErrorTypes =  &CeedErrorTypesShifted[-
30                                      CEED_ERROR_UNSUPPORTED];
31 
32 const char *const CeedMemTypes[] = {
33   [CEED_MEM_HOST] = "host",
34   [CEED_MEM_DEVICE] = "device",
35 };
36 
37 const char *const CeedCopyModes[] = {
38   [CEED_COPY_VALUES] = "copy values",
39   [CEED_USE_POINTER] = "use pointer",
40   [CEED_OWN_POINTER] = "own pointer",
41 };
42 
43 const char *const CeedTransposeModes[] = {
44   [CEED_TRANSPOSE] = "transpose",
45   [CEED_NOTRANSPOSE] = "no transpose",
46 };
47 
48 const char *const CeedEvalModes[] = {
49   [CEED_EVAL_NONE] = "none",
50   [CEED_EVAL_INTERP] = "interpolation",
51   [CEED_EVAL_GRAD] = "gradient",
52   [CEED_EVAL_DIV] = "divergence",
53   [CEED_EVAL_CURL] = "curl",
54   [CEED_EVAL_WEIGHT] = "quadrature weights",
55 };
56 
57 const char *const CeedQuadModes[] = {
58   [CEED_GAUSS] = "Gauss",
59   [CEED_GAUSS_LOBATTO] = "Gauss Lobatto",
60 };
61 
62 const char *const CeedElemTopologies[] = {
63   [CEED_LINE] = "line",
64   [CEED_TRIANGLE] = "triangle",
65   [CEED_QUAD] = "quadrilateral",
66   [CEED_TET] = "tetrahedron",
67   [CEED_PYRAMID] = "pyramid",
68   [CEED_PRISM] = "prism",
69   [CEED_HEX] = "hexahedron",
70 };
71