44     RegisterCreatorFunction(
"IsentropicVortex",
 
   45                             IsentropicVortexBC::create,
 
   46                             "Isentropic vortex boundary condition.");
 
   54     : 
CFSBndCond(pSession, pFields, pTraceNormals, pSpaceDim, bcRegion, cnt)
 
   63     int nvariables = physarray.num_elements();
 
   67     int npoints, id1, id2, e_max;
 
   71     for(
int e = 0; e < e_max; ++e)
 
   74             GetBndCondExpansions()[
m_bcRegion]->GetExp(e)->GetTotPoints();
 
   76             GetBndCondExpansions()[
m_bcRegion]->GetPhys_Offset(e);
 
   84         GetExp(e)->GetCoords(x, y, z);
 
   88         for (
int i = 0; i < nvariables; ++i)
 
   92                          UpdatePhys())[id1], 1);
 
  105     int nq = x.num_elements();
 
  115     NekDouble fac = 1.0/(16.0*gamma*M_PI*M_PI);
 
  124     for (
int i = 0; i < nq; ++i)
 
  126         xbar      = x[i] - u0*time - x0;
 
  127         ybar      = y[i] - v0*time - y0;
 
  128         r         = sqrt(xbar*xbar + ybar*ybar);
 
  129         tmp       = beta*exp(1-r*r);
 
  130         u[0][i+o] = pow(1.0 - (gamma-1.0)*tmp*tmp*fac, 1.0/(gamma-1.0));
 
  131         u[1][i+o] = u[0][i+o]*(u0 - tmp*ybar/(2*M_PI));
 
  132         u[2][i+o] = u[0][i+o]*(v0 + tmp*xbar/(2*M_PI));
 
  133         u[
m_spacedim+1][i+o] = pow(u[0][i+o], gamma)/(gamma-1.0) +
 
  134         0.5*(u[1][i+o]*u[1][i+o] + u[2][i+o]*u[2][i+o]) / u[0][i+o];
 
int m_spacedim
Space dimension. 
void EvaluateIsentropicVortex(const Array< OneD, NekDouble > &x, const Array< OneD, NekDouble > &y, const Array< OneD, NekDouble > &z, Array< OneD, Array< OneD, NekDouble > > &u, NekDouble time, const int o=0)
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array of fields. 
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
CFSBndCondFactory & GetCFSBndCondFactory()
Declaration of the boundary condition factory singleton. 
virtual void v_Apply(Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time)
Encapsulates the user-defined boundary conditions for compressible flow solver. 
NekDouble m_gamma
Parameters of the flow. 
void Zero(int n, T *x, const int incx)
Zero vector. 
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
int m_bcRegion
Id of the boundary region.