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