35#ifndef NEKTAR_LIB_UTILITIES_BASIC_UTILS_SHAPE_TYPE_H
36#define NEKTAR_LIB_UTILITIES_BASIC_UTILS_SHAPE_TYPE_H
76 "NoGeomShapeType",
"Point",
"Segment",
"Triangle",
"Quadrilateral",
77 "Tetrahedron",
"Pyramid",
"Prism",
"Hexahedron",
114 ASSERTL2(Na > 0,
"Order in 'a' direction must be > 0.");
115 ASSERTL2(Nb > 0,
"Order in 'b' direction must be > 0.");
116 ASSERTL1(Na <= Nb,
"order in 'a' direction is higher "
117 "than order in 'b' direction");
118 return Na * (Na + 1) / 2 + Na * (Nb - Na);
123 ASSERTL2(Na > 1,
"Order in 'a' direction must be > 1.");
124 ASSERTL2(Nb > 1,
"Order in 'b' direction must be > 1.");
125 ASSERTL1(Na <= Nb,
"order in 'a' direction is higher "
126 "than order in 'b' direction");
127 return (Na - 1) + 2 * (Nb - 1);
138 ASSERTL2(Na > 0,
"Order in 'a' direction must be > 0.");
139 ASSERTL2(Nb > 0,
"Order in 'b' direction must be > 0.");
145 ASSERTL2(Na > 1,
"Order in 'a' direction must be > 1.");
146 ASSERTL2(Nb > 1,
"Order in 'b' direction must be > 1.");
147 return 2 * (Na - 1) + 2 * (Nb - 1);
155 ASSERTL2(Na > 1,
"Order in 'a' direction must be > 1.");
156 ASSERTL2(Nb > 1,
"Order in 'b' direction must be > 1.");
157 ASSERTL2(Nc > 1,
"Order in 'c' direction must be > 1.");
163 ASSERTL2(Na > 1,
"Order in 'a' direction must be > 1.");
164 ASSERTL2(Nb > 1,
"Order in 'b' direction must be > 1.");
165 ASSERTL2(Nc > 1,
"Order in 'c' direction must be > 1.");
166 return 2 * Na * Nb + 2 * Na * Nc + 2 * Nb * Nc - 4 * (Na + Nb + Nc) + 8;
189 ASSERTL2(Na > 1,
"Order in 'a' direction must be > 1.");
190 ASSERTL2(Nb > 1,
"Order in 'b' direction must be > 1.");
191 ASSERTL2(Nc > 1,
"Order in 'c' direction must be > 1.");
192 ASSERTL1(Na <= Nc,
"order in 'a' direction is higher "
193 "than order in 'c' direction");
194 ASSERTL1(Nb <= Nc,
"order in 'b' direction is higher "
195 "than order in 'c' direction");
197 for (
int a = 0; a < Na; ++a)
199 for (
int b = 0; b < Nb - a; ++b)
201 for (
int c = 0; c < Nc - a - b; ++c)
212 ASSERTL2(Na > 1,
"Order in 'a' direction must be > 1.");
213 ASSERTL2(Nb > 1,
"Order in 'b' direction must be > 1.");
214 ASSERTL2(Nc > 1,
"Order in 'c' direction must be > 1.");
215 ASSERTL1(Na <= Nc,
"order in 'a' direction is higher "
216 "than order in 'c' direction");
217 ASSERTL1(Nb <= Nc,
"order in 'b' direction is higher "
218 "than order in 'c' direction");
220 int nCoef = Na * (Na + 1) / 2 + (Nb - Na) * Na
221 + Na * (Na + 1) / 2 + (Nc - Na) * Na
222 + 2 * (Nb * (Nb + 1) / 2 + (Nc - Nb) * Nb)
223 - Na - 2 * Nb - 3 * Nc
234 ASSERTL1(Na > 1,
"Order in 'a' direction must be > 1.");
235 ASSERTL1(Nb > 1,
"Order in 'b' direction must be > 1.");
236 ASSERTL1(Nc > 1,
"Order in 'c' direction must be > 1.");
237 ASSERTL1(Na <= Nc,
"Order in 'a' direction is higher "
238 "than order in 'c' direction.");
239 ASSERTL1(Nb <= Nc,
"Order in 'b' direction is higher "
240 "than order in 'c' direction.");
246 for (
int a = 0; a < Na; ++a)
248 for (
int b = 0; b < Nb; ++b)
250 for (
int c = 0; c < Nc - std::max(a, b); ++c)
261 ASSERTL1(Na > 1,
"Order in 'a' direction must be > 1.");
262 ASSERTL1(Nb > 1,
"Order in 'b' direction must be > 1.");
263 ASSERTL1(Nc > 1,
"Order in 'c' direction must be > 1.");
264 ASSERTL1(Na <= Nc,
"Order in 'a' direction is higher "
265 "than order in 'c' direction.");
266 ASSERTL1(Nb <= Nc,
"Order in 'b' direction is higher "
267 "than order in 'c' direction.");
270 + 2 * (Na * (Na + 1) / 2 + (Nc - Na) * Na)
271 + 2 * (Nb * (Nb + 1) / 2 + (Nc - Nb) * Nb)
272 - 2 * Na - 2 * Nb - 4 * Nc
277namespace StdPrismData
281 ASSERTL1(Na > 1,
"Order in 'a' direction must be > 1.");
282 ASSERTL1(Nb > 1,
"Order in 'b' direction must be > 1.");
283 ASSERTL1(Nc > 1,
"Order in 'c' direction must be > 1.");
284 ASSERTL1(Na <= Nc,
"Order in 'a' direction is higher "
285 "than order in 'c' direction.");
292 ASSERTL1(Na > 1,
"Order in 'a' direction must be > 1.");
293 ASSERTL1(Nb > 1,
"Order in 'b' direction must be > 1.");
294 ASSERTL1(Nc > 1,
"Order in 'c' direction must be > 1.");
295 ASSERTL1(Na <= Nc,
"Order in 'a' direction is higher "
296 "than order in 'c' direction.");
298 return Na * Nb + 2 * Nb * Nc
299 + 2 * (Na * (Na + 1) / 2 + (Nc - Na) * Na)
300 - 2 * Na - 3 * Nb - 4 * Nc
306 std::vector<unsigned int> &
modes,
313 returnval =
modes[offset];
320 returnval =
modes[offset] *
modes[offset + 1];
370 returnval = na * nb * nc;
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed to...
int getNumberOfCoefficients(int Na, int Nb, int Nc)
int getNumberOfBndCoefficients(int Na, int Nb, int Nc)
int getNumberOfCoefficients(int Na, int Nb, int Nc)
int getNumberOfBndCoefficients(int Na, int Nb, int Nc)
int getNumberOfCoefficients(int Na, int Nb, int Nc)
int getNumberOfBndCoefficients(int Na, int Nb, int Nc)
int getNumberOfCoefficients(int Na, int Nb)
int getNumberOfBndCoefficients(int Na, int Nb)
int getNumberOfCoefficients(int Na)
int getNumberOfBndCoefficients(int Na)
int getNumberOfBndCoefficients(int Na, int Nb, int Nc)
int getNumberOfCoefficients(int Na, int Nb, int Nc)
int getNumberOfCoefficients(int Na, int Nb)
int getNumberOfBndCoefficients(int Na, int Nb)
const char *const ShapeTypeMap[SIZE_ShapeType]
int GetNumberOfCoefficients(ShapeType shape, std::vector< unsigned int > &modes, int offset=0)
constexpr unsigned int ShapeTypeDimMap[SIZE_ShapeType]