Nektar++
ProcessQualityMetric.cpp
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////////////
2//
3// File: ProcessQualityMetric.cpp
4//
5// For more information, please see: http://www.nektar.info/
6//
7// The MIT License
8//
9// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10// Department of Aeronautics, Imperial College London (UK), and Scientific
11// Computing and Imaging Institute, University of Utah (USA).
12//
13// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description: Compute quality metric of Roca et al.
32//
33////////////////////////////////////////////////////////////////////////////////
34
35#include <iostream>
36#include <string>
37using namespace std;
38
46
48
49namespace Nektar::FieldUtils
50{
51
54 ModuleKey(eProcessModule, "qualitymetric"),
55 ProcessQualityMetric::create, "add quality metric to field.");
56
58{
59 m_config["scaled"] = ConfigOption(true, "0", "use scaled jacobian instead");
60}
61
63{
64}
65
66void ProcessQualityMetric::v_Process(po::variables_map &vm)
67{
68 m_f->SetUpExp(vm);
69
70 int nfields = m_f->m_variables.size();
71 m_f->m_variables.push_back("qualitymetric");
72 // Skip in case of empty partition
73 if (m_f->m_exp[0]->GetNumElmts() == 0)
74 {
75 return;
76 }
77
78 int NumHomogeneousDir = m_f->m_numHomogeneousDir;
80
81 if (nfields)
82 {
83 m_f->m_exp.resize(nfields + 1);
84 exp = m_f->AppendExpList(NumHomogeneousDir);
85
86 m_f->m_exp[nfields] = exp;
87 }
88 else
89 {
90 exp = m_f->m_exp[0];
91 }
92
93 Array<OneD, NekDouble> &phys = exp->UpdatePhys();
94 Array<OneD, NekDouble> &coeffs = exp->UpdateCoeffs();
95
96 for (int i = 0; i < exp->GetExpSize(); ++i)
97 {
98 // copy Jacobian into field
99 LocalRegions::ExpansionSharedPtr Elmt = exp->GetExp(i);
100 int offset = exp->GetPhys_Offset(i);
101 Array<OneD, NekDouble> q = GetQ(Elmt, m_config["scaled"].as<bool>());
102 Array<OneD, NekDouble> out = phys + offset;
103
104 ASSERTL0(q.size() == Elmt->GetTotPoints(), "number of points mismatch");
105 Vmath::Vcopy(q.size(), q, 1, out, 1);
106 }
107
108 exp->FwdTransLocalElmt(phys, coeffs);
109}
110
113{
114 vector<DNekMat> ret;
115
116 if (geom->GetShapeType() == LibUtilities::eQuadrilateral)
117 {
118 vector<Array<OneD, NekDouble>> xy;
119 for (int i = 0; i < geom->GetNumVerts(); i++)
120 {
122 SpatialDomains::PointGeomSharedPtr p = geom->GetVertex(i);
123 p->GetCoords(loc);
124 xy.push_back(loc);
125 }
126
128 Array<OneD, NekDouble> u = b[0]->GetZ();
129 Array<OneD, NekDouble> v = b[1]->GetZ();
130
131 for (int j = 0; j < b[1]->GetNumPoints(); j++)
132 {
133 for (int i = 0; i < b[0]->GetNumPoints(); i++)
134 {
135 NekDouble a1 = 0.5 * (1.0 - u[i]), a2 = 0.5 * (1.0 + u[i]);
136 NekDouble b1 = 0.5 * (1.0 - v[j]), b2 = 0.5 * (1.0 + v[j]);
137 DNekMat dxdz(2, 2, 1.0, eFULL);
138
139 dxdz(0, 0) = 0.5 * (-b1 * xy[0][0] + b1 * xy[1][0] +
140 b2 * xy[2][0] - b2 * xy[3][0]);
141 dxdz(1, 0) = 0.5 * (-b1 * xy[0][1] + b1 * xy[1][1] +
142 b2 * xy[2][1] - b2 * xy[3][1]);
143
144 dxdz(0, 1) = 0.5 * (-a1 * xy[0][0] - a2 * xy[1][0] +
145 a2 * xy[2][0] + a1 * xy[3][0]);
146 dxdz(1, 1) = 0.5 * (-a1 * xy[0][1] - a2 * xy[1][1] +
147 a2 * xy[2][1] + a1 * xy[3][1]);
148
149 dxdz.Invert();
150 ret.push_back(dxdz);
151 }
152 }
153 }
154 else if (geom->GetShapeType() == LibUtilities::eTriangle)
155 {
156 vector<Array<OneD, NekDouble>> xy;
157 for (int i = 0; i < geom->GetNumVerts(); i++)
158 {
160 SpatialDomains::PointGeomSharedPtr p = geom->GetVertex(i);
161 p->GetCoords(loc);
162 xy.push_back(loc);
163 }
164
166 Array<OneD, NekDouble> u = b[0]->GetZ();
167 Array<OneD, NekDouble> v = b[1]->GetZ();
168
169 for (int i = 0; i < b[0]->GetNumPoints(); i++)
170 {
171 for (int j = 0; j < b[1]->GetNumPoints(); j++)
172 {
173 DNekMat dxdz(2, 2, 1.0, eFULL);
174 dxdz(0, 0) = -xy[0][0] / 2.0 + xy[1][0] / 2.0;
175
176 dxdz(0, 1) = -xy[0][0] / 2.0 + xy[2][0] / 2.0;
177
178 dxdz(1, 0) = -xy[0][1] / 2.0 + xy[1][1] / 2.0;
179
180 dxdz(1, 1) = -xy[0][1] / 2.0 + xy[2][1] / 2.0;
181
182 dxdz.Invert();
183 ret.push_back(dxdz);
184 }
185 }
186 }
187 else if (geom->GetShapeType() == LibUtilities::eTetrahedron)
188 {
189 vector<Array<OneD, NekDouble>> xyz;
190 for (int i = 0; i < geom->GetNumVerts(); i++)
191 {
193 SpatialDomains::PointGeomSharedPtr p = geom->GetVertex(i);
194 p->GetCoords(loc);
195 xyz.push_back(loc);
196 }
197
199 Array<OneD, NekDouble> u = b[0]->GetZ();
200 Array<OneD, NekDouble> v = b[1]->GetZ();
201 Array<OneD, NekDouble> z = b[2]->GetZ();
202
203 for (int i = 0; i < b[0]->GetNumPoints(); i++)
204 {
205 for (int j = 0; j < b[1]->GetNumPoints(); j++)
206 {
207 for (int k = 0; k < b[2]->GetNumPoints(); k++)
208 {
209 DNekMat dxdz(3, 3, 1.0, eFULL);
210 dxdz(0, 0) = -xyz[0][0] / 2.0 + xyz[1][0] / 2.0;
211
212 dxdz(0, 1) = -xyz[0][0] / 2.0 + xyz[2][0] / 2.0;
213
214 dxdz(0, 2) = -xyz[0][0] / 2.0 + xyz[3][0] / 2.0;
215
216 dxdz(1, 0) = -xyz[0][1] / 2.0 + xyz[1][1] / 2.0;
217
218 dxdz(1, 1) = -xyz[0][1] / 2.0 + xyz[2][1] / 2.0;
219
220 dxdz(1, 2) = -xyz[0][1] / 2.0 + xyz[3][1] / 2.0;
221
222 dxdz(2, 0) = -xyz[0][2] / 2.0 + xyz[1][2] / 2.0;
223
224 dxdz(2, 1) = -xyz[0][2] / 2.0 + xyz[2][2] / 2.0;
225
226 dxdz(2, 2) = -xyz[0][2] / 2.0 + xyz[3][2] / 2.0;
227
228 dxdz.Invert();
229 ret.push_back(dxdz);
230 }
231 }
232 }
233 }
234 else if (geom->GetShapeType() == LibUtilities::ePrism)
235 {
236 vector<Array<OneD, NekDouble>> xyz;
237 for (int i = 0; i < geom->GetNumVerts(); i++)
238 {
240 SpatialDomains::PointGeomSharedPtr p = geom->GetVertex(i);
241 p->GetCoords(loc);
242 xyz.push_back(loc);
243 }
244
246 Array<OneD, NekDouble> eta1 = b[0]->GetZ();
247 Array<OneD, NekDouble> eta2 = b[1]->GetZ();
248 Array<OneD, NekDouble> eta3 = b[2]->GetZ();
249
250 for (int k = 0; k < b[2]->GetNumPoints(); k++)
251 {
252 for (int j = 0; j < b[1]->GetNumPoints(); j++)
253 {
254 for (int i = 0; i < b[0]->GetNumPoints(); i++)
255 {
256 NekDouble xi1 = 0.5 * (1 + eta1[i]) * (1 - eta3[k]) - 1.0;
257 NekDouble a2 = 0.5 * (1 + xi1);
258 NekDouble b1 = 0.5 * (1 - eta2[j]),
259 b2 = 0.5 * (1 + eta2[j]);
260 NekDouble c1 = 0.5 * (1 - eta3[k]),
261 c2 = 0.5 * (1 + eta3[k]);
262
263 DNekMat dxdz(3, 3, 1.0, eFULL);
264
265 dxdz(0, 0) = 0.5 * (-b1 * xyz[0][0] + b1 * xyz[1][0] +
266 b2 * xyz[2][0] - b2 * xyz[3][0]);
267 dxdz(1, 0) = 0.5 * (-b1 * xyz[0][1] + b1 * xyz[1][1] +
268 b2 * xyz[2][1] - b2 * xyz[3][1]);
269 dxdz(2, 0) = 0.5 * (-b1 * xyz[0][2] + b1 * xyz[1][2] +
270 b2 * xyz[2][2] - b2 * xyz[3][2]);
271
272 dxdz(0, 1) = 0.5 * ((a2 - c1) * xyz[0][0] - a2 * xyz[1][0] +
273 a2 * xyz[2][0] + (c1 - a2) * xyz[3][0] -
274 c2 * xyz[4][0] + c2 * xyz[5][0]);
275 dxdz(1, 1) = 0.5 * ((a2 - c1) * xyz[0][1] - a2 * xyz[1][1] +
276 a2 * xyz[2][1] + (c1 - a2) * xyz[3][1] -
277 c2 * xyz[4][1] + c2 * xyz[5][1]);
278 dxdz(2, 1) = 0.5 * ((a2 - c1) * xyz[0][2] - a2 * xyz[1][2] +
279 a2 * xyz[2][2] + (c1 - a2) * xyz[3][2] -
280 c2 * xyz[4][2] + c2 * xyz[5][2]);
281
282 dxdz(0, 2) = 0.5 * (-b1 * xyz[0][0] - b2 * xyz[3][0] +
283 b1 * xyz[4][0] + b2 * xyz[5][0]);
284 dxdz(1, 2) = 0.5 * (-b1 * xyz[0][1] - b2 * xyz[3][1] +
285 b1 * xyz[4][1] + b2 * xyz[5][1]);
286 dxdz(2, 2) = 0.5 * (-b1 * xyz[0][2] - b2 * xyz[3][2] +
287 b1 * xyz[4][2] + b2 * xyz[5][2]);
288
289 dxdz.Invert();
290 ret.push_back(dxdz);
291 }
292 }
293 }
294 }
295 else if (geom->GetShapeType() == LibUtilities::eHexahedron)
296 {
297 vector<Array<OneD, NekDouble>> xyz;
298 for (int i = 0; i < geom->GetNumVerts(); i++)
299 {
301 SpatialDomains::PointGeomSharedPtr p = geom->GetVertex(i);
302 p->GetCoords(loc);
303 xyz.push_back(loc);
304 }
305
307 Array<OneD, NekDouble> eta1 = b[0]->GetZ();
308 Array<OneD, NekDouble> eta2 = b[1]->GetZ();
309 Array<OneD, NekDouble> eta3 = b[2]->GetZ();
310
311 for (int k = 0; k < b[2]->GetNumPoints(); k++)
312 {
313 for (int j = 0; j < b[1]->GetNumPoints(); j++)
314 {
315 for (int i = 0; i < b[0]->GetNumPoints(); i++)
316 {
317 NekDouble a1 = 0.5 * (1 - eta1[i]);
318 NekDouble a2 = 0.5 * (1 + eta1[i]);
319 NekDouble b1 = 0.5 * (1 - eta2[j]),
320 b2 = 0.5 * (1 + eta2[j]);
321 NekDouble c1 = 0.5 * (1 - eta3[k]),
322 c2 = 0.5 * (1 + eta3[k]);
323
324 DNekMat dxdz(3, 3, 1.0, eFULL);
325
326 dxdz(0, 0) =
327 -0.5 * b1 * c1 * xyz[0][0] + 0.5 * b1 * c1 * xyz[1][0] +
328 0.5 * b2 * c1 * xyz[2][0] - 0.5 * b2 * c1 * xyz[3][0] -
329 0.5 * b1 * c2 * xyz[5][0] + 0.5 * b1 * c2 * xyz[5][0] +
330 0.5 * b2 * c2 * xyz[6][0] - 0.5 * b2 * c2 * xyz[7][0];
331 dxdz(1, 0) =
332 -0.5 * b1 * c1 * xyz[0][1] + 0.5 * b1 * c1 * xyz[1][1] +
333 0.5 * b2 * c1 * xyz[2][1] - 0.5 * b2 * c1 * xyz[3][1] -
334 0.5 * b1 * c2 * xyz[5][1] + 0.5 * b1 * c2 * xyz[5][1] +
335 0.5 * b2 * c2 * xyz[6][1] - 0.5 * b2 * c2 * xyz[7][1];
336 dxdz(2, 0) =
337 -0.5 * b1 * c1 * xyz[0][2] + 0.5 * b1 * c1 * xyz[1][2] +
338 0.5 * b2 * c1 * xyz[2][2] - 0.5 * b2 * c1 * xyz[3][2] -
339 0.5 * b1 * c2 * xyz[5][2] + 0.5 * b1 * c2 * xyz[5][2] +
340 0.5 * b2 * c2 * xyz[6][2] - 0.5 * b2 * c2 * xyz[7][2];
341
342 dxdz(0, 1) =
343 -0.5 * a1 * c1 * xyz[0][0] - 0.5 * a2 * c1 * xyz[1][0] +
344 0.5 * a2 * c1 * xyz[2][0] + 0.5 * a1 * c1 * xyz[3][0] -
345 0.5 * a1 * c2 * xyz[5][0] - 0.5 * a2 * c2 * xyz[5][0] +
346 0.5 * a2 * c2 * xyz[6][0] + 0.5 * a1 * c2 * xyz[7][0];
347 dxdz(1, 1) =
348 -0.5 * a1 * c1 * xyz[0][1] - 0.5 * a2 * c1 * xyz[1][1] +
349 0.5 * a2 * c1 * xyz[2][1] + 0.5 * a1 * c1 * xyz[3][1] -
350 0.5 * a1 * c2 * xyz[5][1] - 0.5 * a2 * c2 * xyz[5][1] +
351 0.5 * a2 * c2 * xyz[6][1] + 0.5 * a1 * c2 * xyz[7][1];
352 dxdz(2, 1) =
353 -0.5 * a1 * c1 * xyz[0][2] - 0.5 * a2 * c1 * xyz[1][2] +
354 0.5 * a2 * c1 * xyz[2][2] + 0.5 * a1 * c1 * xyz[3][2] -
355 0.5 * a1 * c2 * xyz[5][2] - 0.5 * a2 * c2 * xyz[5][2] +
356 0.5 * a2 * c2 * xyz[6][2] + 0.5 * a1 * c2 * xyz[7][2];
357
358 dxdz(0, 0) =
359 -0.5 * b1 * a1 * xyz[0][0] - 0.5 * b1 * a2 * xyz[1][0] -
360 0.5 * b2 * a2 * xyz[2][0] - 0.5 * b2 * a1 * xyz[3][0] +
361 0.5 * b1 * a1 * xyz[5][0] + 0.5 * b1 * a2 * xyz[5][0] +
362 0.5 * b2 * a2 * xyz[6][0] + 0.5 * b2 * a1 * xyz[7][0];
363 dxdz(1, 0) =
364 -0.5 * b1 * a1 * xyz[0][1] - 0.5 * b1 * a2 * xyz[1][1] -
365 0.5 * b2 * a2 * xyz[2][1] - 0.5 * b2 * a1 * xyz[3][1] +
366 0.5 * b1 * a1 * xyz[5][1] + 0.5 * b1 * a2 * xyz[5][1] +
367 0.5 * b2 * a2 * xyz[6][1] + 0.5 * b2 * a1 * xyz[7][1];
368 dxdz(2, 0) =
369 -0.5 * b1 * a1 * xyz[0][2] - 0.5 * b1 * a2 * xyz[1][2] -
370 0.5 * b2 * a2 * xyz[2][2] - 0.5 * b2 * a1 * xyz[3][2] +
371 0.5 * b1 * a1 * xyz[5][2] + 0.5 * b1 * a2 * xyz[5][2] +
372 0.5 * b2 * a2 * xyz[6][2] + 0.5 * b2 * a1 * xyz[7][2];
373
374 dxdz.Invert();
375 ret.push_back(dxdz);
376 }
377 }
378 }
379 }
380 else
381 {
382 ASSERTL0(false, "not coded");
383 }
384
385 return ret;
386}
387
390{
391 SpatialDomains::GeometrySharedPtr geom = e->GetGeom();
392 StdRegions::StdExpansionSharedPtr chi = e->GetGeom()->GetXmap();
393 LibUtilities::PointsKeyVector p = chi->GetPointsKeys();
394 LibUtilities::PointsKeyVector pElem = e->GetPointsKeys();
395 SpatialDomains::GeomFactorsSharedPtr gfac = geom->GetGeomFactors();
396 const int expDim = chi->GetNumBases();
397 int nElemPts = 1;
398
399 vector<LibUtilities::BasisKey> basisKeys;
400 bool needsInterp = false;
401
402 for (int i = 0; i < expDim; ++i)
403 {
404 nElemPts *= pElem[i].GetNumPoints();
405 needsInterp =
406 needsInterp || pElem[i].GetNumPoints() < p[i].GetNumPoints() - 1;
407 }
408
409 if (needsInterp)
410 {
411 stringstream err;
412 err << "Interpolating from higher order geometry to lower order in "
413 << "element " << geom->GetGlobalID();
414 NEKERROR(ErrorUtil::ewarning, err.str());
415 }
416
417 for (int i = 0; i < expDim; ++i)
418 {
419 basisKeys.push_back(
420 needsInterp
421 ? chi->GetBasis(i)->GetBasisKey()
422 : LibUtilities::BasisKey(chi->GetBasisType(i),
423 chi->GetBasisNumModes(i), pElem[i]));
424 }
425
427 switch (chi->DetShapeType())
428 {
431 basisKeys[0], basisKeys[1]);
432 break;
435 basisKeys[0], basisKeys[1]);
436 break;
439 basisKeys[0], basisKeys[1], basisKeys[2]);
440 break;
443 basisKeys[0], basisKeys[1], basisKeys[2]);
444 break;
447 basisKeys[0], basisKeys[1], basisKeys[2]);
448 break;
449 default:
450 ASSERTL0(false, "nope");
451 }
452
453 SpatialDomains::DerivStorage deriv = gfac->GetDeriv(pElem);
454
455 const int pts = deriv[0][0].size();
456 const int nq = chiMod->GetTotPoints();
457
458 ASSERTL0(pts == nq, "what");
459
460 vector<DNekMat> i2rm = MappingIdealToRef(geom, chiMod);
462
463 for (int k = 0; k < pts; ++k)
464 {
465 DNekMat jac(expDim, expDim, 0.0, eFULL);
466 DNekMat jacIdeal(expDim, expDim, 0.0, eFULL);
467
468 for (int i = 0; i < expDim; ++i)
469 {
470 for (int j = 0; j < expDim; ++j)
471 {
472 jac(j, i) = deriv[i][j][k];
473 }
474 }
475
476 jacIdeal = jac * i2rm[k];
477 NekDouble jacDet = 1.0;
478
479 if (expDim == 2)
480 {
481 jacDet = jacIdeal(0, 0) * jacIdeal(1, 1) -
482 jacIdeal(0, 1) * jacIdeal(1, 0);
483 }
484 else if (expDim == 3)
485 {
486 jacDet = jacIdeal(0, 0) * (jacIdeal(1, 1) * jacIdeal(2, 2) -
487 jacIdeal(2, 1) * jacIdeal(1, 2)) -
488 jacIdeal(0, 1) * (jacIdeal(1, 0) * jacIdeal(2, 2) -
489 jacIdeal(2, 0) * jacIdeal(1, 2)) +
490 jacIdeal(0, 2) * (jacIdeal(1, 0) * jacIdeal(2, 1) -
491 jacIdeal(2, 0) * jacIdeal(1, 1));
492 }
493 else
494 {
495 NEKERROR(ErrorUtil::efatal, "invalid expansion dimension.");
496 }
497
498 if (s)
499 {
500 eta[k] = jacDet;
501 }
502 else
503 {
504 NekDouble frob = 0.0;
505
506 for (int i = 0; i < expDim; ++i)
507 {
508 for (int j = 0; j < expDim; ++j)
509 {
510 frob += jacIdeal(i, j) * jacIdeal(i, j);
511 }
512 }
513
514 NekDouble sigma = 0.5 * (jacDet + sqrt(jacDet * jacDet));
515 eta[k] = expDim * pow(sigma, 2.0 / expDim) / frob;
516 }
517 }
518
519 if (s)
520 {
521 NekDouble mx = -1.0 * numeric_limits<double>::max();
522 NekDouble mn = numeric_limits<double>::max();
523 for (int k = 0; k < pts; k++)
524 {
525 mx = max(mx, eta[k]);
526 mn = min(mn, eta[k]);
527 }
528 for (int k = 0; k < pts; k++)
529 {
530 eta[k] = mn / mx;
531 }
532 }
533
534 // Project onto output stuff
535 if (needsInterp && pts != 1)
536 {
537 Array<OneD, NekDouble> tmp(nElemPts);
538
539 if (expDim == 2)
540 {
541 LibUtilities::Interp2D(p[0], p[1], eta, pElem[0], pElem[1], tmp);
542 }
543 else if (expDim == 3)
544 {
545 LibUtilities::Interp3D(p[0], p[1], p[2], eta, pElem[0], pElem[1],
546 pElem[2], tmp);
547 }
548 else
549 {
550 ASSERTL0(false, "mesh dim makes no sense");
551 }
552
553 eta = tmp;
554 }
555
556 if (pts == 1)
557 {
558 Vmath::Fill(nq - 1, eta[0], &eta[1], 1);
559 }
560
561 return eta;
562}
563} // namespace Nektar::FieldUtils
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:208
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
Definition: ErrorUtil.hpp:202
FieldSharedPtr m_f
Field object.
Definition: Module.h:239
std::map< std::string, ConfigOption > m_config
List of configuration values.
Definition: Module.h:272
Abstract base class for processing modules.
Definition: Module.h:301
Array< OneD, NekDouble > GetQ(LocalRegions::ExpansionSharedPtr e, bool s)
void v_Process(po::variables_map &vm) override
Write mesh to output file.
static std::shared_ptr< Module > create(FieldSharedPtr f)
Creates an instance of this class.
Describes the specification for a Basis.
Definition: Basis.h:45
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< Field > FieldSharedPtr
Definition: Field.hpp:1026
std::pair< ModuleType, std::string > ModuleKey
Definition: Module.h:180
vector< DNekMat > MappingIdealToRef(SpatialDomains::GeometrySharedPtr geom, StdRegions::StdExpansionSharedPtr chi)
ModuleFactory & GetModuleFactory()
Definition: Module.cpp:47
void Interp3D(const BasisKey &fbasis0, const BasisKey &fbasis1, const BasisKey &fbasis2, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, const BasisKey &tbasis2, Array< OneD, NekDouble > &to)
this function interpolates a 3D function evaluated at the quadrature points of the 3D basis,...
Definition: Interp.cpp:162
void Interp2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
this function interpolates a 2D function evaluated at the quadrature points of the 2D basis,...
Definition: Interp.cpp:101
std::vector< PointsKey > PointsKeyVector
Definition: Points.h:231
std::shared_ptr< Expansion > ExpansionSharedPtr
Definition: Expansion.h:66
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
Definition: GeomFactors.h:60
std::shared_ptr< PointGeom > PointGeomSharedPtr
Definition: Geometry.h:57
std::shared_ptr< Geometry > GeometrySharedPtr
Definition: Geometry.h:51
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
std::vector< double > z(NPUPPER)
std::vector< double > q(NPUPPER *NPUPPER)
double NekDouble
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition: Vmath.hpp:54
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.hpp:825
STL namespace.
scalarT< T > sqrt(scalarT< T > in)
Definition: scalar.hpp:294
Represents a command-line configuration option.
Definition: Module.h:129