45 "Image warping system.");
63 m_velocity[i] = Array<OneD, NekDouble> (nq,0.0);
87 ASSERTL0(
false,
"Implicit unsteady Advection not set up.");
97 const Array<
OneD,
const Array<OneD,NekDouble> > &inarray,
98 Array<
OneD, Array<OneD,NekDouble> > &outarray,
103 int ncoeffs = inarray[0].num_elements();
110 "CG not implemented yet.");
113 Array<OneD, NekDouble> alloc(3*npoints);
114 Array<OneD, NekDouble> dIdx1(alloc);
115 Array<OneD, NekDouble> dIdx2(alloc+npoints);
116 Array<OneD, NekDouble> dIdx3(alloc+2*npoints);
117 Array<OneD, NekDouble> tmp;
118 Array<OneD, Array<OneD, NekDouble> > WeakAdv(2);
121 m_fields[0]->PhysDeriv(inarray[0], dIdx1, dIdx2);
129 for (i = 0; i < 2; ++i)
131 Vmath::Vmul(npoints, &alloc[i*npoints], 1, inarray[1].
get(), 1,
132 m_fields[i+2]->UpdatePhys().
get(), 1);
134 m_fields[i+2]->UpdatePhys().
get(), 1);
143 WeakAdv[0] = Array<OneD, NekDouble>(2*ncoeffs);
144 WeakAdv[1] = WeakAdv[0]+ncoeffs;
156 dIdx2.get(), 1, inarray[0].get(), 1,
160 Array<OneD, NekDouble> tmp2(ncoeffs);
161 m_fields[0]->IProductWRTBase(dIdx1, tmp2);
165 Vmath::Vsub(npoints, WeakAdv[0], 1, tmp2, 1, WeakAdv[0], 1);
169 for(i = 0; i < 2; ++i)
171 m_fields[i]->MultiplyByElmtInvMass(WeakAdv[i], WeakAdv[i]);
172 m_fields[i]->BwdTrans(WeakAdv[i],outarray[i]);
183 const Array<OneD, NekDouble> >&inarray,
184 Array<
OneD, Array<OneD, NekDouble> >&outarray,
188 int nvariables = inarray.num_elements();
198 for(i = 0; i < nvariables; ++i)
205 ASSERTL0(
false,
"Unknown projection scheme");
213 Array<
OneD, Array<OneD, NekDouble> > &physfield,
214 Array<
OneD, Array<OneD, NekDouble> > &flux)
216 for(
int j = 0; j < flux.num_elements(); ++j)
224 Array<
OneD, Array<OneD, NekDouble> > &physfield,
225 Array<
OneD, Array<OneD, NekDouble> > &numflux)
232 Array<OneD, NekDouble > Fwd(nTraceNumPoints);
233 Array<OneD, NekDouble > Bwd(nTraceNumPoints);
234 Array<OneD, NekDouble > Vn (nTraceNumPoints,0.0);
237 for(i = 0; i < nvel; ++i)
243 for(i = 0; i < numflux.num_elements(); ++i)
245 m_fields[i]->GetFwdBwdTracePhys(physfield[i],Fwd,Bwd);
247 m_fields[i]->GetTrace()->Upwind(Vn,Fwd,Bwd,numflux[i]);
249 Vmath::Vmul(nTraceNumPoints,numflux[i],1,Vn,1,numflux[i],1);