xref: /libCEED/interface/ceed-types.c (revision e15f9bd09af0280c89b79924fa9af7dd2e3e30be)
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 
1775affc3bSjeremylt #include <ceed.h>
1875affc3bSjeremylt 
19*e15f9bd0SJeremy L Thompson const char *const CeedErrorTypesShifted[] = {
20*e15f9bd0SJeremy L Thompson   [CEED_ERROR_SUCCESS - CEED_ERROR_UNSUPPORTED] = "success",
21*e15f9bd0SJeremy L Thompson   [CEED_ERROR_MINOR - CEED_ERROR_UNSUPPORTED] = "generic minor error",
22*e15f9bd0SJeremy L Thompson   [CEED_ERROR_DIMENSION - CEED_ERROR_UNSUPPORTED] = "dimension mismatch",
23*e15f9bd0SJeremy L Thompson   [CEED_ERROR_INCOMPLETE - CEED_ERROR_UNSUPPORTED] = "object setup incomplete",
24*e15f9bd0SJeremy L Thompson   [CEED_ERROR_ACCESS - CEED_ERROR_UNSUPPORTED] = "access lock in use",
25*e15f9bd0SJeremy L Thompson   [CEED_ERROR_MAJOR - CEED_ERROR_UNSUPPORTED] = "generic major error",
26*e15f9bd0SJeremy L Thompson   [CEED_ERROR_BACKEND - CEED_ERROR_UNSUPPORTED] = "internal backend error",
27*e15f9bd0SJeremy L Thompson   [CEED_ERROR_UNSUPPORTED - CEED_ERROR_UNSUPPORTED] = "operation unsupported by backend",
28*e15f9bd0SJeremy L Thompson };
29*e15f9bd0SJeremy L Thompson const char *const *CeedErrorTypes =  &CeedErrorTypesShifted[-
30*e15f9bd0SJeremy L Thompson                                      CEED_ERROR_UNSUPPORTED];
31*e15f9bd0SJeremy L Thompson 
3275affc3bSjeremylt const char *const CeedMemTypes[] = {
3375affc3bSjeremylt   [CEED_MEM_HOST] = "host",
3475affc3bSjeremylt   [CEED_MEM_DEVICE] = "device",
3575affc3bSjeremylt };
3675affc3bSjeremylt 
3775affc3bSjeremylt const char *const CeedCopyModes[] = {
3875affc3bSjeremylt   [CEED_COPY_VALUES] = "copy values",
3975affc3bSjeremylt   [CEED_USE_POINTER] = "use pointer",
4075affc3bSjeremylt   [CEED_OWN_POINTER] = "own pointer",
4175affc3bSjeremylt };
4275affc3bSjeremylt 
4375affc3bSjeremylt const char *const CeedTransposeModes[] = {
4475affc3bSjeremylt   [CEED_TRANSPOSE] = "transpose",
4575affc3bSjeremylt   [CEED_NOTRANSPOSE] = "no transpose",
4675affc3bSjeremylt };
4775affc3bSjeremylt 
4875affc3bSjeremylt const char *const CeedEvalModes[] = {
4975affc3bSjeremylt   [CEED_EVAL_NONE] = "none",
5075affc3bSjeremylt   [CEED_EVAL_INTERP] = "interpolation",
5175affc3bSjeremylt   [CEED_EVAL_GRAD] = "gradient",
5275affc3bSjeremylt   [CEED_EVAL_DIV] = "divergence",
5375affc3bSjeremylt   [CEED_EVAL_CURL] = "curl",
5475affc3bSjeremylt   [CEED_EVAL_WEIGHT] = "quadrature weights",
5575affc3bSjeremylt };
5675affc3bSjeremylt 
5775affc3bSjeremylt const char *const CeedQuadModes[] = {
5875affc3bSjeremylt   [CEED_GAUSS] = "Gauss",
5975affc3bSjeremylt   [CEED_GAUSS_LOBATTO] = "Gauss Lobatto",
6075affc3bSjeremylt };
6175affc3bSjeremylt 
6275affc3bSjeremylt const char *const CeedElemTopologies[] = {
6375affc3bSjeremylt   [CEED_LINE] = "line",
6475affc3bSjeremylt   [CEED_TRIANGLE] = "triangle",
6575affc3bSjeremylt   [CEED_QUAD] = "quadrilateral",
6675affc3bSjeremylt   [CEED_TET] = "tetrahedron",
6775affc3bSjeremylt   [CEED_PYRAMID] = "pyramid",
6875affc3bSjeremylt   [CEED_PRISM] = "prism",
6975affc3bSjeremylt   [CEED_HEX] = "hexahedron",
7075affc3bSjeremylt };
71