Nektar++
MappingXofXZ.cpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: MappingXofXZ.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,z)
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
36 #include <MultiRegions/ExpList.h>
37 
38 namespace Nektar
39 {
40 namespace GlobalMapping
41 {
42 
43 std::string MappingXofXZ::className =
45  MappingXofXZ::create, "X = X(x,z)");
46 
47 /**
48  * @class MappingXofXZ
49  * This class implements a mapping defined by a transformation of the type
50  * \f[ \bar{x} = \bar{x}(x,z) \f]
51  * \f[ \bar{y} = 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,z) needs 3 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 + fz*u3
87  Vmath::Vmul(physTot, m_GeometricInfo[0], 1, inarray[0], 1,
88  outarray[0], 1);
89  Vmath::Vvtvp(physTot, m_GeometricInfo[1], 1, inarray[2], 1,
90  outarray[0], 1, outarray[0],1);
91 
92  // U2 = u2
93  Vmath::Vcopy(physTot, inarray[1], 1, outarray[1], 1);
94 
95  // U3 = u3
96  Vmath::Vcopy(physTot, inarray[2], 1, outarray[2], 1);
97 }
98 
100  const Array<OneD, Array<OneD, NekDouble> > &inarray,
101  Array<OneD, Array<OneD, NekDouble> > &outarray)
102 {
103  int physTot = m_fields[0]->GetTotPoints();
104  Array<OneD, NekDouble> wk(physTot, 0.0);
105 
106  // U1 = u1/fx
107  Vmath::Vdiv(physTot, inarray[0], 1, m_GeometricInfo[0], 1,
108  outarray[0], 1);
109 
110  // U2 = u2
111  Vmath::Vcopy(physTot, inarray[1], 1, outarray[1], 1);
112 
113  // U3 = u3 - fz/fx*u1
114  Vmath::Vdiv(physTot, m_GeometricInfo[1], 1,
115  m_GeometricInfo[0], 1, wk, 1);
116  Vmath::Vmul(physTot, wk, 1, inarray[0], 1, wk, 1);
117  Vmath::Vsub(physTot, inarray[2], 1, wk, 1, outarray[2], 1);
118 }
119 
121  const Array<OneD, Array<OneD, NekDouble> > &inarray,
122  Array<OneD, Array<OneD, NekDouble> > &outarray)
123 {
124  int physTot = m_fields[0]->GetTotPoints();
125  Array<OneD, NekDouble> wk(physTot, 0.0);
126 
127  // U1 = u1/fx - fz/fx * u3
128  Vmath::Vdiv(physTot, inarray[0], 1,
129  m_GeometricInfo[0], 1, outarray[0], 1);
130  Vmath::Vdiv(physTot, m_GeometricInfo[1], 1,
131  m_GeometricInfo[0], 1, wk, 1);
132  Vmath::Vmul(physTot, wk, 1, inarray[2], 1, wk, 1);
133  Vmath::Vsub(physTot, outarray[0], 1, wk, 1, outarray[0], 1);
134 
135  // U2 = u2
136  Vmath::Vcopy(physTot, inarray[1], 1, outarray[1], 1);
137 
138  // U3 = u3
139  Vmath::Vcopy(physTot, inarray[2], 1, outarray[2], 1);
140 }
141 
143  const Array<OneD, Array<OneD, NekDouble> > &inarray,
144  Array<OneD, Array<OneD, NekDouble> > &outarray)
145 {
146  int physTot = m_fields[0]->GetTotPoints();
147 
148  // U1 = u1*fx
149  Vmath::Vmul(physTot, inarray[0], 1, m_GeometricInfo[0], 1,
150  outarray[0], 1);
151 
152  // U2 = u2
153  Vmath::Vcopy(physTot, inarray[1], 1, outarray[1], 1);
154 
155  // U3 = u3 + fz*u1
156  Vmath::Vmul(physTot, m_GeometricInfo[1], 1,
157  inarray[0], 1, outarray[2], 1);
158  Vmath::Vadd(physTot, inarray[2], 1, outarray[2], 1, outarray[2], 1);
159 }
160 
162  Array<OneD, NekDouble> &outarray)
163 {
164  int physTot = m_fields[0]->GetTotPoints();
165  Vmath::Vcopy(physTot, m_GeometricInfo[0], 1, outarray, 1);
166 }
167 
169  const Array<OneD, Array<OneD, NekDouble> > &inarray,
170  Array<OneD, NekDouble> &outarray)
171 {
172  int physTot = m_fields[0]->GetTotPoints();
173 
174  Vmath::Vmul(physTot, m_GeometricInfo[2], 1, inarray[0], 1, outarray, 1);
175  Vmath::Vvtvp(physTot, m_GeometricInfo[3], 1, inarray[2], 1,
176  outarray, 1, outarray,1);
177 }
178 
180  Array<OneD, Array<OneD, NekDouble> > &outarray)
181 {
182  int physTot = m_fields[0]->GetTotPoints();
183  int nvel = m_nConvectiveFields;
184  Array<OneD, NekDouble> wk(physTot, 0.0);
185 
186  for (int i=0; i<nvel*nvel; i++)
187  {
188  outarray[i] = Array<OneD, NekDouble> (physTot, 0.0);
189  }
190  // Fill G^{22} and G^{33} with 1.0
191  for (int i=1; i<nvel; i++)
192  {
193  Vmath::Sadd(physTot, 1.0, outarray[i+nvel*i], 1,
194  outarray[i+nvel*i], 1);
195  }
196 
197  // G_{13} and G_{31} = fz*fx
198  Vmath::Vmul(physTot,m_GeometricInfo[1],1,
199  m_GeometricInfo[0],1,wk,1); // fz*fx
200  Vmath::Vcopy(physTot, wk, 1, outarray[0*nvel+2], 1);
201  Vmath::Vcopy(physTot, wk, 1, outarray[2*nvel+0], 1);
202 
203  // G^{11} = (fx^2)
204  Vmath::Vmul(physTot, m_GeometricInfo[0], 1,
205  m_GeometricInfo[0], 1, outarray[0*nvel+0], 1);
206 
207  // G^{33} = (1+fz^2)
208  Vmath::Vmul(physTot, m_GeometricInfo[1], 1,
209  m_GeometricInfo[1], 1, wk, 1); // fz^2
210  Vmath::Vadd(physTot, wk, 1, outarray[2*nvel+2], 1,
211  outarray[2*nvel+2], 1);
212 }
213 
215  Array<OneD, Array<OneD, NekDouble> > &outarray)
216 {
217  int physTot = m_fields[0]->GetTotPoints();
218  int nvel = m_nConvectiveFields;
219  Array<OneD, NekDouble> wk(physTot, 0.0);
220 
221  for (int i=0; i<nvel*nvel; i++)
222  {
223  outarray[i] = Array<OneD, NekDouble> (physTot, 0.0);
224  }
225  // Fill diagonal with 1.0
226  for (int i=0; i<nvel; i++)
227  {
228  Vmath::Sadd(physTot, 1.0, outarray[i+nvel*i], 1,
229  outarray[i+nvel*i], 1);
230  }
231 
232  // G^{13} and G^{31} = -fz/fx
233  Vmath::Vdiv(physTot,m_GeometricInfo[1],1,
234  m_GeometricInfo[0],1,wk,1); // fz/fx
235  Vmath::Neg(physTot, wk, 1);
236  Vmath::Vcopy(physTot, wk, 1, outarray[0*nvel+2], 1);
237  Vmath::Vcopy(physTot, wk, 1, outarray[2*nvel+0], 1);
238 
239  // G^{11} = (1+fz^2)/(fx^2)
240  Vmath::Vmul(physTot, m_GeometricInfo[1], 1,
241  m_GeometricInfo[1], 1, wk, 1); // fz^2
242  Vmath::Vadd(physTot, wk, 1, outarray[0*nvel+0], 1,
243  outarray[0*nvel+0], 1);
244 
245  Vmath::Vmul(physTot, m_GeometricInfo[0], 1,
246  m_GeometricInfo[0], 1, wk, 1); // fx^2
247  Vmath::Vdiv(physTot, outarray[0*nvel+0], 1, wk,1,
248  outarray[0*nvel+0], 1);
249 }
250 
252  const Array<OneD, Array<OneD, NekDouble> > &inarray,
253  Array<OneD, Array<OneD, NekDouble> > &outarray)
254 {
255  int physTot = m_fields[0]->GetTotPoints();
256  Array<OneD, NekDouble> wk(physTot, 0.0);
257 
258  // out[0] = in[0]*fx^2 + in[2] * fz*fx
259  Vmath::Vmul(physTot,m_GeometricInfo[1],1,m_GeometricInfo[0],1,
260  wk,1); // fz*fx
261  Vmath::Vmul(physTot, wk, 1, inarray[2], 1, outarray[0], 1); //in[2]*fz*fx
262  Vmath::Vmul(physTot, wk, 1, inarray[0], 1, outarray[2], 1); //in[0]*fz*fx
263 
264  Vmath::Vmul(physTot, m_GeometricInfo[0], 1, m_GeometricInfo[0], 1,
265  wk, 1); //fx^2
266  Vmath::Vmul(physTot, wk, 1, inarray[0], 1, wk, 1); //in[0]*fx^2
267 
268  Vmath::Vadd(physTot, outarray[0], 1, wk, 1, outarray[0], 1);
269 
270  // out[1] = in[1]
271  Vmath::Vcopy(physTot, inarray[1], 1, outarray[1], 1);
272 
273  // out[2] = fx*fz*in[0] + (1+fz^2)*in[2]
274  Vmath::Vmul(physTot, m_GeometricInfo[1], 1, m_GeometricInfo[1], 1,
275  wk, 1); // fz^2
276  Vmath::Sadd(physTot, 1.0, wk, 1, wk, 1); // 1+fz^2
277  Vmath::Vmul(physTot, wk, 1, inarray[2],1, wk, 1); // (1+fz^2)*in[2]
278 
279  Vmath::Vadd(physTot, wk, 1, outarray[2],1, outarray[2], 1);
280 }
281 
283  const Array<OneD, Array<OneD, NekDouble> > &inarray,
284  Array<OneD, Array<OneD, NekDouble> > &outarray)
285 {
286  int physTot = m_fields[0]->GetTotPoints();
287  Array<OneD, NekDouble> wk(physTot, 0.0);
288  Array<OneD, NekDouble> wk_2(physTot, 0.0);
289 
290  // out[2] = in[2] - in[0] * fz/fx
291  Vmath::Vdiv(physTot,m_GeometricInfo[1],1,m_GeometricInfo[0],1,
292  wk,1);
293  Vmath::Vmul(physTot, wk, 1, inarray[0], 1, outarray[2], 1);
294  Vmath::Vsub(physTot, inarray[2], 1, outarray[2], 1, outarray[2], 1);
295 
296  // out[0] = in[0]*(1+fz^2)/(fx^2) - in[2] * fz/fx
297  Vmath::Vmul(physTot, wk, 1, inarray[2], 1, outarray[0], 1);
298  Vmath::Vmul(physTot, m_GeometricInfo[1], 1, m_GeometricInfo[1], 1,
299  wk, 1);
300  Vmath::Sadd(physTot, 1.0, wk, 1, wk, 1);
301  Vmath::Vmul(physTot, m_GeometricInfo[0], 1, m_GeometricInfo[0], 1,
302  wk_2, 1);
303  Vmath::Vdiv(physTot, wk, 1, wk_2,1, wk, 1);
304  Vmath::Vmul(physTot, wk, 1, inarray[0],1, wk, 1);
305  Vmath::Vsub(physTot, wk, 1, outarray[0], 1, outarray[0], 1);
306 
307  // out[1] = in[1]
308  Vmath::Vcopy(physTot, inarray[1], 1, outarray[1], 1);
309 
310 
311 }
312 
314  const Array<OneD, Array<OneD, NekDouble> > &inarray,
315  Array<OneD, Array<OneD, NekDouble> > &outarray)
316 {
317  int physTot = m_fields[0]->GetTotPoints();
318  int nvel = m_nConvectiveFields;
319  Array<OneD, NekDouble> wk(physTot, 0.0);
320 
321  for (int i = 0; i< nvel; i++)
322  {
323  for (int j = 0; j< nvel; j++)
324  {
325  outarray[i*nvel+j] = Array<OneD, NekDouble>(physTot,0.0);
326  }
327  }
328 
329  // Calculate non-zero terms
330 
331  // outarray(0,0) = U1 * fxx/fx + U3 * fxz/fx
332  Vmath::Vdiv(physTot,m_GeometricInfo[2],1,m_GeometricInfo[0],1,wk,1);
333  Vmath::Vmul(physTot,wk,1,inarray[0],1,outarray[0*nvel+0],1);
334  Vmath::Vdiv(physTot,m_GeometricInfo[3],1,m_GeometricInfo[0],1,wk,1);
335  Vmath::Vvtvp(physTot,wk,1,inarray[2],1,outarray[0*nvel+0],1,
336  outarray[0*nvel+0],1);
337 
338  // outarray(0,2) = U1 * fxz/fx + U3 * fzz/fx
339  Vmath::Vmul(physTot,wk,1,inarray[0],1,outarray[0*nvel+2],1);
340  Vmath::Vdiv(physTot,m_GeometricInfo[4],1,m_GeometricInfo[0],1,wk,1);
341  Vmath::Vvtvp(physTot,wk,1,inarray[2],1,outarray[0*nvel+2],1,
342  outarray[0*nvel+2],1);
343 
344 }
345 
347  const Array<OneD, Array<OneD, NekDouble> > &inarray,
348  Array<OneD, Array<OneD, NekDouble> > &outarray)
349 {
350  int physTot = m_fields[0]->GetTotPoints();
351  int nvel = m_nConvectiveFields;
352  Array<OneD, NekDouble> wk(physTot, 0.0);
353 
354  for (int i = 0; i< nvel; i++)
355  {
356  for (int j = 0; j< nvel; j++)
357  {
358  outarray[i*nvel+j] = Array<OneD, NekDouble>(physTot,0.0);
359  }
360  }
361 
362  // Calculate non-zero terms
363 
364  // outarray(0,0) = U1 * fxx/fx
365  Vmath::Vdiv(physTot,m_GeometricInfo[2],1,m_GeometricInfo[0],1,wk,1);
366  Vmath::Vmul(physTot,wk,1,inarray[0],1,outarray[0*nvel+0],1);
367 
368  //outarray(0,2) = outarray(2,0) = U1 * fxz/fx
369  Vmath::Vdiv(physTot,m_GeometricInfo[3],1,m_GeometricInfo[0],1,wk,1);
370  Vmath::Vmul(physTot,wk,1,inarray[0],1,outarray[0*nvel+2],1);
371  Vmath::Vcopy(physTot,outarray[0*nvel+2],1,outarray[2*nvel+0],1);
372 
373  // outarray(2,2) = U1 * fzz/fx
374  Vmath::Vdiv(physTot,m_GeometricInfo[4],1,m_GeometricInfo[0],1,wk,1);
375  Vmath::Vmul(physTot,wk,1,inarray[0],1,outarray[2*nvel+2],1);
376 }
377 
379 {
380  int phystot = m_fields[0]->GetTotPoints();
381  // Allocation of geometry memory
383  for (int i = 0; i < m_GeometricInfo.size(); i++)
384  {
385  m_GeometricInfo[i] = Array<OneD, NekDouble>(phystot, 0.0);
386  }
387 
388  bool waveSpace = m_fields[0]->GetWaveSpace();
389  m_fields[0]->SetWaveSpace(false);
390 
391  // Calculate derivatives of transformation
392  m_fields[0]->PhysDeriv(MultiRegions::DirCartesianMap[0],
393  m_coords[0], m_GeometricInfo[0]); //f_x
394  m_fields[0]->PhysDeriv(MultiRegions::DirCartesianMap[2],
395  m_coords[0], m_GeometricInfo[1]); //f_z
396 
397  m_fields[0]->PhysDeriv(MultiRegions::DirCartesianMap[0],
398  m_GeometricInfo[0], m_GeometricInfo[2]); //f_xx
399  m_fields[0]->PhysDeriv(MultiRegions::DirCartesianMap[2],
400  m_GeometricInfo[0], m_GeometricInfo[3]); //f_xz
401  m_fields[0]->PhysDeriv(MultiRegions::DirCartesianMap[2],
402  m_GeometricInfo[1], m_GeometricInfo[4]); //f_zz
403 
404  m_fields[0]->SetWaveSpace(waveSpace);
405 }
406 
407 
408 }
409 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
Base class for mapping to be applied to the coordinate system.
Definition: Mapping.h:69
int m_nConvectiveFields
Number of velocity components.
Definition: Mapping.h:416
Array< OneD, Array< OneD, NekDouble > > m_GeometricInfo
Array with metric terms of the mapping.
Definition: Mapping.h:414
Array< OneD, Array< OneD, NekDouble > > m_coords
Array with the Cartesian coordinates.
Definition: Mapping.h:410
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Definition: Mapping.h:408
virtual GLOBAL_MAPPING_EXPORT void v_InitObject(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const TiXmlElement *pMapping)
Definition: Mapping.cpp:100
bool m_constantJacobian
Flag defining if the Jacobian is constant.
Definition: Mapping.h:426
virtual GLOBAL_MAPPING_EXPORT void v_InitObject(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const TiXmlElement *pMapping)
virtual GLOBAL_MAPPING_EXPORT void v_CovarFromCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
virtual GLOBAL_MAPPING_EXPORT void v_ContravarFromCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
static std::string className
Name of the class.
Definition: MappingXofXZ.h:72
virtual GLOBAL_MAPPING_EXPORT void v_DotGradJacobian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, NekDouble > &outarray)
virtual GLOBAL_MAPPING_EXPORT void v_LowerIndex(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)
virtual GLOBAL_MAPPING_EXPORT void v_ContravarToCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
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_GetMetricTensor(Array< OneD, Array< OneD, NekDouble > > &outarray)
MappingXofXZ(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields)
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: MappingXofXZ.h:59
virtual GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelContravar(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
virtual GLOBAL_MAPPING_EXPORT void v_UpdateGeomInfo()
virtual GLOBAL_MAPPING_EXPORT void v_GetJacobian(Array< OneD, NekDouble > &outarray)
virtual GLOBAL_MAPPING_EXPORT void v_GetInvMetricTensor(Array< OneD, Array< OneD, NekDouble > > &outarray)
virtual GLOBAL_MAPPING_EXPORT void v_RaiseIndex(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
Definition: NekFactory.hpp:200
MappingFactory & GetMappingFactory()
Declaration of the mapping factory singleton.
Definition: Mapping.cpp:52
std::shared_ptr< SessionReader > SessionReaderSharedPtr
MultiRegions::Direction const DirCartesianMap[]
Definition: ExpList.h:90
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:1
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:192
void Neg(int n, T *x, const int incx)
Negate x = -x.
Definition: Vmath.cpp:461
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:513
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:322
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:257
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:341
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1199
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:372