40 #include <boost/algorithm/string.hpp>
46 "VelocityCorrectionScheme",
76 ASSERTL0(
false,
"Need to set up pressure field definition");
97 ASSERTL0(m_nConvectiveFields > 2,
"Expect to have three velcoity fields with homogenous expansion");
106 Array<OneD, unsigned int> planes;
109 int num_planes = planes.num_elements();
110 Array<OneD, NekDouble> SVV(num_planes,0.0);
112 int kmodes =
m_fields[0]->GetHomogeneousBasis()->GetNumModes();
117 for(n = 0; n < num_planes; ++n)
119 if(planes[n] > pstart)
121 fac = (
NekDouble)((planes[n] - kmodes)*(planes[n] - kmodes))/
122 ((
NekDouble)((planes[n] - pstart)*(planes[n] - pstart)));
127 for(
int i = 0; i <
m_velocity.num_elements(); ++i)
140 "Projection must be set to Mixed_CG_Discontinuous for "
179 dealias += (dealias ==
"" ?
"" :
" + ") +
string(
"spectral/hp");
189 smoothing += (smoothing ==
"" ?
"" :
" + ") +
string(
"Homogeneous1D");
194 s,
"Smoothing",
"SVV (" + smoothing +
" SVV (cut-off = "
229 int nfields =
m_fields.num_elements() - 1;
230 for (
int k=0 ; k < nfields; ++k)
244 int nfields =
m_fields.num_elements() - 1;
245 for (
int k=0 ; k < nfields; ++k)
257 int vVar =
m_session->GetVariables().size();
258 Array<OneD, bool> vChecks(vVar,
false);
259 vChecks[vVar-1] =
true;
268 return m_session->GetVariables().size() - 1;
275 const Array<
OneD,
const Array<OneD, NekDouble> > &inarray,
276 Array<
OneD, Array<OneD, NekDouble> > &outarray,
281 inarray, outarray,
m_time);
293 std::vector<SolverUtils::ForcingSharedPtr>::const_iterator x;
296 (*x)->Apply(
m_fields, inarray, outarray, time);
307 const Array<
OneD,
const Array<OneD, NekDouble> > &inarray,
308 Array<
OneD, Array<OneD, NekDouble> > &outarray,
313 int phystot =
m_fields[0]->GetTotPoints();
320 F[i] = Array<OneD, NekDouble> (phystot);
359 const Array<
OneD,
const Array<OneD, NekDouble> > &fields,
360 Array<
OneD, Array<OneD, NekDouble> > &Forcing,
364 int physTot =
m_fields[0]->GetTotPoints();
366 Array<OneD, NekDouble> wk(physTot, 0.0);
370 for(i = 0; i < nvel; ++i)
373 Vmath::Vadd(physTot,wk,1,Forcing[0],1,Forcing[0],1);
375 Vmath::Smul(physTot,1.0/aii_Dt,Forcing[0],1,Forcing[0],1);
382 const Array<
OneD,
const Array<OneD, NekDouble> > &inarray,
383 Array<
OneD, Array<OneD, NekDouble> > &Forcing,
387 int phystot =
m_fields[0]->GetTotPoints();
405 for(
int i = 0; i < nvel; ++i)
407 Blas::Daxpy(phystot,-aii_dtinv,inarray[i],1,Forcing[i],1);
408 Blas::Dscal(phystot,1.0/
m_kinvis,&(Forcing[i])[0],1);