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