68 Array<OneD, MultiRegions::ExpListSharedPtr > &pFields,
69 const Array<
OneD, Array<OneD, NekDouble> > &pV,
70 const Array<OneD, const NekDouble> &pU,
71 Array<OneD, NekDouble> &pOutarray,
72 int pVelocityComponent,
74 Array<OneD, NekDouble> &pWk)
77 int ndim = pV.num_elements();
81 int nPointsTot = pFields[0]->GetNpoints();
82 Array<OneD, NekDouble> gradV0,gradV1,gradV2, tmp, Up;
84 gradV0 = Array<OneD, NekDouble> (nPointsTot);
85 tmp = Array<OneD, NekDouble> (nPointsTot);
91 pFields[0]->PhysDeriv(pU,gradV0);
92 Vmath::Vmul(nPointsTot,gradV0,1,pV[0],1,pOutarray,1);
94 pFields[0]->PhysDeriv(gradV0,tmp);
95 Vmath::Vadd(nPointsTot,tmp,1,pOutarray,1,pOutarray,1);
96 Vmath::Smul(nPointsTot,0.5,pOutarray,1,pOutarray,1);
99 gradV1 = Array<OneD, NekDouble> (nPointsTot);
100 pFields[0]->PhysDeriv(pU,gradV0,gradV1);
101 Vmath::Vmul (nPointsTot,gradV0,1,pV[0],1,pOutarray,1);
102 Vmath::Vvtvp(nPointsTot,gradV1,1,pV[1],1,pOutarray,1,pOutarray,1);
106 Vmath::Vadd(nPointsTot,tmp,1,pOutarray,1,pOutarray,1);
108 Vmath::Vadd(nPointsTot,tmp,1,pOutarray,1,pOutarray,1);
109 Vmath::Smul(nPointsTot,0.5,pOutarray,1,pOutarray,1);
112 gradV1 = Array<OneD, NekDouble> (nPointsTot);
113 gradV2 = Array<OneD, NekDouble> (nPointsTot);
115 pFields[0]->PhysDeriv(pU,gradV0,gradV1,gradV2);
121 pFields[0]->DealiasedProd(pV[0],gradV0,gradV0,
m_CoeffState);
122 pFields[0]->DealiasedProd(pV[1],gradV1,gradV1,
m_CoeffState);
123 pFields[0]->DealiasedProd(pV[2],gradV2,gradV2,
m_CoeffState);
124 Vmath::Vadd(nPointsTot,gradV0,1,gradV1,1,pOutarray,1);
125 Vmath::Vadd(nPointsTot,gradV2,1,pOutarray,1,pOutarray,1);
126 pFields[0]->DealiasedProd(pU,pV[0],gradV0,
m_CoeffState);
127 pFields[0]->DealiasedProd(pU,pV[1],gradV1,
m_CoeffState);
128 pFields[0]->DealiasedProd(pU,pV[2],gradV2,
m_CoeffState);
130 Vmath::Vadd(nPointsTot,tmp,1,pOutarray,1,pOutarray,1);
132 Vmath::Vadd(nPointsTot,tmp,1,pOutarray,1,pOutarray,1);
134 Vmath::Vadd(nPointsTot,tmp,1,pOutarray,1,pOutarray,1);
135 Vmath::Smul(nPointsTot,0.5,pOutarray,1,pOutarray,1);
139 Up = Array<OneD, NekDouble> (nPointsTot);
142 pFields[0]->HomogeneousBwdTrans(gradV0,tmp);
144 pFields[0]->HomogeneousBwdTrans(gradV1,tmp);
145 Vmath::Vvtvp(nPointsTot,tmp,1,pV[1],1,pOutarray,1,pOutarray,1);
146 pFields[0]->HomogeneousBwdTrans(gradV2,tmp);
147 Vmath::Vvtvp(nPointsTot,tmp,1,pV[2],1,pOutarray,1,pOutarray,1);
149 pFields[0]->HomogeneousBwdTrans(pU,Up);
154 pFields[0]->SetWaveSpace(
false);
156 Vmath::Vadd(nPointsTot,tmp,1,pOutarray,1,pOutarray,1);
158 Vmath::Vadd(nPointsTot,tmp,1,pOutarray,1,pOutarray,1);
160 Vmath::Vadd(nPointsTot,tmp,1,pOutarray,1,pOutarray,1);
161 pFields[0]->SetWaveSpace(
true);
164 pFields[0]->HomogeneousFwdTrans(tmp,pOutarray);
168 Vmath::Vmul(nPointsTot,gradV0,1,pV[0],1,pOutarray,1);
169 Vmath::Vvtvp(nPointsTot,gradV1,1,pV[1],1,pOutarray,1,pOutarray,1);
170 Vmath::Vvtvp(nPointsTot,gradV2,1,pV[2],1,pOutarray,1,pOutarray,1);
175 Vmath::Vadd(nPointsTot,tmp,1,pOutarray,1,pOutarray,1);
177 Vmath::Vadd(nPointsTot,tmp,1,pOutarray,1,pOutarray,1);
179 Vmath::Vadd(nPointsTot,tmp,1,pOutarray,1,pOutarray,1);
180 Vmath::Smul(nPointsTot,0.5,pOutarray,1,pOutarray,1);
184 ASSERTL0(
false,
"Dealiasing is not allowed in combination "
185 "with the Skew-Symmetric advection form for "
186 "efficiency reasons.");
190 ASSERTL0(
false,
"dimension unknown");