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
39#include <boost/core/ignore_unused.hpp>
40
48
50
51namespace Nektar
52{
53namespace FieldUtils
54{
55
58 ModuleKey(eProcessModule, "qualitymetric"),
59 ProcessQualityMetric::create, "add quality metric to field.");
60
62{
63 m_config["scaled"] = ConfigOption(true, "0", "use scaled jacobian instead");
64}
65
67{
68}
69
70void ProcessQualityMetric::v_Process(po::variables_map &vm)
71{
72 m_f->SetUpExp(vm);
73
74 int nfields = m_f->m_variables.size();
75 m_f->m_variables.push_back("qualitymetric");
76 // Skip in case of empty partition
77 if (m_f->m_exp[0]->GetNumElmts() == 0)
78 {
79 return;
80 }
81
82 int NumHomogeneousDir = m_f->m_numHomogeneousDir;
84
85 if (nfields)
86 {
87 m_f->m_exp.resize(nfields + 1);
88 exp = m_f->AppendExpList(NumHomogeneousDir);
89
90 m_f->m_exp[nfields] = exp;
91 }
92 else
93 {
94 exp = m_f->m_exp[0];
95 }
96
97 Array<OneD, NekDouble> &phys = exp->UpdatePhys();
98 Array<OneD, NekDouble> &coeffs = exp->UpdateCoeffs();
99
100 for (int i = 0; i < exp->GetExpSize(); ++i)
101 {
102 // copy Jacobian into field
103 LocalRegions::ExpansionSharedPtr Elmt = exp->GetExp(i);
104 int offset = exp->GetPhys_Offset(i);
105 Array<OneD, NekDouble> q = GetQ(Elmt, m_config["scaled"].as<bool>());
106 Array<OneD, NekDouble> out = phys + offset;
107
108 ASSERTL0(q.size() == Elmt->GetTotPoints(), "number of points mismatch");
109 Vmath::Vcopy(q.size(), q, 1, out, 1);
110 }
111
112 exp->FwdTransLocalElmt(phys, coeffs);
113}
114
117{
118 vector<DNekMat> ret;
119
120 if (geom->GetShapeType() == LibUtilities::eQuadrilateral)
121 {
122 vector<Array<OneD, NekDouble>> xy;
123 for (int i = 0; i < geom->GetNumVerts(); i++)
124 {
126 SpatialDomains::PointGeomSharedPtr p = geom->GetVertex(i);
127 p->GetCoords(loc);
128 xy.push_back(loc);
129 }
130
132 Array<OneD, NekDouble> u = b[0]->GetZ();
133 Array<OneD, NekDouble> v = b[1]->GetZ();
134
135 for (int j = 0; j < b[1]->GetNumPoints(); j++)
136 {
137 for (int i = 0; i < b[0]->GetNumPoints(); i++)
138 {
139 NekDouble a1 = 0.5 * (1.0 - u[i]), a2 = 0.5 * (1.0 + u[i]);
140 NekDouble b1 = 0.5 * (1.0 - v[j]), b2 = 0.5 * (1.0 + v[j]);
141 DNekMat dxdz(2, 2, 1.0, eFULL);
142
143 dxdz(0, 0) = 0.5 * (-b1 * xy[0][0] + b1 * xy[1][0] +
144 b2 * xy[2][0] - b2 * xy[3][0]);
145 dxdz(1, 0) = 0.5 * (-b1 * xy[0][1] + b1 * xy[1][1] +
146 b2 * xy[2][1] - b2 * xy[3][1]);
147
148 dxdz(0, 1) = 0.5 * (-a1 * xy[0][0] - a2 * xy[1][0] +
149 a2 * xy[2][0] + a1 * xy[3][0]);
150 dxdz(1, 1) = 0.5 * (-a1 * xy[0][1] - a2 * xy[1][1] +
151 a2 * xy[2][1] + a1 * xy[3][1]);
152
153 dxdz.Invert();
154 ret.push_back(dxdz);
155 }
156 }
157 }
158 else if (geom->GetShapeType() == LibUtilities::eTriangle)
159 {
160 vector<Array<OneD, NekDouble>> xy;
161 for (int i = 0; i < geom->GetNumVerts(); i++)
162 {
164 SpatialDomains::PointGeomSharedPtr p = geom->GetVertex(i);
165 p->GetCoords(loc);
166 xy.push_back(loc);
167 }
168
170 Array<OneD, NekDouble> u = b[0]->GetZ();
171 Array<OneD, NekDouble> v = b[1]->GetZ();
172
173 for (int i = 0; i < b[0]->GetNumPoints(); i++)
174 {
175 for (int j = 0; j < b[1]->GetNumPoints(); j++)
176 {
177 DNekMat dxdz(2, 2, 1.0, eFULL);
178 dxdz(0, 0) = -xy[0][0] / 2.0 + xy[1][0] / 2.0;
179
180 dxdz(0, 1) = -xy[0][0] / 2.0 + xy[2][0] / 2.0;
181
182 dxdz(1, 0) = -xy[0][1] / 2.0 + xy[1][1] / 2.0;
183
184 dxdz(1, 1) = -xy[0][1] / 2.0 + xy[2][1] / 2.0;
185
186 dxdz.Invert();
187 ret.push_back(dxdz);
188 }
189 }
190 }
191 else if (geom->GetShapeType() == LibUtilities::eTetrahedron)
192 {
193 vector<Array<OneD, NekDouble>> xyz;
194 for (int i = 0; i < geom->GetNumVerts(); i++)
195 {
197 SpatialDomains::PointGeomSharedPtr p = geom->GetVertex(i);
198 p->GetCoords(loc);
199 xyz.push_back(loc);
200 }
201
203 Array<OneD, NekDouble> u = b[0]->GetZ();
204 Array<OneD, NekDouble> v = b[1]->GetZ();
205 Array<OneD, NekDouble> z = b[2]->GetZ();
206
207 for (int i = 0; i < b[0]->GetNumPoints(); i++)
208 {
209 for (int j = 0; j < b[1]->GetNumPoints(); j++)
210 {
211 for (int k = 0; k < b[2]->GetNumPoints(); k++)
212 {
213 DNekMat dxdz(3, 3, 1.0, eFULL);
214 dxdz(0, 0) = -xyz[0][0] / 2.0 + xyz[1][0] / 2.0;
215
216 dxdz(0, 1) = -xyz[0][0] / 2.0 + xyz[2][0] / 2.0;
217
218 dxdz(0, 2) = -xyz[0][0] / 2.0 + xyz[3][0] / 2.0;
219
220 dxdz(1, 0) = -xyz[0][1] / 2.0 + xyz[1][1] / 2.0;
221
222 dxdz(1, 1) = -xyz[0][1] / 2.0 + xyz[2][1] / 2.0;
223
224 dxdz(1, 2) = -xyz[0][1] / 2.0 + xyz[3][1] / 2.0;
225
226 dxdz(2, 0) = -xyz[0][2] / 2.0 + xyz[1][2] / 2.0;
227
228 dxdz(2, 1) = -xyz[0][2] / 2.0 + xyz[2][2] / 2.0;
229
230 dxdz(2, 2) = -xyz[0][2] / 2.0 + xyz[3][2] / 2.0;
231
232 dxdz.Invert();
233 ret.push_back(dxdz);
234 }
235 }
236 }
237 }
238 else if (geom->GetShapeType() == LibUtilities::ePrism)
239 {
240 vector<Array<OneD, NekDouble>> xyz;
241 for (int i = 0; i < geom->GetNumVerts(); i++)
242 {
244 SpatialDomains::PointGeomSharedPtr p = geom->GetVertex(i);
245 p->GetCoords(loc);
246 xyz.push_back(loc);
247 }
248
250 Array<OneD, NekDouble> eta1 = b[0]->GetZ();
251 Array<OneD, NekDouble> eta2 = b[1]->GetZ();
252 Array<OneD, NekDouble> eta3 = b[2]->GetZ();
253
254 for (int k = 0; k < b[2]->GetNumPoints(); k++)
255 {
256 for (int j = 0; j < b[1]->GetNumPoints(); j++)
257 {
258 for (int i = 0; i < b[0]->GetNumPoints(); i++)
259 {
260 NekDouble xi1 = 0.5 * (1 + eta1[i]) * (1 - eta3[k]) - 1.0;
261 NekDouble a2 = 0.5 * (1 + xi1);
262 NekDouble b1 = 0.5 * (1 - eta2[j]),
263 b2 = 0.5 * (1 + eta2[j]);
264 NekDouble c1 = 0.5 * (1 - eta3[k]),
265 c2 = 0.5 * (1 + eta3[k]);
266
267 DNekMat dxdz(3, 3, 1.0, eFULL);
268
269 dxdz(0, 0) = 0.5 * (-b1 * xyz[0][0] + b1 * xyz[1][0] +
270 b2 * xyz[2][0] - b2 * xyz[3][0]);
271 dxdz(1, 0) = 0.5 * (-b1 * xyz[0][1] + b1 * xyz[1][1] +
272 b2 * xyz[2][1] - b2 * xyz[3][1]);
273 dxdz(2, 0) = 0.5 * (-b1 * xyz[0][2] + b1 * xyz[1][2] +
274 b2 * xyz[2][2] - b2 * xyz[3][2]);
275
276 dxdz(0, 1) = 0.5 * ((a2 - c1) * xyz[0][0] - a2 * xyz[1][0] +
277 a2 * xyz[2][0] + (c1 - a2) * xyz[3][0] -
278 c2 * xyz[4][0] + c2 * xyz[5][0]);
279 dxdz(1, 1) = 0.5 * ((a2 - c1) * xyz[0][1] - a2 * xyz[1][1] +
280 a2 * xyz[2][1] + (c1 - a2) * xyz[3][1] -
281 c2 * xyz[4][1] + c2 * xyz[5][1]);
282 dxdz(2, 1) = 0.5 * ((a2 - c1) * xyz[0][2] - a2 * xyz[1][2] +
283 a2 * xyz[2][2] + (c1 - a2) * xyz[3][2] -
284 c2 * xyz[4][2] + c2 * xyz[5][2]);
285
286 dxdz(0, 2) = 0.5 * (-b1 * xyz[0][0] - b2 * xyz[3][0] +
287 b1 * xyz[4][0] + b2 * xyz[5][0]);
288 dxdz(1, 2) = 0.5 * (-b1 * xyz[0][1] - b2 * xyz[3][1] +
289 b1 * xyz[4][1] + b2 * xyz[5][1]);
290 dxdz(2, 2) = 0.5 * (-b1 * xyz[0][2] - b2 * xyz[3][2] +
291 b1 * xyz[4][2] + b2 * xyz[5][2]);
292
293 dxdz.Invert();
294 ret.push_back(dxdz);
295 }
296 }
297 }
298 }
299 else if (geom->GetShapeType() == LibUtilities::eHexahedron)
300 {
301 vector<Array<OneD, NekDouble>> xyz;
302 for (int i = 0; i < geom->GetNumVerts(); i++)
303 {
305 SpatialDomains::PointGeomSharedPtr p = geom->GetVertex(i);
306 p->GetCoords(loc);
307 xyz.push_back(loc);
308 }
309
311 Array<OneD, NekDouble> eta1 = b[0]->GetZ();
312 Array<OneD, NekDouble> eta2 = b[1]->GetZ();
313 Array<OneD, NekDouble> eta3 = b[2]->GetZ();
314
315 for (int k = 0; k < b[2]->GetNumPoints(); k++)
316 {
317 for (int j = 0; j < b[1]->GetNumPoints(); j++)
318 {
319 for (int i = 0; i < b[0]->GetNumPoints(); i++)
320 {
321 NekDouble a1 = 0.5 * (1 - eta1[i]);
322 NekDouble a2 = 0.5 * (1 + eta1[i]);
323 NekDouble b1 = 0.5 * (1 - eta2[j]),
324 b2 = 0.5 * (1 + eta2[j]);
325 NekDouble c1 = 0.5 * (1 - eta3[k]),
326 c2 = 0.5 * (1 + eta3[k]);
327
328 DNekMat dxdz(3, 3, 1.0, eFULL);
329
330 dxdz(0, 0) =
331 -0.5 * b1 * c1 * xyz[0][0] + 0.5 * b1 * c1 * xyz[1][0] +
332 0.5 * b2 * c1 * xyz[2][0] - 0.5 * b2 * c1 * xyz[3][0] -
333 0.5 * b1 * c2 * xyz[5][0] + 0.5 * b1 * c2 * xyz[5][0] +
334 0.5 * b2 * c2 * xyz[6][0] - 0.5 * b2 * c2 * xyz[7][0];
335 dxdz(1, 0) =
336 -0.5 * b1 * c1 * xyz[0][1] + 0.5 * b1 * c1 * xyz[1][1] +
337 0.5 * b2 * c1 * xyz[2][1] - 0.5 * b2 * c1 * xyz[3][1] -
338 0.5 * b1 * c2 * xyz[5][1] + 0.5 * b1 * c2 * xyz[5][1] +
339 0.5 * b2 * c2 * xyz[6][1] - 0.5 * b2 * c2 * xyz[7][1];
340 dxdz(2, 0) =
341 -0.5 * b1 * c1 * xyz[0][2] + 0.5 * b1 * c1 * xyz[1][2] +
342 0.5 * b2 * c1 * xyz[2][2] - 0.5 * b2 * c1 * xyz[3][2] -
343 0.5 * b1 * c2 * xyz[5][2] + 0.5 * b1 * c2 * xyz[5][2] +
344 0.5 * b2 * c2 * xyz[6][2] - 0.5 * b2 * c2 * xyz[7][2];
345
346 dxdz(0, 1) =
347 -0.5 * a1 * c1 * xyz[0][0] - 0.5 * a2 * c1 * xyz[1][0] +
348 0.5 * a2 * c1 * xyz[2][0] + 0.5 * a1 * c1 * xyz[3][0] -
349 0.5 * a1 * c2 * xyz[5][0] - 0.5 * a2 * c2 * xyz[5][0] +
350 0.5 * a2 * c2 * xyz[6][0] + 0.5 * a1 * c2 * xyz[7][0];
351 dxdz(1, 1) =
352 -0.5 * a1 * c1 * xyz[0][1] - 0.5 * a2 * c1 * xyz[1][1] +
353 0.5 * a2 * c1 * xyz[2][1] + 0.5 * a1 * c1 * xyz[3][1] -
354 0.5 * a1 * c2 * xyz[5][1] - 0.5 * a2 * c2 * xyz[5][1] +
355 0.5 * a2 * c2 * xyz[6][1] + 0.5 * a1 * c2 * xyz[7][1];
356 dxdz(2, 1) =
357 -0.5 * a1 * c1 * xyz[0][2] - 0.5 * a2 * c1 * xyz[1][2] +
358 0.5 * a2 * c1 * xyz[2][2] + 0.5 * a1 * c1 * xyz[3][2] -
359 0.5 * a1 * c2 * xyz[5][2] - 0.5 * a2 * c2 * xyz[5][2] +
360 0.5 * a2 * c2 * xyz[6][2] + 0.5 * a1 * c2 * xyz[7][2];
361
362 dxdz(0, 0) =
363 -0.5 * b1 * a1 * xyz[0][0] - 0.5 * b1 * a2 * xyz[1][0] -
364 0.5 * b2 * a2 * xyz[2][0] - 0.5 * b2 * a1 * xyz[3][0] +
365 0.5 * b1 * a1 * xyz[5][0] + 0.5 * b1 * a2 * xyz[5][0] +
366 0.5 * b2 * a2 * xyz[6][0] + 0.5 * b2 * a1 * xyz[7][0];
367 dxdz(1, 0) =
368 -0.5 * b1 * a1 * xyz[0][1] - 0.5 * b1 * a2 * xyz[1][1] -
369 0.5 * b2 * a2 * xyz[2][1] - 0.5 * b2 * a1 * xyz[3][1] +
370 0.5 * b1 * a1 * xyz[5][1] + 0.5 * b1 * a2 * xyz[5][1] +
371 0.5 * b2 * a2 * xyz[6][1] + 0.5 * b2 * a1 * xyz[7][1];
372 dxdz(2, 0) =
373 -0.5 * b1 * a1 * xyz[0][2] - 0.5 * b1 * a2 * xyz[1][2] -
374 0.5 * b2 * a2 * xyz[2][2] - 0.5 * b2 * a1 * xyz[3][2] +
375 0.5 * b1 * a1 * xyz[5][2] + 0.5 * b1 * a2 * xyz[5][2] +
376 0.5 * b2 * a2 * xyz[6][2] + 0.5 * b2 * a1 * xyz[7][2];
377
378 dxdz.Invert();
379 ret.push_back(dxdz);
380 }
381 }
382 }
383 }
384 else
385 {
386 ASSERTL0(false, "not coded");
387 }
388
389 return ret;
390}
391
394{
395 SpatialDomains::GeometrySharedPtr geom = e->GetGeom();
396 StdRegions::StdExpansionSharedPtr chi = e->GetGeom()->GetXmap();
397 LibUtilities::PointsKeyVector p = chi->GetPointsKeys();
398 LibUtilities::PointsKeyVector pElem = e->GetPointsKeys();
399 SpatialDomains::GeomFactorsSharedPtr gfac = geom->GetGeomFactors();
400 const int expDim = chi->GetNumBases();
401 int nElemPts = 1;
402
403 vector<LibUtilities::BasisKey> basisKeys;
404 bool needsInterp = false;
405
406 for (int i = 0; i < expDim; ++i)
407 {
408 nElemPts *= pElem[i].GetNumPoints();
409 needsInterp =
410 needsInterp || pElem[i].GetNumPoints() < p[i].GetNumPoints() - 1;
411 }
412
413 if (needsInterp)
414 {
415 stringstream err;
416 err << "Interpolating from higher order geometry to lower order in "
417 << "element " << geom->GetGlobalID();
418 NEKERROR(ErrorUtil::ewarning, err.str());
419 }
420
421 for (int i = 0; i < expDim; ++i)
422 {
423 basisKeys.push_back(
424 needsInterp
425 ? chi->GetBasis(i)->GetBasisKey()
426 : LibUtilities::BasisKey(chi->GetBasisType(i),
427 chi->GetBasisNumModes(i), pElem[i]));
428 }
429
431 switch (chi->DetShapeType())
432 {
435 basisKeys[0], basisKeys[1]);
436 break;
439 basisKeys[0], basisKeys[1]);
440 break;
443 basisKeys[0], basisKeys[1], basisKeys[2]);
444 break;
447 basisKeys[0], basisKeys[1], basisKeys[2]);
448 break;
451 basisKeys[0], basisKeys[1], basisKeys[2]);
452 break;
453 default:
454 ASSERTL0(false, "nope");
455 }
456
457 SpatialDomains::DerivStorage deriv = gfac->GetDeriv(pElem);
458
459 const int pts = deriv[0][0].size();
460 const int nq = chiMod->GetTotPoints();
461
462 ASSERTL0(pts == nq, "what");
463
464 vector<DNekMat> i2rm = MappingIdealToRef(geom, chiMod);
466
467 for (int k = 0; k < pts; ++k)
468 {
469 DNekMat jac(expDim, expDim, 0.0, eFULL);
470 DNekMat jacIdeal(expDim, expDim, 0.0, eFULL);
471
472 for (int i = 0; i < expDim; ++i)
473 {
474 for (int j = 0; j < expDim; ++j)
475 {
476 jac(j, i) = deriv[i][j][k];
477 }
478 }
479
480 jacIdeal = jac * i2rm[k];
481 NekDouble jacDet = 1.0;
482
483 if (expDim == 2)
484 {
485 jacDet = jacIdeal(0, 0) * jacIdeal(1, 1) -
486 jacIdeal(0, 1) * jacIdeal(1, 0);
487 }
488 else if (expDim == 3)
489 {
490 jacDet = jacIdeal(0, 0) * (jacIdeal(1, 1) * jacIdeal(2, 2) -
491 jacIdeal(2, 1) * jacIdeal(1, 2)) -
492 jacIdeal(0, 1) * (jacIdeal(1, 0) * jacIdeal(2, 2) -
493 jacIdeal(2, 0) * jacIdeal(1, 2)) +
494 jacIdeal(0, 2) * (jacIdeal(1, 0) * jacIdeal(2, 1) -
495 jacIdeal(2, 0) * jacIdeal(1, 1));
496 }
497 else
498 {
499 NEKERROR(ErrorUtil::efatal, "invalid expansion dimension.");
500 }
501
502 if (s)
503 {
504 eta[k] = jacDet;
505 }
506 else
507 {
508 NekDouble frob = 0.0;
509
510 for (int i = 0; i < expDim; ++i)
511 {
512 for (int j = 0; j < expDim; ++j)
513 {
514 frob += jacIdeal(i, j) * jacIdeal(i, j);
515 }
516 }
517
518 NekDouble sigma = 0.5 * (jacDet + sqrt(jacDet * jacDet));
519 eta[k] = expDim * pow(sigma, 2.0 / expDim) / frob;
520 }
521 }
522
523 if (s)
524 {
525 NekDouble mx = -1.0 * numeric_limits<double>::max();
526 NekDouble mn = numeric_limits<double>::max();
527 for (int k = 0; k < pts; k++)
528 {
529 mx = max(mx, eta[k]);
530 mn = min(mn, eta[k]);
531 }
532 for (int k = 0; k < pts; k++)
533 {
534 eta[k] = mn / mx;
535 }
536 }
537
538 // Project onto output stuff
539 if (needsInterp && pts != 1)
540 {
541 Array<OneD, NekDouble> tmp(nElemPts);
542
543 if (expDim == 2)
544 {
545 LibUtilities::Interp2D(p[0], p[1], eta, pElem[0], pElem[1], tmp);
546 }
547 else if (expDim == 3)
548 {
549 LibUtilities::Interp3D(p[0], p[1], p[2], eta, pElem[0], pElem[1],
550 pElem[2], tmp);
551 }
552 else
553 {
554 ASSERTL0(false, "mesh dim makes no sense");
555 }
556
557 eta = tmp;
558 }
559
560 if (pts == 1)
561 {
562 Vmath::Fill(nq - 1, eta[0], &eta[1], 1);
563 }
564
565 return eta;
566}
567} // namespace FieldUtils
568} // namespace Nektar
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:215
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
Definition: ErrorUtil.hpp:209
FieldSharedPtr m_f
Field object.
Definition: Module.h:234
std::map< std::string, ConfigOption > m_config
List of configuration values.
Definition: Module.h:263
Abstract base class for processing modules.
Definition: Module.h:292
Array< OneD, NekDouble > GetQ(LocalRegions::ExpansionSharedPtr e, bool s)
virtual 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:47
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
Definition: NekFactory.hpp:198
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:991
std::pair< ModuleType, std::string > ModuleKey
Definition: Module.h:317
vector< DNekMat > MappingIdealToRef(SpatialDomains::GeometrySharedPtr geom, StdRegions::StdExpansionSharedPtr chi)
ModuleFactory & GetModuleFactory()
Definition: Module.cpp:49
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:164
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:103
std::vector< PointsKey > PointsKeyVector
Definition: Points.h:236
std::shared_ptr< Expansion > ExpansionSharedPtr
Definition: Expansion.h:68
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
Definition: GeomFactors.h:62
std::shared_ptr< PointGeom > PointGeomSharedPtr
Definition: Geometry.h:60
std::shared_ptr< Geometry > GeometrySharedPtr
Definition: Geometry.h:54
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
std::vector< double > z(NPUPPER)
std::vector< double > q(NPUPPER *NPUPPER)
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:2
double NekDouble
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition: Vmath.cpp:43
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1191
scalarT< T > sqrt(scalarT< T > in)
Definition: scalar.hpp:294
Represents a command-line configuration option.
Definition: Module.h:131