xref: /libCEED/interface/ceed-types.c (revision 6f117663984cc34db8b63b27db5cdb31e406bf14)
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>
18*6f117663SJeremy L Thompson #include <ceed/backend.h>
1975affc3bSjeremylt 
20e15f9bd0SJeremy L Thompson const char *const CeedErrorTypesShifted[] = {
21e15f9bd0SJeremy L Thompson   [CEED_ERROR_SUCCESS - CEED_ERROR_UNSUPPORTED] = "success",
22e15f9bd0SJeremy L Thompson   [CEED_ERROR_MINOR - CEED_ERROR_UNSUPPORTED] = "generic minor error",
23e15f9bd0SJeremy L Thompson   [CEED_ERROR_DIMENSION - CEED_ERROR_UNSUPPORTED] = "dimension mismatch",
24e15f9bd0SJeremy L Thompson   [CEED_ERROR_INCOMPLETE - CEED_ERROR_UNSUPPORTED] = "object setup incomplete",
25e1e9e29dSJed Brown   [CEED_ERROR_INCOMPATIBLE - CEED_ERROR_UNSUPPORTED] = "incompatible arguments",
26e15f9bd0SJeremy L Thompson   [CEED_ERROR_ACCESS - CEED_ERROR_UNSUPPORTED] = "access lock in use",
27e15f9bd0SJeremy L Thompson   [CEED_ERROR_MAJOR - CEED_ERROR_UNSUPPORTED] = "generic major error",
28e15f9bd0SJeremy L Thompson   [CEED_ERROR_BACKEND - CEED_ERROR_UNSUPPORTED] = "internal backend error",
29e15f9bd0SJeremy L Thompson   [CEED_ERROR_UNSUPPORTED - CEED_ERROR_UNSUPPORTED] = "operation unsupported by backend",
30e15f9bd0SJeremy L Thompson };
31e15f9bd0SJeremy L Thompson const char *const *CeedErrorTypes =  &CeedErrorTypesShifted[-
32e15f9bd0SJeremy L Thompson                                      CEED_ERROR_UNSUPPORTED];
33e15f9bd0SJeremy L Thompson 
3475affc3bSjeremylt const char *const CeedMemTypes[] = {
3575affc3bSjeremylt   [CEED_MEM_HOST] = "host",
3675affc3bSjeremylt   [CEED_MEM_DEVICE] = "device",
3775affc3bSjeremylt };
3875affc3bSjeremylt 
3975affc3bSjeremylt const char *const CeedCopyModes[] = {
4075affc3bSjeremylt   [CEED_COPY_VALUES] = "copy values",
4175affc3bSjeremylt   [CEED_USE_POINTER] = "use pointer",
4275affc3bSjeremylt   [CEED_OWN_POINTER] = "own pointer",
4375affc3bSjeremylt };
4475affc3bSjeremylt 
4575affc3bSjeremylt const char *const CeedTransposeModes[] = {
4675affc3bSjeremylt   [CEED_TRANSPOSE] = "transpose",
4775affc3bSjeremylt   [CEED_NOTRANSPOSE] = "no transpose",
4875affc3bSjeremylt };
4975affc3bSjeremylt 
5075affc3bSjeremylt const char *const CeedEvalModes[] = {
5175affc3bSjeremylt   [CEED_EVAL_NONE] = "none",
5275affc3bSjeremylt   [CEED_EVAL_INTERP] = "interpolation",
5375affc3bSjeremylt   [CEED_EVAL_GRAD] = "gradient",
5475affc3bSjeremylt   [CEED_EVAL_DIV] = "divergence",
5575affc3bSjeremylt   [CEED_EVAL_CURL] = "curl",
5675affc3bSjeremylt   [CEED_EVAL_WEIGHT] = "quadrature weights",
5775affc3bSjeremylt };
5875affc3bSjeremylt 
5975affc3bSjeremylt const char *const CeedQuadModes[] = {
6075affc3bSjeremylt   [CEED_GAUSS] = "Gauss",
6175affc3bSjeremylt   [CEED_GAUSS_LOBATTO] = "Gauss Lobatto",
6275affc3bSjeremylt };
6375affc3bSjeremylt 
6475affc3bSjeremylt const char *const CeedElemTopologies[] = {
6550c301a5SRezgar Shakeri   [CEED_TOPOLOGY_LINE] = "line",
6650c301a5SRezgar Shakeri   [CEED_TOPOLOGY_TRIANGLE] = "triangle",
6750c301a5SRezgar Shakeri   [CEED_TOPOLOGY_QUAD] = "quadrilateral",
6850c301a5SRezgar Shakeri   [CEED_TOPOLOGY_TET] = "tetrahedron",
6950c301a5SRezgar Shakeri   [CEED_TOPOLOGY_PYRAMID] = "pyramid",
7050c301a5SRezgar Shakeri   [CEED_TOPOLOGY_PRISM] = "prism",
7150c301a5SRezgar Shakeri   [CEED_TOPOLOGY_HEX] = "hexahedron",
7275affc3bSjeremylt };
73cdf32b93SJeremy L Thompson 
74cdf32b93SJeremy L Thompson const char *const CeedContextFieldTypes[] = {
75cdf32b93SJeremy L Thompson   [CEED_CONTEXT_FIELD_DOUBLE] = "double",
76cdf32b93SJeremy L Thompson   [CEED_CONTEXT_FIELD_INT32] = "int32",
77cdf32b93SJeremy L Thompson };
7850c301a5SRezgar Shakeri 
7950c301a5SRezgar Shakeri const char *const CeedFESpaces[] = {
8050c301a5SRezgar Shakeri   [CEED_FE_SPACE_H1] = "H^1 space",
8150c301a5SRezgar Shakeri   [CEED_FE_SPACE_HDIV] = "H(div) space",
8250c301a5SRezgar Shakeri };
83