Nektar++
MappingXYofXY.cpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: MappingXYofXY.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: Mapping of the type X = X(x,y), Y = Y(x,y)
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
36 #include <MultiRegions/ExpList.h>
37 
38 namespace Nektar
39 {
40 namespace GlobalMapping
41 {
42 
43 std::string MappingXYofXY::className =
45  MappingXYofXY::create, "X = X(x,y), Y = Y(x,y)");
46 
47 /**
48  * @class MappingXYofXY
49  * This class implements a mapping defined by the transformation
50  * \f[ \bar{x} = \bar{x}(x,y) \f]
51  * \f[ \bar{y} = \bar{y}(x,y) \f]
52  * \f[ \bar{z} = z \f]
53  * where \f$(\bar{x},\bar{y},\bar{z})\f$ are the Cartesian (physical)
54  * coordinates and \f$(x,y,z)\f$ are the transformed (computational)
55  * coordinates.
56  */
60  : Mapping(pSession, pFields)
61 {
62 }
63 
64 
65 /**
66  *
67  */
70  const TiXmlElement *pMapping)
71 {
72  Mapping::v_InitObject(pFields, pMapping);
73 
74  m_constantJacobian = false;
75 
77  "Mapping X = X(x,y), Y = Y(x,y) needs 2 velocity components.");
78 }
79 
81  const Array<OneD, Array<OneD, NekDouble> > &inarray,
82  Array<OneD, Array<OneD, NekDouble> > &outarray)
83 {
84  int physTot = m_fields[0]->GetTotPoints();
85 
86  // U1 = fx*u1 + fy*u2
87  Vmath::Vmul(physTot, m_GeometricInfo[0], 1, inarray[0], 1,
88  outarray[0], 1);
89  Vmath::Vvtvp(physTot, m_GeometricInfo[1], 1, inarray[1], 1,
90  outarray[0], 1, outarray[0],1);
91 
92  // U2 = gx*u1+gy*u2
93  Vmath::Vmul(physTot, m_GeometricInfo[2], 1, inarray[0], 1,
94  outarray[1], 1);
95  Vmath::Vvtvp(physTot, m_GeometricInfo[3], 1, inarray[1], 1,
96  outarray[1], 1, outarray[1],1);
97 
98  // U3 = u3
99  if (m_nConvectiveFields ==3)
100  {
101  Vmath::Vcopy(physTot, inarray[2], 1, outarray[2], 1);
102  }
103 }
104 
106  const Array<OneD, Array<OneD, NekDouble> > &inarray,
107  Array<OneD, Array<OneD, NekDouble> > &outarray)
108 {
109  int physTot = m_fields[0]->GetTotPoints();
110  Array<OneD, NekDouble> wk(physTot, 0.0);
111 
112  // U1 = [gy*u1-gx*u2]/(fx*gy-gx*fy)
113  Vmath::Vmul(physTot, inarray[1], 1, m_GeometricInfo[2], 1,
114  outarray[0], 1);
115  Vmath::Vvtvm(physTot, inarray[0], 1, m_GeometricInfo[3], 1,
116  outarray[0], 1,
117  outarray[0], 1);
118  Vmath::Vdiv(physTot, outarray[0], 1, m_GeometricInfo[4], 1,
119  outarray[0], 1);
120 
121  // U2 = [fx*u2 - fy*u1]/(fx*gy-gx*fy)
122  Vmath::Vmul(physTot, inarray[0], 1, m_GeometricInfo[1], 1,
123  outarray[1], 1);
124  Vmath::Vvtvm(physTot, inarray[1], 1, m_GeometricInfo[0], 1,
125  outarray[1], 1,
126  outarray[1], 1);
127  Vmath::Vdiv(physTot, outarray[1], 1, m_GeometricInfo[4], 1,
128  outarray[1], 1);
129 
130  // U3 = u3
131  if (m_nConvectiveFields ==3)
132  {
133  Vmath::Vcopy(physTot, inarray[2], 1, outarray[2], 1);
134  }
135 }
136 
138  const Array<OneD, Array<OneD, NekDouble> > &inarray,
139  Array<OneD, Array<OneD, NekDouble> > &outarray)
140 {
141  int physTot = m_fields[0]->GetTotPoints();
142  Array<OneD, NekDouble> wk(physTot, 0.0);
143 
144  // U1 = [gy*u1-fy*u2]/(fx*gy-gx*fy)
145  Vmath::Vmul(physTot, inarray[1], 1, m_GeometricInfo[1], 1,
146  outarray[0], 1);
147  Vmath::Vvtvm(physTot, inarray[0], 1, m_GeometricInfo[3], 1,
148  outarray[0], 1,
149  outarray[0], 1);
150  Vmath::Vdiv(physTot, outarray[0], 1, m_GeometricInfo[4], 1,
151  outarray[0], 1);
152 
153  // U2 = [fx*u2-gx*u1]/(fx*gy-gx*fy)
154  Vmath::Vmul(physTot, inarray[0], 1, m_GeometricInfo[2], 1,
155  outarray[1], 1);
156  Vmath::Vvtvm(physTot, inarray[1], 1, m_GeometricInfo[0], 1,
157  outarray[1], 1,
158  outarray[1], 1);
159  Vmath::Vdiv(physTot, outarray[1], 1, m_GeometricInfo[4], 1,
160  outarray[1], 1);
161 
162  // U3 = u3
163  if (m_nConvectiveFields ==3)
164  {
165  Vmath::Vcopy(physTot, inarray[2], 1, outarray[2], 1);
166  }
167 }
168 
170  const Array<OneD, Array<OneD, NekDouble> > &inarray,
171  Array<OneD, Array<OneD, NekDouble> > &outarray)
172 {
173  int physTot = m_fields[0]->GetTotPoints();
174 
175  // U1 = u1*fx +gx*u2
176  Vmath::Vmul(physTot, m_GeometricInfo[0], 1, inarray[0], 1,
177  outarray[0], 1);
178  Vmath::Vvtvp(physTot, m_GeometricInfo[2], 1, inarray[1], 1,
179  outarray[0], 1, outarray[0],1);
180 
181  // U2 = fy*u1 + gy*u2
182  Vmath::Vmul(physTot, m_GeometricInfo[1], 1, inarray[0], 1,
183  outarray[1], 1);
184  Vmath::Vvtvp(physTot, m_GeometricInfo[3], 1, inarray[1], 1,
185  outarray[1], 1, outarray[1],1);
186 
187  // U3 = u3
188  if (m_nConvectiveFields ==3)
189  {
190  Vmath::Vcopy(physTot, inarray[2], 1, outarray[2], 1);
191  }
192 }
193 
195  Array<OneD, NekDouble> &outarray)
196 {
197  int physTot = m_fields[0]->GetTotPoints();
198  Vmath::Vabs(physTot, m_GeometricInfo[4], 1, outarray, 1);
199 }
200 
202  Array<OneD, Array<OneD, NekDouble> > &outarray)
203 {
204  int physTot = m_fields[0]->GetTotPoints();
205  int nvel = m_nConvectiveFields;
206 
207  for (int i=0; i<nvel*nvel; i++)
208  {
209  outarray[i] = Array<OneD, NekDouble> (physTot, 0.0);
210  }
211 
212  // g_{1,1} = m_metricTensor[0]
213  Vmath::Vcopy(physTot, m_metricTensor[0], 1, outarray[0*nvel+0], 1);
214 
215  // g_{2,2} = m_metricTensor[1]
216  Vmath::Vcopy(physTot, m_metricTensor[1], 1, outarray[1*nvel+1], 1);
217 
218  // g_{1,2}=g{2,1} = m_metricTensor[2]
219  Vmath::Vcopy(physTot, m_metricTensor[2], 1, outarray[0*nvel+1], 1);
220  Vmath::Vcopy(physTot, m_metricTensor[2], 1, outarray[1*nvel+0], 1);
221 
222  // g_{3,3} = 1
223  if (m_nConvectiveFields ==3)
224  {
225  Vmath::Sadd(physTot, 1.0, outarray[2*nvel+2], 1,
226  outarray[2*nvel+2], 1);
227  }
228 }
229 
231  Array<OneD, Array<OneD, NekDouble> > &outarray)
232 {
233  int physTot = m_fields[0]->GetTotPoints();
234  int nvel = m_nConvectiveFields;
235 
236  for (int i=0; i<nvel*nvel; i++)
237  {
238  outarray[i] = Array<OneD, NekDouble> (physTot, 0.0);
239  }
240 
241  // Get Jacobian
242  Array<OneD, NekDouble> Jac(physTot, 0.0);
243  GetJacobian(Jac);
244 
245  // Get Jacobian squared
246  Array<OneD, NekDouble> wk(physTot, 0.0);
247  Vmath::Vmul(physTot, Jac, 1, Jac, 1, wk, 1);
248  // G^{1,1} = m_metricTensor[1]/Jac^2
249  Vmath::Vcopy(physTot, m_metricTensor[1], 1, outarray[0*nvel+0], 1);
250  Vmath::Vdiv(physTot, outarray[0*nvel+0], 1, wk,1,
251  outarray[0*nvel+0], 1);
252 
253  // G^{2,2} = m_metricTensor[0]/Jac^2
254  Vmath::Vcopy(physTot, m_metricTensor[0], 1, outarray[1*nvel+1], 1);
255  Vmath::Vdiv(physTot, outarray[1*nvel+1], 1, wk,1,
256  outarray[1*nvel+1], 1);
257 
258  // G^{1,2} = G^{2,1} = -m_metricTensor[2]/Jac^2
259  Vmath::Vcopy(physTot, m_metricTensor[2], 1, outarray[0*nvel+1], 1);
260  Vmath::Neg(physTot, outarray[0*nvel+1], 1);
261  Vmath::Vdiv(physTot, outarray[0*nvel+1], 1, wk,1,
262  outarray[0*nvel+1], 1);
263  Vmath::Vcopy(physTot, outarray[0*nvel+1], 1, outarray[1*nvel+0], 1);
264 
265  // G^{3,3} = 1
266  if (m_nConvectiveFields ==3)
267  {
268  Vmath::Sadd(physTot, 1.0, outarray[2*nvel+2], 1,
269  outarray[2*nvel+2], 1);
270  }
271 }
272 
274  const Array<OneD, Array<OneD, NekDouble> > &inarray,
275  Array<OneD, Array<OneD, NekDouble> > &outarray)
276 {
277  int physTot = m_fields[0]->GetTotPoints();
278  int nvel = m_nConvectiveFields;
279 
280  for (int i = 0; i< nvel; i++)
281  {
282  for (int j = 0; j< nvel; j++)
283  {
284  outarray[i*nvel+j] = Array<OneD, NekDouble>(physTot,0.0);
285  }
286  }
287 
288  // Calculate non-zero terms
289 
290  // outarray(0,0) = U1 * m_Christoffel[0] + U2 * m_Christoffel[1]
291  Vmath::Vmul(physTot,m_Christoffel[0],1,inarray[0],1,
292  outarray[0*nvel+0],1);
293  Vmath::Vvtvp(physTot,m_Christoffel[1],1,inarray[1],1,
294  outarray[0*nvel+0],1,outarray[0*nvel+0],1);
295 
296  // outarray(0,1) = U1 * m_Christoffel[1] + U2 * m_Christoffel[2]
297  Vmath::Vmul(physTot,m_Christoffel[1],1,inarray[0],1,
298  outarray[0*nvel+1],1);
299  Vmath::Vvtvp(physTot,m_Christoffel[2],1,inarray[1],1,
300  outarray[0*nvel+1],1,outarray[0*nvel+1],1);
301 
302  // outarray(1,0) = U1 * m_Christoffel[3] + U2 * m_Christoffel[4]
303  Vmath::Vmul(physTot,m_Christoffel[3],1,inarray[0],1,
304  outarray[1*nvel+0],1);
305  Vmath::Vvtvp(physTot,m_Christoffel[4],1,inarray[1],1,
306  outarray[1*nvel+0],1,outarray[1*nvel+0],1);
307 
308  // outarray(1,1) = U1 * m_Christoffel[4] + U2 * m_Christoffel[5]
309  Vmath::Vmul(physTot,m_Christoffel[4],1,inarray[0],1,
310  outarray[1*nvel+1],1);
311  Vmath::Vvtvp(physTot,m_Christoffel[5],1,inarray[1],1,
312  outarray[1*nvel+1],1,outarray[1*nvel+1],1);
313 
314 }
315 
317  const Array<OneD, Array<OneD, NekDouble> > &inarray,
318  Array<OneD, Array<OneD, NekDouble> > &outarray)
319 {
320  int physTot = m_fields[0]->GetTotPoints();
321  int nvel = m_nConvectiveFields;
322 
323  for (int i = 0; i< nvel; i++)
324  {
325  for (int j = 0; j< nvel; j++)
326  {
327  outarray[i*nvel+j] = Array<OneD, NekDouble>(physTot,0.0);
328  }
329  }
330 
331  // Calculate non-zero terms
332 
333  // outarray(0,0) = U1 * m_Christoffel[0] + U2 * m_Christoffel[3]
334  Vmath::Vmul(physTot,m_Christoffel[0],1,inarray[0],1,
335  outarray[0*nvel+0],1);
336  Vmath::Vvtvp(physTot,m_Christoffel[3],1,inarray[1],1,
337  outarray[0*nvel+0],1,outarray[0*nvel+0],1);
338 
339  // outarray(0,1) = U1 * m_Christoffel[1] + U2 * m_Christoffel[4]
340  Vmath::Vmul(physTot,m_Christoffel[1],1,inarray[0],1,
341  outarray[0*nvel+1],1);
342  Vmath::Vvtvp(physTot,m_Christoffel[4],1,inarray[1],1,
343  outarray[0*nvel+1],1,outarray[0*nvel+1],1);
344 
345  // outarray(1,0) = U1 * m_Christoffel[1] + U2 * m_Christoffel[4]
346  Vmath::Vmul(physTot,m_Christoffel[1],1,inarray[0],1,
347  outarray[1*nvel+0],1);
348  Vmath::Vvtvp(physTot,m_Christoffel[4],1,inarray[1],1,
349  outarray[1*nvel+0],1,outarray[1*nvel+0],1);
350 
351  // outarray(1,1) = U1 * m_Christoffel[2] + U2 * m_Christoffel[5]
352  Vmath::Vmul(physTot,m_Christoffel[2],1,inarray[0],1,
353  outarray[1*nvel+1],1);
354  Vmath::Vvtvp(physTot,m_Christoffel[5],1,inarray[1],1,
355  outarray[1*nvel+1],1,outarray[1*nvel+1],1);
356 }
357 
359 {
360  int phystot = m_fields[0]->GetTotPoints();
361  // Allocation of geometry memory
363  for (int i = 0; i < m_GeometricInfo.num_elements(); i++)
364  {
365  m_GeometricInfo[i] = Array<OneD, NekDouble>(phystot, 0.0);
366  }
367 
368  bool waveSpace = m_fields[0]->GetWaveSpace();
369  m_fields[0]->SetWaveSpace(false);
370 
371  // Calculate derivatives of x transformation --> m_GeometricInfo 0-1
374 
375  // Calculate derivatives of y transformation m_GeometricInfo 2-3
378 
379  // Calculate fx*gy-gx*fy --> m_GeometricInfo4
380  Vmath::Vmul(phystot, m_GeometricInfo[1], 1, m_GeometricInfo[2], 1, m_GeometricInfo[4], 1);
381  Vmath::Vvtvm(phystot, m_GeometricInfo[0], 1, m_GeometricInfo[3], 1,
382  m_GeometricInfo[4], 1,
383  m_GeometricInfo[4], 1);
384  //
387 
388  m_fields[0]->SetWaveSpace(waveSpace);
389 }
390 
392 {
393  int physTot = m_fields[0]->GetTotPoints();
394  // Allocate memory
396  for (int i = 0; i < m_metricTensor.num_elements(); i++)
397  {
398  m_metricTensor[i] = Array<OneD, NekDouble>(physTot, 0.0);
399  }
400  // g_{1,1} = fx^2+gx^2
401  Vmath::Vmul(physTot, m_GeometricInfo[0], 1, m_GeometricInfo[0], 1,
402  m_metricTensor[0], 1);
403  Vmath::Vvtvp(physTot, m_GeometricInfo[2], 1, m_GeometricInfo[2], 1,
404  m_metricTensor[0], 1,
405  m_metricTensor[0], 1);
406  //g_{2,2} = fy^2+gy^2
407  Vmath::Vmul(physTot, m_GeometricInfo[1], 1, m_GeometricInfo[1], 1,
408  m_metricTensor[1], 1);
409  Vmath::Vvtvp(physTot, m_GeometricInfo[3], 1, m_GeometricInfo[3], 1,
410  m_metricTensor[1], 1,
411  m_metricTensor[1], 1);
412  //g_{1,2} = g_{2,1} = fy*fx+gx*gy
413  Vmath::Vmul(physTot, m_GeometricInfo[0], 1, m_GeometricInfo[1], 1,
414  m_metricTensor[2], 1);
415  Vmath::Vvtvp(physTot, m_GeometricInfo[2], 1, m_GeometricInfo[3], 1,
416  m_metricTensor[2], 1,
417  m_metricTensor[2], 1);
418 }
419 
421 {
422  int physTot = m_fields[0]->GetTotPoints();
423  int nvel = m_nConvectiveFields;
424 
425  Array<OneD, Array<OneD, NekDouble> > G(nvel*nvel);
426  Array<OneD, Array<OneD, NekDouble> > G_inv(nvel*nvel);
427  Array<OneD, Array<OneD, NekDouble> > gradG(2*2*2);
430  // Allocate memory
431  for (int i = 0; i < gradG.num_elements(); i++)
432  {
433  gradG[i] = Array<OneD, NekDouble>(physTot, 0.0);
434  tmp[i] = Array<OneD, NekDouble>(physTot, 0.0);
435  }
436  for (int i = 0; i < G.num_elements(); i++)
437  {
438  G[i] = Array<OneD, NekDouble>(physTot, 0.0);
439  G_inv[i] = Array<OneD, NekDouble>(physTot, 0.0);
440  }
441 
442  // Get the metric tensor and its inverse
443  GetMetricTensor(G);
444  GetInvMetricTensor(G_inv);
445 
446  bool waveSpace = m_fields[0]->GetWaveSpace();
447  m_fields[0]->SetWaveSpace(false);
448  //Calculate gradients of g
449  // consider only 2 dimensions, since the 3rd is trivial
450  for (int i = 0; i <2; i++)
451  {
452  for(int j=0; j<2; j++)
453  {
454  for(int k=0; k<2; k++)
455  {
456  m_fields[0]->PhysDeriv(MultiRegions::DirCartesianMap[k],
457  G[i*nvel+j],gradG[i*2*2 + j*2 + k]);
458  }
459  }
460  }
461 
462  // Calculate tmp[p,j,k] = 1/2( gradG[pj,k]+ gradG[pk,j]-gradG[jk,p])
463  for (int p = 0; p <2; p++)
464  {
465  for (int j = 0; j < 2; j++)
466  {
467  for (int k = 0; k < 2; k++)
468  {
469  Vmath::Vadd(physTot, gradG[p*2*2 + j*2 + k], 1,
470  gradG[p*2*2 + k*2 + j], 1,
471  tmp[p*2*2 + j*2 + k], 1);
472  Vmath::Vsub(physTot, tmp[p*2*2 + j*2 + k], 1,
473  gradG[j*2*2 + k*2 + p], 1,
474  tmp[p*2*2 + j*2 + k], 1);
475  Vmath::Smul(physTot, 0.5, tmp[p*2*2 + j*2 + k], 1,
476  tmp[p*2*2 + j*2 + k], 1);
477  }
478  }
479  }
480 
481  // Calculate Christoffel symbols = g^ip tmp[p,j,k]
482  int n=0;
483  for (int i = 0; i <2; i++)
484  {
485  for (int j = 0; j < 2; j++)
486  {
487  for (int k = 0; k <= j; k++)
488  {
489  m_Christoffel[n] = Array<OneD, NekDouble>(physTot, 0.0);
490  for (int p = 0; p < 2; p++)
491  {
492  Vmath::Vvtvp(physTot, G_inv[i*nvel+p], 1,
493  tmp[p*2*2 + j*2 + k], 1,
494  m_Christoffel[n], 1,
495  m_Christoffel[n], 1);
496  }
497  n = n+1;
498  }
499  }
500  }
501 
502  m_fields[0]->SetWaveSpace(waveSpace);
503 }
504 
505 }
506 }
Array< OneD, Array< OneD, NekDouble > > m_GeometricInfo
Array with metric terms of the mapping.
Definition: Mapping.h:414
virtual GLOBAL_MAPPING_EXPORT void v_ContravarToCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
Array< OneD, Array< OneD, NekDouble > > m_coords
Array with the Cartesian coordinates.
Definition: Mapping.h:410
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
MappingFactory & GetMappingFactory()
Declaration of the mapping factory singleton.
Definition: Mapping.cpp:52
virtual GLOBAL_MAPPING_EXPORT void v_GetJacobian(Array< OneD, NekDouble > &outarray)
virtual GLOBAL_MAPPING_EXPORT void v_GetMetricTensor(Array< OneD, Array< OneD, NekDouble > > &outarray)
GLOBAL_MAPPING_EXPORT void GetMetricTensor(Array< OneD, Array< OneD, NekDouble > > &outarray)
Get the metric tensor .
Definition: Mapping.h:177
Array< OneD, Array< OneD, NekDouble > > m_metricTensor
Definition: MappingXYofXY.h:81
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
Definition: Vmath.cpp:445
static GLOBAL_MAPPING_EXPORT MappingSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const TiXmlElement *pMapping)
Creates an instance of this class.
Definition: MappingXYofXY.h:59
void Vdiv(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x/y.
Definition: Vmath.cpp:244
virtual GLOBAL_MAPPING_EXPORT void v_ContravarFromCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
GLOBAL_MAPPING_EXPORT void GetJacobian(Array< OneD, NekDouble > &outarray)
Get the Jacobian of the transformation.
Definition: Mapping.h:154
int m_nConvectiveFields
Number of velocity components.
Definition: Mapping.h:416
void Vabs(int n, const T *x, const int incx, T *y, const int incy)
vabs: y = |x|
Definition: Vmath.cpp:427
MappingXYofXY(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields)
virtual GLOBAL_MAPPING_EXPORT void v_CovarFromCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Definition: Mapping.h:408
virtual GLOBAL_MAPPING_EXPORT void v_GetInvMetricTensor(Array< OneD, Array< OneD, NekDouble > > &outarray)
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
Definition: Vmath.cpp:216
virtual GLOBAL_MAPPING_EXPORT void v_InitObject(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const TiXmlElement *pMapping)
Definition: Mapping.cpp:100
static std::string className
Name of the class.
Definition: MappingXYofXY.h:72
bool m_constantJacobian
Flag defining if the Jacobian is constant.
Definition: Mapping.h:426
void Neg(int n, T *x, const int incx)
Negate x = -x.
Definition: Vmath.cpp:399
virtual GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelCovar(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
virtual GLOBAL_MAPPING_EXPORT void v_CovarToCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
void Sadd(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Add vector y = alpha + x.
Definition: Vmath.cpp:318
virtual GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelContravar(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
Base class for mapping to be applied to the coordinate system.
Definition: Mapping.h:68
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
Definition: Vmath.cpp:346
MultiRegions::Direction const DirCartesianMap[]
Definition: ExpList.h:88
void Vvtvm(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvm (vector times vector plus vector): z = w*x - y
Definition: Vmath.cpp:468
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
Definition: NekFactory.hpp:199
virtual GLOBAL_MAPPING_EXPORT void v_InitObject(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const TiXmlElement *pMapping)
Array< OneD, Array< OneD, NekDouble > > m_Christoffel
Definition: MappingXYofXY.h:82
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064
std::shared_ptr< SessionReader > SessionReaderSharedPtr
virtual GLOBAL_MAPPING_EXPORT void v_UpdateGeomInfo()
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
Definition: Vmath.cpp:302
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:186
GLOBAL_MAPPING_EXPORT void GetInvMetricTensor(Array< OneD, Array< OneD, NekDouble > > &outarray)
Get the inverse of metric tensor .
Definition: Mapping.h:184