44 RegisterCreatorFunction(
"NonSmooth",
45 NonSmoothShockCapture::create,
46 "NonSmooth artificial diffusion for shock capture.");
48 NonSmoothShockCapture::NonSmoothShockCapture(
60 const int nElements =
m_fields[0]->GetExpSize();
62 int nTotQuadPoints =
m_fields[0]->GetTotPoints();
69 for (
int e = 0; e < nElements; e++)
80 int nQuadPointsElement =
m_fields[0]->GetExp(e)->GetTotPoints();
82 for (
int n = 0; n < nQuadPointsElement; n++)
93 mu[n+PointCount] = mu_0 * (0.5 * (1 + sin(
94 M_PI * (Sensor[n+PointCount] -
100 mu[n+PointCount] = mu_0;
104 PointCount += nQuadPointsElement;
virtual void v_GetArtificialViscosity(const Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, NekDouble > &mu)
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Encapsulates the artificial diffusion used in shock capture.
ArtificialDiffusionFactory & GetArtificialDiffusionFactory()
Declaration of the artificial diffusion factory singleton.
VariableConverterSharedPtr m_varConv
Auxiliary object to convert variables.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array of fields.