40 template <
typename _Enum>
42 toIntegral(_Enum e) ->
typename std::underlying_type<_Enum>::type
44 return static_cast<typename std::underlying_type<_Enum>::type
>(e);
48 #define CEPS_DECL_ENUM_OPERATORS(ENUM) \
50 constexpr CepsEnum operator| (const ENUM &a, const ENUM &b) \
52 return ceps::toIntegral(a) | ceps::toIntegral(b); \
55 constexpr CepsEnum operator| (const ENUM &a, const CepsEnum &b) \
57 return ceps::toIntegral(a) | b; \
60 constexpr CepsEnum operator| (const CepsEnum &a, const ENUM &b) \
62 return a | ceps::toIntegral(b); \
65 constexpr CepsEnum operator& (const ENUM &a, const ENUM &b) \
67 return ceps::toIntegral(a) & ceps::toIntegral(b); \
70 constexpr CepsEnum operator& (const ENUM &a, const CepsEnum &b) \
72 return ceps::toIntegral(a) & b; \
75 constexpr CepsEnum operator& (const CepsEnum &a, const ENUM &b) \
77 return a & ceps::toIntegral(b); \
80 constexpr CepsBool isEnabledOption (const ENUM& value, const ENUM& option) \
82 return (value & option) == ceps::toIntegral(option); \
85 constexpr CepsBool isEnabledOption (const CepsEnum& value, const ENUM& option) \
87 return (value & option) == ceps::toIntegral(option); \
CepsSourceTermFlag
Source terms flags.
@ Laplace
A source term that multiplies grad phi (for FE)
@ Default
Simply add the source term.
@ Stimulation
Apply cardiac specific treatment before adding.
CepsGhostFlag
PartitionLocation: an enum that will be used by various elements of the code (pde,...
@ Halo
Data is in the halo.
CepsLocationFlag
DataLocation: an enum that will be used by various elements of the code (pde, readers,...
@ Cell
Data is defined at cell centers.
@ Point
Data is defined on each point.
@ ZeroD
Data is defined once.
constexpr CepsUInt CepsLocationFlagSize
Size of enum CepsLocationFlag.
#define CEPS_DECL_ENUM_OPERATORS(ENUM)
CepsOutputFormat
Style of output files.
@ VTKCeps
vtk_ceps format, use contrib/CepsParaviewPlugin.py (5.11)
@ ParaviewSeries
Paraview files series, JSON + VTU/PVTU.
@ Music
MUSIC files, VTKLegacy and xml.
@ Medit
.mesh outputs. Sucks.
@ VTU
VTU/PVTU files, one by time steps and by procs.
@ VTKLegacy
VTK Legacy, one by time steps.
constexpr CepsUInt CepsCompactSupportFlagSize
Size of enum CepsCompactSupportFlags.
CepsCompactSupportFlag
Compact Support type enum.
@ Const
Rectangle with amplitude 1.
@ SRectangle
Smooth rectangle.
CepsBoundaryConditionFlag
Enumeration for boundary condition type.
CepsAssemblingFlag
Source terms flags.
@ TimeDerivative
Compute matrix of time derivatives.
@ SpatialOperator
Compute matrix of spatial operators.
constexpr CepsUInt CepsGhostFlagSize
Size of enum CepsGhostFlag.
CepsFunctionFlag
Enum for CepsStandardArgs functions.
@ CellIndex
Use cell index to determine position.
@ NodeIndex
Use node index to determine position.
@ Solution
Depends on the content of a solution vector with values at dofs.
@ None
No dependance, constant functions.
@ UnknownIndex
Use unknown index to compute result.
@ Space
Depends on position x.
@ Attribute
Depends on the attribute of the region of evaluation.
@ DofIndex
Use dof index to determine position.
constexpr CepsUInt CepsFunctionFlagSize
Number of function flags.
constexpr CepsUInt CepsCellTypeSize
Size of enum CepsCellType.
CepsCellType
Enum for different shapes of cells.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
A namespace for all utility methods.
constexpr auto toIntegral(_Enum e) -> typename std::underlying_type< _Enum >::type
Converts an enum type variable to an integer.