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");
196 int nCoef = Na * Nb * Nc - Na * Nc * (Na - 1) / 2 - Na * Nb * (Nb - 1) / 2 +
197 Na * (Na - 1) * (Na - 2) / 6;
203 ASSERTL2(Na > 1,
"Order in 'a' direction must be > 1.");
204 ASSERTL2(Nb > 1,
"Order in 'b' direction must be > 1.");
205 ASSERTL2(Nc > 1,
"Order in 'c' direction must be > 1.");
206 ASSERTL1(Na <= Nc,
"order in 'a' direction is higher "
207 "than order in 'c' direction");
208 ASSERTL1(Nb <= Nc,
"order in 'b' direction is higher "
209 "than order in 'c' direction");
211 int nCoef = Na * (Na + 1) / 2 + (Nb - Na) * Na
212 + Na * (Na + 1) / 2 + (Nc - Na) * Na
213 + 2 * (Nb * (Nb + 1) / 2 + (Nc - Nb) * Nb)
214 - Na - 2 * Nb - 3 * Nc
225 ASSERTL1(Na > 1,
"Order in 'a' direction must be > 1.");
226 ASSERTL1(Nb > 1,
"Order in 'b' direction must be > 1.");
227 ASSERTL1(Nc > 1,
"Order in 'c' direction must be > 1.");
228 ASSERTL1(Na <= Nc,
"Order in 'a' direction is higher "
229 "than order in 'c' direction.");
230 ASSERTL1(Nb <= Nc,
"Order in 'b' direction is higher "
231 "than order in 'c' direction.");
237 for (
int a = 0; a < Na; ++a)
239 for (
int b = 0; b < Nb; ++b)
241 for (
int c = 0; c < Nc - std::max(a, b); ++c)
252 ASSERTL1(Na > 1,
"Order in 'a' direction must be > 1.");
253 ASSERTL1(Nb > 1,
"Order in 'b' direction must be > 1.");
254 ASSERTL1(Nc > 1,
"Order in 'c' direction must be > 1.");
255 ASSERTL1(Na <= Nc,
"Order in 'a' direction is higher "
256 "than order in 'c' direction.");
257 ASSERTL1(Nb <= Nc,
"Order in 'b' direction is higher "
258 "than order in 'c' direction.");
261 + 2 * (Na * (Na + 1) / 2 + (Nc - Na) * Na)
262 + 2 * (Nb * (Nb + 1) / 2 + (Nc - Nb) * Nb)
263 - 2 * Na - 2 * Nb - 4 * Nc
268namespace StdPrismData
272 ASSERTL1(Na > 1,
"Order in 'a' direction must be > 1.");
273 ASSERTL1(Nb > 1,
"Order in 'b' direction must be > 1.");
274 ASSERTL1(Nc > 1,
"Order in 'c' direction must be > 1.");
275 ASSERTL1(Na <= Nc,
"Order in 'a' direction is higher "
276 "than order in 'c' direction.");
283 ASSERTL1(Na > 1,
"Order in 'a' direction must be > 1.");
284 ASSERTL1(Nb > 1,
"Order in 'b' direction must be > 1.");
285 ASSERTL1(Nc > 1,
"Order in 'c' direction must be > 1.");
286 ASSERTL1(Na <= Nc,
"Order in 'a' direction is higher "
287 "than order in 'c' direction.");
289 return Na * Nb + 2 * Nb * Nc
290 + 2 * (Na * (Na + 1) / 2 + (Nc - Na) * Na)
291 - 2 * Na - 3 * Nb - 4 * Nc
297 std::vector<unsigned int> &modes,
304 returnval = modes[offset];
311 returnval = modes[offset] * modes[offset + 1];
315 modes[offset], modes[offset + 1], modes[offset + 2]);
319 modes[offset], modes[offset + 1], modes[offset + 2]);
323 modes[offset], modes[offset + 1], modes[offset + 2]);
326 returnval = modes[offset] * modes[offset + 1] * modes[offset + 2];
361 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]