Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Mapping of the type X = X(x,y), Y = Y(x,y)
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
37 #include <MultiRegions/ExpList.h>
38 
39 namespace Nektar
40 {
41 namespace GlobalMapping
42 {
43 
44 std::string MappingXYofXY::className =
46  MappingXYofXY::create, "X = X(x,y), Y = Y(x,y)");
47 
48 /**
49  * @class MappingXYofXY
50  * This class implements a mapping defined by the transformation
51  * \f[ \bar{x} = \bar{x}(x,y) \f]
52  * \f[ \bar{y} = \bar{y}(x,y) \f]
53  * \f[ \bar{z} = z \f]
54  * where \f$(\bar{x},\bar{y},\bar{z})\f$ are the Cartesian (physical)
55  * coordinates and \f$(x,y,z)\f$ are the transformed (computational)
56  * coordinates.
57  */
61  : Mapping(pSession, pFields)
62 {
63 }
64 
65 
66 /**
67  *
68  */
71  const TiXmlElement *pMapping)
72 {
73  Mapping::v_InitObject(pFields, pMapping);
74 
75  m_constantJacobian = false;
76 
78  "Mapping X = X(x,y), Y = Y(x,y) needs 2 velocity components.");
79 }
80 
82  const Array<OneD, Array<OneD, NekDouble> > &inarray,
83  Array<OneD, Array<OneD, NekDouble> > &outarray)
84 {
85  int physTot = m_fields[0]->GetTotPoints();
86 
87  // U1 = fx*u1 + fy*u2
88  Vmath::Vmul(physTot, m_GeometricInfo[0], 1, inarray[0], 1,
89  outarray[0], 1);
90  Vmath::Vvtvp(physTot, m_GeometricInfo[1], 1, inarray[1], 1,
91  outarray[0], 1, outarray[0],1);
92 
93  // U2 = gx*u1+gy*u2
94  Vmath::Vmul(physTot, m_GeometricInfo[2], 1, inarray[0], 1,
95  outarray[1], 1);
96  Vmath::Vvtvp(physTot, m_GeometricInfo[3], 1, inarray[1], 1,
97  outarray[1], 1, outarray[1],1);
98 
99  // U3 = u3
100  if (m_nConvectiveFields ==3)
101  {
102  Vmath::Vcopy(physTot, inarray[2], 1, outarray[2], 1);
103  }
104 }
105 
107  const Array<OneD, Array<OneD, NekDouble> > &inarray,
108  Array<OneD, Array<OneD, NekDouble> > &outarray)
109 {
110  int physTot = m_fields[0]->GetTotPoints();
111  Array<OneD, NekDouble> wk(physTot, 0.0);
112 
113  // U1 = [gy*u1-gx*u2]/(fx*gy-gx*fy)
114  Vmath::Vmul(physTot, inarray[1], 1, m_GeometricInfo[2], 1,
115  outarray[0], 1);
116  Vmath::Vvtvm(physTot, inarray[0], 1, m_GeometricInfo[3], 1,
117  outarray[0], 1,
118  outarray[0], 1);
119  Vmath::Vdiv(physTot, outarray[0], 1, m_GeometricInfo[4], 1,
120  outarray[0], 1);
121 
122  // U2 = [fx*u2 - fy*u1]/(fx*gy-gx*fy)
123  Vmath::Vmul(physTot, inarray[0], 1, m_GeometricInfo[1], 1,
124  outarray[1], 1);
125  Vmath::Vvtvm(physTot, inarray[1], 1, m_GeometricInfo[0], 1,
126  outarray[1], 1,
127  outarray[1], 1);
128  Vmath::Vdiv(physTot, outarray[1], 1, m_GeometricInfo[4], 1,
129  outarray[1], 1);
130 
131  // U3 = u3
132  if (m_nConvectiveFields ==3)
133  {
134  Vmath::Vcopy(physTot, inarray[2], 1, outarray[2], 1);
135  }
136 }
137 
139  const Array<OneD, Array<OneD, NekDouble> > &inarray,
140  Array<OneD, Array<OneD, NekDouble> > &outarray)
141 {
142  int physTot = m_fields[0]->GetTotPoints();
143  Array<OneD, NekDouble> wk(physTot, 0.0);
144 
145  // U1 = [gy*u1-fy*u2]/(fx*gy-gx*fy)
146  Vmath::Vmul(physTot, inarray[1], 1, m_GeometricInfo[1], 1,
147  outarray[0], 1);
148  Vmath::Vvtvm(physTot, inarray[0], 1, m_GeometricInfo[3], 1,
149  outarray[0], 1,
150  outarray[0], 1);
151  Vmath::Vdiv(physTot, outarray[0], 1, m_GeometricInfo[4], 1,
152  outarray[0], 1);
153 
154  // U2 = [fx*u2-gx*u1]/(fx*gy-gx*fy)
155  Vmath::Vmul(physTot, inarray[0], 1, m_GeometricInfo[2], 1,
156  outarray[1], 1);
157  Vmath::Vvtvm(physTot, inarray[1], 1, m_GeometricInfo[0], 1,
158  outarray[1], 1,
159  outarray[1], 1);
160  Vmath::Vdiv(physTot, outarray[1], 1, m_GeometricInfo[4], 1,
161  outarray[1], 1);
162 
163  // U3 = u3
164  if (m_nConvectiveFields ==3)
165  {
166  Vmath::Vcopy(physTot, inarray[2], 1, outarray[2], 1);
167  }
168 }
169 
171  const Array<OneD, Array<OneD, NekDouble> > &inarray,
172  Array<OneD, Array<OneD, NekDouble> > &outarray)
173 {
174  int physTot = m_fields[0]->GetTotPoints();
175 
176  // U1 = u1*fx +gx*u2
177  Vmath::Vmul(physTot, m_GeometricInfo[0], 1, inarray[0], 1,
178  outarray[0], 1);
179  Vmath::Vvtvp(physTot, m_GeometricInfo[2], 1, inarray[1], 1,
180  outarray[0], 1, outarray[0],1);
181 
182  // U2 = fy*u1 + gy*u2
183  Vmath::Vmul(physTot, m_GeometricInfo[1], 1, inarray[0], 1,
184  outarray[1], 1);
185  Vmath::Vvtvp(physTot, m_GeometricInfo[3], 1, inarray[1], 1,
186  outarray[1], 1, outarray[1],1);
187 
188  // U3 = u3
189  if (m_nConvectiveFields ==3)
190  {
191  Vmath::Vcopy(physTot, inarray[2], 1, outarray[2], 1);
192  }
193 }
194 
196  Array<OneD, NekDouble> &outarray)
197 {
198  int physTot = m_fields[0]->GetTotPoints();
199  Vmath::Vabs(physTot, m_GeometricInfo[4], 1, outarray, 1);
200 }
201 
203  Array<OneD, Array<OneD, NekDouble> > &outarray)
204 {
205  int physTot = m_fields[0]->GetTotPoints();
206  int nvel = m_nConvectiveFields;
207 
208  for (int i=0; i<nvel*nvel; i++)
209  {
210  outarray[i] = Array<OneD, NekDouble> (physTot, 0.0);
211  }
212 
213  // g_{1,1} = m_metricTensor[0]
214  Vmath::Vcopy(physTot, m_metricTensor[0], 1, outarray[0*nvel+0], 1);
215 
216  // g_{2,2} = m_metricTensor[1]
217  Vmath::Vcopy(physTot, m_metricTensor[1], 1, outarray[1*nvel+1], 1);
218 
219  // g_{1,2}=g{2,1} = m_metricTensor[2]
220  Vmath::Vcopy(physTot, m_metricTensor[2], 1, outarray[0*nvel+1], 1);
221  Vmath::Vcopy(physTot, m_metricTensor[2], 1, outarray[1*nvel+0], 1);
222 
223  // g_{3,3} = 1
224  if (m_nConvectiveFields ==3)
225  {
226  Vmath::Sadd(physTot, 1.0, outarray[2*nvel+2], 1,
227  outarray[2*nvel+2], 1);
228  }
229 }
230 
232  Array<OneD, Array<OneD, NekDouble> > &outarray)
233 {
234  int physTot = m_fields[0]->GetTotPoints();
235  int nvel = m_nConvectiveFields;
236 
237  for (int i=0; i<nvel*nvel; i++)
238  {
239  outarray[i] = Array<OneD, NekDouble> (physTot, 0.0);
240  }
241 
242  // Get Jacobian
243  Array<OneD, NekDouble> Jac(physTot, 0.0);
244  GetJacobian(Jac);
245 
246  // Get Jacobian squared
247  Array<OneD, NekDouble> wk(physTot, 0.0);
248  Vmath::Vmul(physTot, Jac, 1, Jac, 1, wk, 1);
249  // G^{1,1} = m_metricTensor[1]/Jac^2
250  Vmath::Vcopy(physTot, m_metricTensor[1], 1, outarray[0*nvel+0], 1);
251  Vmath::Vdiv(physTot, outarray[0*nvel+0], 1, wk,1,
252  outarray[0*nvel+0], 1);
253 
254  // G^{2,2} = m_metricTensor[0]/Jac^2
255  Vmath::Vcopy(physTot, m_metricTensor[0], 1, outarray[1*nvel+1], 1);
256  Vmath::Vdiv(physTot, outarray[1*nvel+1], 1, wk,1,
257  outarray[1*nvel+1], 1);
258 
259  // G^{1,2} = G^{2,1} = -m_metricTensor[2]/Jac^2
260  Vmath::Vcopy(physTot, m_metricTensor[2], 1, outarray[0*nvel+1], 1);
261  Vmath::Neg(physTot, outarray[0*nvel+1], 1);
262  Vmath::Vdiv(physTot, outarray[0*nvel+1], 1, wk,1,
263  outarray[0*nvel+1], 1);
264  Vmath::Vcopy(physTot, outarray[0*nvel+1], 1, outarray[1*nvel+0], 1);
265 
266  // G^{3,3} = 1
267  if (m_nConvectiveFields ==3)
268  {
269  Vmath::Sadd(physTot, 1.0, outarray[2*nvel+2], 1,
270  outarray[2*nvel+2], 1);
271  }
272 }
273 
275  const Array<OneD, Array<OneD, NekDouble> > &inarray,
276  Array<OneD, Array<OneD, NekDouble> > &outarray)
277 {
278  int physTot = m_fields[0]->GetTotPoints();
279  int nvel = m_nConvectiveFields;
280 
281  for (int i = 0; i< nvel; i++)
282  {
283  for (int j = 0; j< nvel; j++)
284  {
285  outarray[i*nvel+j] = Array<OneD, NekDouble>(physTot,0.0);
286  }
287  }
288 
289  // Calculate non-zero terms
290 
291  // outarray(0,0) = U1 * m_Christoffel[0] + U2 * m_Christoffel[1]
292  Vmath::Vmul(physTot,m_Christoffel[0],1,inarray[0],1,
293  outarray[0*nvel+0],1);
294  Vmath::Vvtvp(physTot,m_Christoffel[1],1,inarray[1],1,
295  outarray[0*nvel+0],1,outarray[0*nvel+0],1);
296 
297  // outarray(0,1) = U1 * m_Christoffel[1] + U2 * m_Christoffel[2]
298  Vmath::Vmul(physTot,m_Christoffel[1],1,inarray[0],1,
299  outarray[0*nvel+1],1);
300  Vmath::Vvtvp(physTot,m_Christoffel[2],1,inarray[1],1,
301  outarray[0*nvel+1],1,outarray[0*nvel+1],1);
302 
303  // outarray(1,0) = U1 * m_Christoffel[3] + U2 * m_Christoffel[4]
304  Vmath::Vmul(physTot,m_Christoffel[3],1,inarray[0],1,
305  outarray[1*nvel+0],1);
306  Vmath::Vvtvp(physTot,m_Christoffel[4],1,inarray[1],1,
307  outarray[1*nvel+0],1,outarray[1*nvel+0],1);
308 
309  // outarray(1,1) = U1 * m_Christoffel[4] + U2 * m_Christoffel[5]
310  Vmath::Vmul(physTot,m_Christoffel[4],1,inarray[0],1,
311  outarray[1*nvel+1],1);
312  Vmath::Vvtvp(physTot,m_Christoffel[5],1,inarray[1],1,
313  outarray[1*nvel+1],1,outarray[1*nvel+1],1);
314 
315 }
316 
318  const Array<OneD, Array<OneD, NekDouble> > &inarray,
319  Array<OneD, Array<OneD, NekDouble> > &outarray)
320 {
321  int physTot = m_fields[0]->GetTotPoints();
322  int nvel = m_nConvectiveFields;
323 
324  for (int i = 0; i< nvel; i++)
325  {
326  for (int j = 0; j< nvel; j++)
327  {
328  outarray[i*nvel+j] = Array<OneD, NekDouble>(physTot,0.0);
329  }
330  }
331 
332  // Calculate non-zero terms
333 
334  // outarray(0,0) = U1 * m_Christoffel[0] + U2 * m_Christoffel[3]
335  Vmath::Vmul(physTot,m_Christoffel[0],1,inarray[0],1,
336  outarray[0*nvel+0],1);
337  Vmath::Vvtvp(physTot,m_Christoffel[3],1,inarray[1],1,
338  outarray[0*nvel+0],1,outarray[0*nvel+0],1);
339 
340  // outarray(0,1) = U1 * m_Christoffel[1] + U2 * m_Christoffel[4]
341  Vmath::Vmul(physTot,m_Christoffel[1],1,inarray[0],1,
342  outarray[0*nvel+1],1);
343  Vmath::Vvtvp(physTot,m_Christoffel[4],1,inarray[1],1,
344  outarray[0*nvel+1],1,outarray[0*nvel+1],1);
345 
346  // outarray(1,0) = U1 * m_Christoffel[1] + U2 * m_Christoffel[4]
347  Vmath::Vmul(physTot,m_Christoffel[1],1,inarray[0],1,
348  outarray[1*nvel+0],1);
349  Vmath::Vvtvp(physTot,m_Christoffel[4],1,inarray[1],1,
350  outarray[1*nvel+0],1,outarray[1*nvel+0],1);
351 
352  // outarray(1,1) = U1 * m_Christoffel[2] + U2 * m_Christoffel[5]
353  Vmath::Vmul(physTot,m_Christoffel[2],1,inarray[0],1,
354  outarray[1*nvel+1],1);
355  Vmath::Vvtvp(physTot,m_Christoffel[5],1,inarray[1],1,
356  outarray[1*nvel+1],1,outarray[1*nvel+1],1);
357 }
358 
360 {
361  int phystot = m_fields[0]->GetTotPoints();
362  // Allocation of geometry memory
364  for (int i = 0; i < m_GeometricInfo.num_elements(); i++)
365  {
366  m_GeometricInfo[i] = Array<OneD, NekDouble>(phystot, 0.0);
367  }
368 
369  bool waveSpace = m_fields[0]->GetWaveSpace();
370  m_fields[0]->SetWaveSpace(false);
371 
372  // Calculate derivatives of x transformation --> m_GeometricInfo 0-1
375 
376  // Calculate derivatives of y transformation m_GeometricInfo 2-3
379 
380  // Calculate fx*gy-gx*fy --> m_GeometricInfo4
381  Vmath::Vmul(phystot, m_GeometricInfo[1], 1, m_GeometricInfo[2], 1, m_GeometricInfo[4], 1);
382  Vmath::Vvtvm(phystot, m_GeometricInfo[0], 1, m_GeometricInfo[3], 1,
383  m_GeometricInfo[4], 1,
384  m_GeometricInfo[4], 1);
385  //
388 
389  m_fields[0]->SetWaveSpace(waveSpace);
390 }
391 
393 {
394  int physTot = m_fields[0]->GetTotPoints();
395  // Allocate memory
397  for (int i = 0; i < m_metricTensor.num_elements(); i++)
398  {
399  m_metricTensor[i] = Array<OneD, NekDouble>(physTot, 0.0);
400  }
401  // g_{1,1} = fx^2+gx^2
402  Vmath::Vmul(physTot, m_GeometricInfo[0], 1, m_GeometricInfo[0], 1,
403  m_metricTensor[0], 1);
404  Vmath::Vvtvp(physTot, m_GeometricInfo[2], 1, m_GeometricInfo[2], 1,
405  m_metricTensor[0], 1,
406  m_metricTensor[0], 1);
407  //g_{2,2} = fy^2+gy^2
408  Vmath::Vmul(physTot, m_GeometricInfo[1], 1, m_GeometricInfo[1], 1,
409  m_metricTensor[1], 1);
410  Vmath::Vvtvp(physTot, m_GeometricInfo[3], 1, m_GeometricInfo[3], 1,
411  m_metricTensor[1], 1,
412  m_metricTensor[1], 1);
413  //g_{1,2} = g_{2,1} = fy*fx+gx*gy
414  Vmath::Vmul(physTot, m_GeometricInfo[0], 1, m_GeometricInfo[1], 1,
415  m_metricTensor[2], 1);
416  Vmath::Vvtvp(physTot, m_GeometricInfo[2], 1, m_GeometricInfo[3], 1,
417  m_metricTensor[2], 1,
418  m_metricTensor[2], 1);
419 }
420 
422 {
423  int physTot = m_fields[0]->GetTotPoints();
424  int nvel = m_nConvectiveFields;
425 
426  Array<OneD, Array<OneD, NekDouble> > G(nvel*nvel);
427  Array<OneD, Array<OneD, NekDouble> > G_inv(nvel*nvel);
428  Array<OneD, Array<OneD, NekDouble> > gradG(2*2*2);
431  // Allocate memory
432  for (int i = 0; i < gradG.num_elements(); i++)
433  {
434  gradG[i] = Array<OneD, NekDouble>(physTot, 0.0);
435  tmp[i] = Array<OneD, NekDouble>(physTot, 0.0);
436  }
437  for (int i = 0; i < G.num_elements(); i++)
438  {
439  G[i] = Array<OneD, NekDouble>(physTot, 0.0);
440  G_inv[i] = Array<OneD, NekDouble>(physTot, 0.0);
441  }
442 
443  // Get the metric tensor and its inverse
444  GetMetricTensor(G);
445  GetInvMetricTensor(G_inv);
446 
447  bool waveSpace = m_fields[0]->GetWaveSpace();
448  m_fields[0]->SetWaveSpace(false);
449  //Calculate gradients of g
450  // consider only 2 dimensions, since the 3rd is trivial
451  for (int i = 0; i <2; i++)
452  {
453  for(int j=0; j<2; j++)
454  {
455  for(int k=0; k<2; k++)
456  {
457  m_fields[0]->PhysDeriv(MultiRegions::DirCartesianMap[k],
458  G[i*nvel+j],gradG[i*2*2 + j*2 + k]);
459  }
460  }
461  }
462 
463  // Calculate tmp[p,j,k] = 1/2( gradG[pj,k]+ gradG[pk,j]-gradG[jk,p])
464  for (int p = 0; p <2; p++)
465  {
466  for (int j = 0; j < 2; j++)
467  {
468  for (int k = 0; k < 2; k++)
469  {
470  Vmath::Vadd(physTot, gradG[p*2*2 + j*2 + k], 1,
471  gradG[p*2*2 + k*2 + j], 1,
472  tmp[p*2*2 + j*2 + k], 1);
473  Vmath::Vsub(physTot, tmp[p*2*2 + j*2 + k], 1,
474  gradG[j*2*2 + k*2 + p], 1,
475  tmp[p*2*2 + j*2 + k], 1);
476  Vmath::Smul(physTot, 0.5, tmp[p*2*2 + j*2 + k], 1,
477  tmp[p*2*2 + j*2 + k], 1);
478  }
479  }
480  }
481 
482  // Calculate Christoffel symbols = g^ip tmp[p,j,k]
483  int n=0;
484  for (int i = 0; i <2; i++)
485  {
486  for (int j = 0; j < 2; j++)
487  {
488  for (int k = 0; k <= j; k++)
489  {
490  m_Christoffel[n] = Array<OneD, NekDouble>(physTot, 0.0);
491  for (int p = 0; p < 2; p++)
492  {
493  Vmath::Vvtvp(physTot, G_inv[i*nvel+p], 1,
494  tmp[p*2*2 + j*2 + k], 1,
495  m_Christoffel[n], 1,
496  m_Christoffel[n], 1);
497  }
498  n = n+1;
499  }
500  }
501  }
502 
503  m_fields[0]->SetWaveSpace(waveSpace);
504 }
505 
506 }
507 }
Array< OneD, Array< OneD, NekDouble > > m_GeometricInfo
Array with metric terms of the mapping.
Definition: Mapping.h:415
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:411
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
MappingFactory & GetMappingFactory()
Declaration of the mapping factory singleton.
Definition: Mapping.cpp:49
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:178
Array< OneD, Array< OneD, NekDouble > > m_metricTensor
Definition: MappingXYofXY.h:82
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:428
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:60
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:227
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:155
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
int m_nConvectiveFields
Number of velocity components.
Definition: Mapping.h:417
void Vabs(int n, const T *x, const int incx, T *y, const int incy)
vabs: y = |x|
Definition: Vmath.cpp:410
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:409
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:199
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:73
bool m_constantJacobian
Flag defining if the Jacobian is constant.
Definition: Mapping.h:427
void Neg(int n, T *x, const int incx)
Negate x = -x.
Definition: Vmath.cpp:382
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:301
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:69
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:329
MultiRegions::Direction const DirCartesianMap[]
Definition: ExpList.h:86
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:451
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:83
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
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:285
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:169
GLOBAL_MAPPING_EXPORT void GetInvMetricTensor(Array< OneD, Array< OneD, NekDouble > > &outarray)
Get the inverse of metric tensor .
Definition: Mapping.h:185
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.
Definition: NekFactory.hpp:215