Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PtsField.cpp
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // File: PtsField.cpp
4 //
5 // For more information, please see: http://www.nektar.info/
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2014 Kilian Lackhove
10 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
11 // Department of Aeronautics, Imperial College London (UK), and Scientific
12 // Computing and Imaging Institute, University of Utah (USA).
13 //
14 // License for the specific language governing rights and limitations under
15 // Permission is hereby granted, free of charge, to any person obtaining a
16 // copy of this software and associated documentation files (the "Software"),
17 // to deal in the Software without restriction, including without limitation
18 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
19 // and/or sell copies of the Software, and to permit persons to whom the
20 // Software is furnished to do so, subject to the following conditions:
21 //
22 // The above copyright notice and this permission notice shall be included
23 // in all copies or substantial portions of the Software.
24 //
25 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
26 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
28 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
30 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
31 // DEALINGS IN THE SOFTWARE.
32 //
33 // Description: Pts field
34 //
35 ////////////////////////////////////////////////////////////////////////////////
36 
38 
39 namespace Nektar
40 {
41 namespace LibUtilities
42 {
43 
44 /**
45  * @brief Compute the weights for an interpolation of the field values to physical points
46  *
47  * @param physCoords coordinates of the physical points
48  * @param coord_id id of the coordinate to use for interpolation.
49  *
50  * Set coord_id to -1 to use n-D interpolation for an n-dimensional field.
51  * The most suitable algorithm is chosen automatically.
52  */
54  const Array<OneD, Array<OneD, NekDouble> > &physCoords,
55  short coordId)
56 {
57  ASSERTL1(physCoords.num_elements() >= m_dim,
58  "physCoords is smaller than number of dimesnions");
59 
60  int nPhysPts = physCoords[0].num_elements();
61  int lastProg = 0;
62 
65 
66  // interpolate points and transform
67  for (int i = 0; i < nPhysPts; ++i)
68  {
70  for (int j = 0; j < m_dim; ++j)
71  {
72  physPt[j] = physCoords[j][i];
73  }
74 
75  if (m_dim == 1 || coordId >= 0)
76  {
77  if (m_dim == 1)
78  {
79  coordId = 0;
80  }
81 
82  if (m_pts[0].num_elements() <= 2)
83  {
84  CalcW_Linear(i, physPt[coordId]);
85  }
86  else
87  {
88  CalcW_Quadratic(i, physPt[coordId]);
89  }
90  }
91  else
92  {
93  CalcW_Shepard(i, physPt);
94  }
95 
96  int progress = int(100 * i / nPhysPts);
97  if (m_progressCallback && progress > lastProg)
98  {
99  m_progressCallback(i, nPhysPts);
100  lastProg = progress;
101  }
102  }
103 }
104 
105 
106 /**
107  * @brief Compute weights and perform the interpolate of field values to physical points
108  *
109  * @param physCoords coordinates of the physical points
110  * @param intFields interpolated field at the physical points
111  * @param coord_id id of the coordinate to use for interpolation.
112  *
113  * Set coord_id to -1 to use n-D interpolation for an n-dimensional field.
114  * The most suitable algorithm is chosen automatically.
115  */
117  const Array< OneD, Array< OneD, NekDouble > > &physCoords,
118  Array<OneD, Array<OneD, NekDouble> > &intFields,
119  short int coordId)
120 {
121  CalcWeights(physCoords, coordId);
122  Interpolate(intFields);
123 }
124 
125 
126 /**
127  * @brief Perform the interpolate of field values to physical points
128  *
129  * @param intFields interpolated field at the physical points
130  *
131  * The weights must have already been computed by @CalcWeights or set by
132  * @SetWeights.
133  */
135 {
136  ASSERTL1(m_weights[0].num_elements() == m_neighInds[0].num_elements(),
137  "weights / neighInds mismatch")
138  int nFields = m_fieldNames.size();
139  int nPhysPts = m_weights.num_elements();
140 
141  // interpolate points and transform
142  intFields = Array<OneD, Array<OneD, NekDouble> >(nFields);
143  for (int i = 0; i < nFields; ++i)
144  {
145  intFields[i] = Array<OneD, NekDouble>(nPhysPts);
146 
147  for (int j = 0; j < nPhysPts; ++j)
148  {
149  intFields[i][j] = 0.0;
150 
151  int nPts = m_weights[j].num_elements();
152  for (int k = 0; k < nPts; ++k)
153  {
154  unsigned int nIdx = m_neighInds[j][k];
155  intFields[i][j] += m_weights[j][k] * m_pts[m_dim + i][nIdx];
156  }
157  }
158  }
159 }
160 
161 
162 /**
163  * @brief Set the interpolation weights for an interpolation
164  *
165  * @param weights Interpolation weights for each neighbour.
166  * Structure: m_weights[physPtIdx][neighbourIdx]
167  * @param neighbourInds Indices of the relevant neighbours for each physical point.
168  * Structure: m_neighInds[ptIdx][neighbourIdx]
169  */
172  const Array< OneD, Array< OneD, unsigned int > > &neighbourInds)
173 {
174  ASSERTL0(weights.num_elements() == neighbourInds.num_elements(),
175  "weights and neighbourInds not of same number of physical points")
176 
177  m_weights = weights;
178  m_neighInds = neighbourInds;
179 
180 }
181 
182 /**
183  * @brief Get the interpolation weights and corresponding neighbour indices
184  *
185  * @param weights Interpolation weights for each neighbour.
186  * Structure: m_weights[physPtIdx][neighbourIdx]
187  * @param neighbourInds Indices of the relevant neighbours for each physical point.
188  * Structure: m_neighInds[ptIdx][neighbourIdx]
189  */
192  Array< OneD, Array< OneD, unsigned int > > &neighbourInds) const
193 {
194  weights = m_weights;
195  neighbourInds = m_neighInds;
196 }
197 
198 PtsField::PtsField(const int dim, const Array< OneD, Array< OneD, NekDouble > > &pts):
199  m_dim(dim),
200  m_pts(pts),
201  m_ptsType(ePtsFile)
202 {
203  for (int i = 0; i < GetNFields(); ++i)
204  {
205  m_fieldNames.push_back("NA");
206  }
207 }
208 
209 
210 
211 /**
212  * @brief Set the connectivity data for ePtsTetBlock and ePtsTriBlock
213  *
214  * @param conn Connectivity data
215  * Connectivity data needed for ePtsTetBlock and ePtsTriBlock. For n Blocks with
216  * m elements each, m_ptsConn is a vector of n arrays with 3*m (ePtsTriBlock) or
217  * 4*m (ePtsTetBlock) entries.
218  */
220 {
221  conn = m_ptsConn;
222 }
223 
224 /**
225  * @brief Get the connectivity data for ePtsTetBlock and ePtsTriBlock
226  *
227  * @param conn Connectivity data
228  * Connectivity data needed for ePtsTetBlock and ePtsTriBlock. For n Blocks with
229  * m elements each, m_ptsConn is a vector of n arrays with 3*m (ePtsTriBlock) or
230  * 4*m (ePtsTetBlock) entries.
231  */
233 {
235  "ptsType must be set before connectivity");
236 
237  m_ptsConn = conn;
238 }
239 
240 
241 void PtsField::SetDim(const int ptsDim)
242 {
243  m_dim = ptsDim;
244 }
245 
246 
247 int PtsField::GetDim() const
248 {
249  return m_dim;
250 }
251 
252 
254 {
255  return m_fieldNames.size();
256 }
257 
258 
259 vector<std::string> PtsField::GetFieldNames() const
260 {
261  return m_fieldNames;
262 }
263 
264 
265 std::string PtsField::GetFieldName(const int i) const
266 {
267  return m_fieldNames[i];
268 }
269 
270 
271 void PtsField::SetFieldNames(const vector<std::string> fieldNames)
272 {
273  ASSERTL0(fieldNames.size() == m_pts.num_elements() - m_dim,
274  "Number of given fieldNames does not match the number of stored fields");
275 
276  m_fieldNames = fieldNames;
277 }
278 
279 
281  const string fieldName)
282 {
283  int nTotvars = m_pts.num_elements();
284 
285  ASSERTL1(pts.num_elements() == m_pts[0].num_elements(),
286  "Field size mismatch");
287 
288  // redirect existing pts
289  Array<OneD, Array<OneD, NekDouble> > newpts(nTotvars + 1);
290  for (int i = 0; i < nTotvars; ++i)
291  {
292  newpts[i] = m_pts[i];
293  }
294  newpts[nTotvars] = pts;
295 
296  m_pts = newpts;
297 
298  m_fieldNames.push_back(fieldName);
299 }
300 
301 
303 {
304  return m_pts[0].num_elements();
305 }
306 
307 
308 NekDouble PtsField::GetPointVal(const int fieldInd, const int ptInd) const
309 {
310  return m_pts[fieldInd][ptInd];
311 }
312 
313 
315 {
316  pts = m_pts;
317 }
318 
319 
321 {
322  return m_pts[fieldInd];
323 }
324 
325 
327 {
328  ASSERTL1(pts.num_elements() == m_pts.num_elements(),
329  "Pts field count mismatch");
330 
331  m_pts = pts;
332 }
333 
334 
335 vector<int> PtsField::GetPointsPerEdge() const
336 {
337  return m_nPtsPerEdge;
338 }
339 
340 
341 int PtsField::GetPointsPerEdge(const int i) const
342 {
343  return m_nPtsPerEdge[i];
344 }
345 
346 /**
347  * @brief Set the number of points per edge
348  *
349  * @param nPtsPerEdge Number of points per edge. Empty if the point
350  * data has no specific shape (ePtsLine) or is a block (ePtsTetBlock,
351  * ePtsTriBlock), size=1 for ePtsLine, 2 for ePtsPlane and 3 for ePtsBox
352  */
353 void PtsField::SetPointsPerEdge(const vector< int > nPtsPerEdge)
354 {
356  m_ptsType == ePtsBox,
357  "SetPointsPerEdge only supported for ePtsLine, ePtsPlane and ePtsBox.");
358 
359  m_nPtsPerEdge = nPtsPerEdge;
360 }
361 
362 
364 {
365  return m_ptsType;
366 }
367 
368 
370 {
371  m_ptsType = type;
372 }
373 
374 vector<NekDouble> PtsField::GetBoxSize() const
375 {
376  return m_boxSize;
377 }
378 
379 void PtsField::SetBoxSize(const vector< NekDouble> boxSize)
380 {
381  m_boxSize = boxSize;
382 }
383 
384 
385 
386 
387 /**
388  * @brief Compute interpolation weights for a 1D physical point using linear
389  * interpolation.
390  *
391  * @param physPtIdx The index of the physical point in its storage array
392  * @param coord The coordinate of the physical point
393  */
394 void PtsField::CalcW_Linear(const int physPtIdx, const NekDouble coord)
395 {
396  int npts = m_pts[0].num_elements();
397  int i;
398 
399  int numPts = 2;
400  m_neighInds[physPtIdx] = Array<OneD, unsigned int> (numPts);
401  m_weights[physPtIdx] = Array<OneD, float> (numPts, 0.0);
402 
403  for (i = 0; i < npts - 1; ++i)
404  {
405  if ((m_pts[0][i] <= coord) && (coord <= m_pts[0][i + 1]))
406  {
407  NekDouble pdiff = m_pts[0][i + 1] - m_pts[0][i];
408 
409  m_neighInds[physPtIdx][0] = i;
410  m_neighInds[physPtIdx][1] = i + 1;
411 
412  m_weights[physPtIdx][0] = (m_pts[0][i + 1] - coord) / pdiff;
413  m_weights[physPtIdx][1] = (coord - m_pts[0][i]) / pdiff;
414 
415  break;
416  }
417  }
418  ASSERTL0(i != npts - 1, "Failed to find coordinate " +
419  boost::lexical_cast<string>(coord) +
420  " within provided input points");
421 };
422 
423 
424 /**
425  * @brief Compute interpolation weights for a physical point using a modified
426  * Shepard algorithm.
427  *
428  * @param physPtIdx The index of the physical point in its storage array
429  * @param physPt The coordinates of the physical point
430  *
431  * The algorithm is based on Shepard, D. (1968). A two-dimensional interpolation
432  * function for irregularly-spaced data. Proceedings of the 1968 23rd ACM
433  * National Conference. pp. 517–524.
434  *
435  * In order to save memory, for n dimesnions, only 2^n points are considered.
436  * Contrary to Shepard, we use a fixed number of points with fixed weighting
437  * factors 1/d^n.
438  */
439 void PtsField::CalcW_Shepard(const int physPtIdx,
440  const Array<OneD, NekDouble> &physPt)
441 {
442  // find nearest neighbours
443  vector<PtsPoint> neighbourPts;
444  int numPts = pow(float(2), m_dim);
445  numPts = min(numPts, int(m_pts[0].num_elements() / 2));
446  FindNeighbours(physPt, neighbourPts, numPts);
447 
448  m_neighInds[physPtIdx] = Array<OneD, unsigned int> (numPts);
449  for (int i = 0; i < numPts; i++)
450  {
451  m_neighInds[physPtIdx][i] = neighbourPts.at(i).m_idx;
452  }
453 
454  m_weights[physPtIdx] = Array<OneD, float> (numPts, 0.0);
455 
456  // In case d < kVertexTheSameDouble ( d^2 < kNekSqrtTol), use the exact
457  // point and return
458  for (int i = 0; i < numPts; ++i)
459  {
460  if (neighbourPts[i].m_distSq <= NekConstants::kNekSqrtTol)
461  {
462  m_weights[physPtIdx][i] = 1.0;
463  return;
464  }
465  }
466 
467  NekDouble wSum = 0.0;
468  for (int i = 0; i < numPts; ++i)
469  {
470  m_weights[physPtIdx][i] = 1 / pow(double(neighbourPts[i].m_distSq),
471  double(m_dim / float(2)));
472  wSum += m_weights[physPtIdx][i];
473  }
474 
475  for (int i = 0; i < numPts; ++i)
476  {
477  m_weights[physPtIdx][i] = m_weights[physPtIdx][i] / wSum;
478  }
479 
480  ASSERTL0(Vmath::Nnan(numPts, m_weights[physPtIdx], 1) == 0, "NaN found in weights");
481 
482 }
483 
484 /**
485 * @brief Compute interpolation weights for a 1D physical point using quadratic
486 * interpolation.
487 *
488 * @param physPtIdx The index of the physical point in its storage array
489 * @param coord The coordinate of the physical point
490 */
491 void PtsField::CalcW_Quadratic(const int physPtIdx, const NekDouble coord)
492 {
493  int npts = m_pts[0].num_elements();
494  int i;
495 
496  int numPts = 3;
497  m_neighInds[physPtIdx] = Array<OneD, unsigned int> (numPts);
498  m_weights[physPtIdx] = Array<OneD, float> (numPts, 0.0);
499 
500  for (i = 0; i < npts - 1; ++i)
501  {
502  if ((m_pts[0][i] <= coord) && (coord <= m_pts[0][i + 1]))
503  {
504  NekDouble pdiff = m_pts[0][i + 1] - m_pts[0][i];
505  NekDouble h1, h2, h3;
506 
507  if (i < npts - 2)
508  {
509  // forwards stencil
510  NekDouble pdiff2 = m_pts[0][i + 2] - m_pts[0][i + 1];
511 
512  h1 = (m_pts[0][i + 1] - coord)
513  * (m_pts[0][i + 2] - coord)
514  / (pdiff * (pdiff + pdiff2));
515  h2 = (coord - m_pts[0][i])
516  * (m_pts[0][i + 2] - coord)
517  / (pdiff * pdiff2);
518  h3 = (coord - m_pts[0][i])
519  * (coord - m_pts[0][i + 1])
520  / ((pdiff + pdiff2) * pdiff2);
521 
522  m_neighInds[physPtIdx][0] = i;
523  m_neighInds[physPtIdx][1] = i + 1;
524  m_neighInds[physPtIdx][2] = i + 2;
525  }
526  else
527  {
528  // backwards stencil
529  NekDouble pdiff2 = m_pts[0][i] - m_pts[0][i - 1];
530 
531  h1 = (m_pts[0][i + 1] - coord)
532  * (coord - m_pts[0][i - 1])
533  / (pdiff * pdiff2);
534  h2 = (coord - m_pts[0][i])
535  * (coord - m_pts[0][i - 1])
536  / (pdiff * (pdiff + pdiff2));
537  h3 = (m_pts[0][i] - coord)
538  * (m_pts[0][i + 1] - coord)
539  / ((pdiff + pdiff2) * pdiff);
540 
541  m_neighInds[physPtIdx][0] = i;
542  m_neighInds[physPtIdx][1] = i + 1;
543  m_neighInds[physPtIdx][2] = i - 1;
544  }
545 
546 
547  m_weights[physPtIdx][0] = h1;
548  m_weights[physPtIdx][1] = h2;
549  m_weights[physPtIdx][2] = h3;
550 
551  break;
552  }
553  }
554  ASSERTL0(i != npts - 1, "Failed to find coordinate " +
555  boost::lexical_cast<string>(coord) +
556  " within provided input points");
557 };
558 
559 
560 /**
561  * @brief Compute the square of the euclidean distance between point1 and point2
562  *
563  * @param point1 The first point
564  * @param point2 The second point
565  */
567  const Array< OneD, NekDouble > &point2) const
568 {
569  NekDouble d = 0.0;
570  NekDouble tmp;
571  for (int i = 0; i < point1.num_elements(); i++)
572  {
573  tmp = point1[i] - point2[i];
574  d += tmp * tmp;
575  }
576 
577  return d;
578 }
579 
580 
581 /**
582  * @brief Find nearest neighbours using a brute-force "algorithm".
583  *
584  * @param physPt Coordinates of the physical point its neighbours
585  * we are looking for
586  * @param neighbourPts The points we found
587  * @param numPts The number of points to find
588  *
589  * This iterates over all points, computes the (squared) euclidean distance
590  * and chooses the numPts closest points. Thus, its very expensive and
591  * inefficient.
592  */
594  vector< PtsPoint > &neighbourPts,
595  const unsigned int numPts)
596 {
597  int npts = m_pts[0].num_elements();
598 
599  // generate an initial set of intPts
600  for (int i = 0; i < numPts; ++i)
601  {
602  PtsPoint intPt = PtsPoint(-1, Array<OneD, NekDouble>(m_dim), 1E30);
603  neighbourPts.push_back(intPt);
604  }
605 
606  // generate and iterate over all intPts
607  for (int i = 0; i < npts; ++i)
608  {
610  for (int j = 0; j < m_dim; ++j)
611  {
612  coords[j] = m_pts[j][i];
613  }
614  NekDouble d = DistSq(physPt, coords);
615 
616  if (d < neighbourPts.back().m_distSq)
617  {
618  // create new point struct
619  PtsPoint intPt = PtsPoint(i, coords, d);
620 
621  // add it to list, sort the list and remove last point from the sorted
622  // list
623  neighbourPts.push_back(intPt);
624  sort(neighbourPts.begin(), neighbourPts.end());
625  neighbourPts.pop_back();
626  }
627  }
628 }
629 
630 
631 }
632 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
NekDouble GetPointVal(const int fieldInd, const int ptInd) const
Definition: PtsField.cpp:308
Array< OneD, Array< OneD, unsigned int > > m_neighInds
Indices of the relevant neighbours for each physical point. Structure: m_neighInds[ptIdx][neighbourId...
Definition: PtsField.h:234
void SetDim(const int ptsDim)
Definition: PtsField.cpp:241
Array< OneD, Array< OneD, float > > m_weights
Interpolation weights for each neighbour. Structure: m_weights[physPtIdx][neighbourIdx].
Definition: PtsField.h:231
PtsField(const int dim, const Array< OneD, Array< OneD, NekDouble > > &pts)
Definition: PtsField.cpp:198
void SetFieldNames(const vector< std::string > fieldNames)
Definition: PtsField.cpp:271
void AddField(const Array< OneD, NekDouble > &pts, const std::string fieldName)
Definition: PtsField.cpp:280
vector< Array< OneD, int > > m_ptsConn
Connectivity data needed for ePtsTetBlock and ePtsTriBlock. For n Blocks with m elements each...
Definition: PtsField.h:226
static const NekDouble kNekSqrtTol
vector< std::string > GetFieldNames() const
Definition: PtsField.cpp:259
std::string GetFieldName(const int i) const
Definition: PtsField.cpp:265
void FindNeighbours(const Array< OneD, NekDouble > &physPtCoords, vector< PtsPoint > &neighbourPts, const unsigned int numPts=1)
Find nearest neighbours using a brute-force "algorithm".
Definition: PtsField.cpp:593
vector< int > m_nPtsPerEdge
Number of points per edge. Empty if the point data has no specific shape (ePtsLine) or is a block (eP...
Definition: PtsField.h:222
void SetPointsPerEdge(const vector< int > nPtsPerEdge)
Set the number of points per edge.
Definition: PtsField.cpp:353
void GetWeights(Array< OneD, Array< OneD, float > > &weights, Array< OneD, Array< OneD, unsigned int > > &neighbourInds) const
Get the interpolation weights and corresponding neighbour indices.
Definition: PtsField.cpp:190
Array< OneD, Array< OneD, NekDouble > > m_pts
Point data. For a n-dimensional field, the first m_dim fields are the points spatial coordinates...
Definition: PtsField.h:218
map< pair< int, int >, NekDouble > weights(set< pair< int, int > > springs, Array< OneD, NekDouble > u, Array< OneD, NekDouble > v)
void GetPts(Array< OneD, Array< OneD, NekDouble > > &pts) const
Definition: PtsField.cpp:314
void SetWeights(const Array< OneD, Array< OneD, float > > &weights, const Array< OneD, Array< OneD, unsigned int > > &neighbourInds)
Set the interpolation weights for an interpolation.
Definition: PtsField.cpp:170
void CalcW_Quadratic(const int physPtIdx, const NekDouble coord)
Compute interpolation weights for a 1D physical point using quadratic interpolation.
Definition: PtsField.cpp:491
PtsType m_ptsType
Type of the PtsField.
Definition: PtsField.h:228
PtsType GetPtsType() const
Definition: PtsField.cpp:363
int m_dim
Dimension of the pts field.
Definition: PtsField.h:213
void SetBoxSize(const vector< NekDouble > boxsize)
Definition: PtsField.cpp:379
int Nnan(int n, const T *x, const int incx)
Return number of NaN elements of x.
Definition: Vmath.cpp:878
vector< std::string > m_fieldNames
Names of the field variables.
Definition: PtsField.h:215
static std::string npts
Definition: InputFld.cpp:43
vector< NekDouble > GetBoxSize() const
Definition: PtsField.cpp:374
double NekDouble
NekDouble DistSq(const Array< OneD, NekDouble > &point1, const Array< OneD, NekDouble > &point2) const
Compute the square of the euclidean distance between point1 and point2.
Definition: PtsField.cpp:566
void SetPtsType(const PtsType type)
Definition: PtsField.cpp:369
void CalcW_Shepard(const int physPtIdx, const Array< OneD, NekDouble > &physPtCoords)
Compute interpolation weights for a physical point using a modified Shepard algorithm.
Definition: PtsField.cpp:439
void Interpolate(const Array< OneD, Array< OneD, NekDouble > > &physCoords, Array< OneD, Array< OneD, NekDouble > > &intFields, short int coordId=-1)
Compute weights and perform the interpolate of field values to physical points.
Definition: PtsField.cpp:116
void CalcW_Linear(const int physPtIdx, const NekDouble coord)
Compute interpolation weights for a 1D physical point using linear interpolation. ...
Definition: PtsField.cpp:394
vector< int > GetPointsPerEdge() const
Definition: PtsField.cpp:335
void GetConnectivity(vector< Array< OneD, int > > &conn) const
Set the connectivity data for ePtsTetBlock and ePtsTriBlock.
Definition: PtsField.cpp:219
void SetPts(Array< OneD, Array< OneD, NekDouble > > &pts)
Definition: PtsField.cpp:326
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
vector< NekDouble > m_boxSize
vector of box size xmin,xmax,ymin,ymax,zmin,zmax
Definition: PtsField.h:237
void CalcWeights(const Array< OneD, Array< OneD, NekDouble > > &physCoords, short int coordId=-1)
Compute the weights for an interpolation of the field values to physical points.
Definition: PtsField.cpp:53
boost::function< void(const int position, const int goal)> m_progressCallback
Definition: PtsField.h:239
void SetConnectivity(const vector< Array< OneD, int > > &conn)
Get the connectivity data for ePtsTetBlock and ePtsTriBlock.
Definition: PtsField.cpp:232