xref: /libCEED/interface/ceed-types.c (revision 50c301a53d2cec48a2aa861bf6f38393f4831c2f)
175affc3bSjeremylt // Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at
275affc3bSjeremylt // the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
375affc3bSjeremylt // reserved. See files LICENSE and NOTICE for details.
475affc3bSjeremylt //
575affc3bSjeremylt // This file is part of CEED, a collection of benchmarks, miniapps, software
675affc3bSjeremylt // libraries and APIs for efficient high-order finite element and spectral
775affc3bSjeremylt // element discretizations for exascale applications. For more information and
875affc3bSjeremylt // source code availability see http://github.com/ceed.
975affc3bSjeremylt //
1075affc3bSjeremylt // The CEED research is supported by the Exascale Computing Project 17-SC-20-SC,
1175affc3bSjeremylt // a collaborative effort of two U.S. Department of Energy organizations (Office
1275affc3bSjeremylt // of Science and the National Nuclear Security Administration) responsible for
1375affc3bSjeremylt // the planning and preparation of a capable exascale ecosystem, including
1475affc3bSjeremylt // software, applications, hardware, advanced system engineering and early
1575affc3bSjeremylt // testbed platforms, in support of the nation's exascale computing imperative.
1675affc3bSjeremylt 
17ec3da8bcSJed Brown #include <ceed/ceed.h>
1875affc3bSjeremylt 
19e15f9bd0SJeremy L Thompson const char *const CeedErrorTypesShifted[] = {
20e15f9bd0SJeremy L Thompson   [CEED_ERROR_SUCCESS - CEED_ERROR_UNSUPPORTED] = "success",
21e15f9bd0SJeremy L Thompson   [CEED_ERROR_MINOR - CEED_ERROR_UNSUPPORTED] = "generic minor error",
22e15f9bd0SJeremy L Thompson   [CEED_ERROR_DIMENSION - CEED_ERROR_UNSUPPORTED] = "dimension mismatch",
23e15f9bd0SJeremy L Thompson   [CEED_ERROR_INCOMPLETE - CEED_ERROR_UNSUPPORTED] = "object setup incomplete",
24e1e9e29dSJed Brown   [CEED_ERROR_INCOMPATIBLE - CEED_ERROR_UNSUPPORTED] = "incompatible arguments",
25e15f9bd0SJeremy L Thompson   [CEED_ERROR_ACCESS - CEED_ERROR_UNSUPPORTED] = "access lock in use",
26e15f9bd0SJeremy L Thompson   [CEED_ERROR_MAJOR - CEED_ERROR_UNSUPPORTED] = "generic major error",
27e15f9bd0SJeremy L Thompson   [CEED_ERROR_BACKEND - CEED_ERROR_UNSUPPORTED] = "internal backend error",
28e15f9bd0SJeremy L Thompson   [CEED_ERROR_UNSUPPORTED - CEED_ERROR_UNSUPPORTED] = "operation unsupported by backend",
29e15f9bd0SJeremy L Thompson };
30e15f9bd0SJeremy L Thompson const char *const *CeedErrorTypes =  &CeedErrorTypesShifted[-
31e15f9bd0SJeremy L Thompson                                      CEED_ERROR_UNSUPPORTED];
32e15f9bd0SJeremy L Thompson 
3375affc3bSjeremylt const char *const CeedMemTypes[] = {
3475affc3bSjeremylt   [CEED_MEM_HOST] = "host",
3575affc3bSjeremylt   [CEED_MEM_DEVICE] = "device",
3675affc3bSjeremylt };
3775affc3bSjeremylt 
3875affc3bSjeremylt const char *const CeedCopyModes[] = {
3975affc3bSjeremylt   [CEED_COPY_VALUES] = "copy values",
4075affc3bSjeremylt   [CEED_USE_POINTER] = "use pointer",
4175affc3bSjeremylt   [CEED_OWN_POINTER] = "own pointer",
4275affc3bSjeremylt };
4375affc3bSjeremylt 
4475affc3bSjeremylt const char *const CeedTransposeModes[] = {
4575affc3bSjeremylt   [CEED_TRANSPOSE] = "transpose",
4675affc3bSjeremylt   [CEED_NOTRANSPOSE] = "no transpose",
4775affc3bSjeremylt };
4875affc3bSjeremylt 
4975affc3bSjeremylt const char *const CeedEvalModes[] = {
5075affc3bSjeremylt   [CEED_EVAL_NONE] = "none",
5175affc3bSjeremylt   [CEED_EVAL_INTERP] = "interpolation",
5275affc3bSjeremylt   [CEED_EVAL_GRAD] = "gradient",
5375affc3bSjeremylt   [CEED_EVAL_DIV] = "divergence",
5475affc3bSjeremylt   [CEED_EVAL_CURL] = "curl",
5575affc3bSjeremylt   [CEED_EVAL_WEIGHT] = "quadrature weights",
5675affc3bSjeremylt };
5775affc3bSjeremylt 
5875affc3bSjeremylt const char *const CeedQuadModes[] = {
5975affc3bSjeremylt   [CEED_GAUSS] = "Gauss",
6075affc3bSjeremylt   [CEED_GAUSS_LOBATTO] = "Gauss Lobatto",
6175affc3bSjeremylt };
6275affc3bSjeremylt 
6375affc3bSjeremylt const char *const CeedElemTopologies[] = {
64*50c301a5SRezgar Shakeri   [CEED_TOPOLOGY_LINE] = "line",
65*50c301a5SRezgar Shakeri   [CEED_TOPOLOGY_TRIANGLE] = "triangle",
66*50c301a5SRezgar Shakeri   [CEED_TOPOLOGY_QUAD] = "quadrilateral",
67*50c301a5SRezgar Shakeri   [CEED_TOPOLOGY_TET] = "tetrahedron",
68*50c301a5SRezgar Shakeri   [CEED_TOPOLOGY_PYRAMID] = "pyramid",
69*50c301a5SRezgar Shakeri   [CEED_TOPOLOGY_PRISM] = "prism",
70*50c301a5SRezgar Shakeri   [CEED_TOPOLOGY_HEX] = "hexahedron",
7175affc3bSjeremylt };
72cdf32b93SJeremy L Thompson 
73cdf32b93SJeremy L Thompson const char *const CeedContextFieldTypes[] = {
74cdf32b93SJeremy L Thompson   [CEED_CONTEXT_FIELD_DOUBLE] = "double",
75cdf32b93SJeremy L Thompson   [CEED_CONTEXT_FIELD_INT32] = "int32",
76cdf32b93SJeremy L Thompson };
77*50c301a5SRezgar Shakeri 
78*50c301a5SRezgar Shakeri const char *const CeedFESpaces[] = {
79*50c301a5SRezgar Shakeri   [CEED_FE_SPACE_H1] = "H^1 space",
80*50c301a5SRezgar Shakeri   [CEED_FE_SPACE_HDIV] = "H(div) space",
81*50c301a5SRezgar Shakeri };
82