48 Loki::SingleThreaded> Type;
49 return Type::Instance();
52 ArtificialDiffusion::ArtificialDiffusion(
56 : m_session(pSession),
97 int nvariables = inarray.num_elements();
98 int npoints =
m_fields[0]->GetNpoints();
102 for (i = 0; i < nvariables; ++i)
109 for (i = 0; i < nvariables; ++i)
LibUtilities::NekFactory< std::string, ArtificialDiffusion, const LibUtilities::SessionReaderSharedPtr &, const Array< OneD, MultiRegions::ExpListSharedPtr > &, const int > ArtificialDiffusionFactory
Declaration of the artificial diffusion factory.
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
void DoArtificialDiffusion(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
Apply the artificial diffusion.
DiffusionFactory & GetDiffusionFactory()
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
SolverUtils::DiffusionSharedPtr m_diffusion
LDG Diffusion operator.
virtual void v_GetArtificialViscosity(const Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, NekDouble > &mu)=0
ArtificialDiffusionFactory & GetArtificialDiffusionFactory()
Declaration of the artificial diffusion factory singleton.
LibUtilities::SessionReaderSharedPtr m_session
Session reader.
NekDouble m_FacL
Parameters.
virtual void v_DoArtificialDiffusion(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
void GetArtificialViscosity(const Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, NekDouble > &mu)
Calculate the artificial viscosity.
VariableConverterSharedPtr m_varConv
Auxiliary object to convert variables.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array of fields.
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
Provides a generic Factory class.