xref: /libCEED/interface/ceed-types.c (revision ec3da8bcb94d9f0073544b37b5081a06981a86f7)
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 
17*ec3da8bcSJed 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[] = {
6475affc3bSjeremylt   [CEED_LINE] = "line",
6575affc3bSjeremylt   [CEED_TRIANGLE] = "triangle",
6675affc3bSjeremylt   [CEED_QUAD] = "quadrilateral",
6775affc3bSjeremylt   [CEED_TET] = "tetrahedron",
6875affc3bSjeremylt   [CEED_PYRAMID] = "pyramid",
6975affc3bSjeremylt   [CEED_PRISM] = "prism",
7075affc3bSjeremylt   [CEED_HEX] = "hexahedron",
7175affc3bSjeremylt };
72