43 RegisterCreatorFunction(
"NonConservative",
66 const int nConvectiveFields,
75 int nDim = advVel.num_elements();
76 int nPointsTot = fields[0]->GetNpoints();
92 for (
int i = 0; i < nConvectiveFields; ++i)
98 fields[0]->PhysDeriv(inarray[i], grad0);
106 fields[0]->PhysDeriv(inarray[i], grad0, grad1);
123 fields[0]->PhysDeriv(inarray[i], grad0, grad1, grad2);
144 ASSERTL0(
false,
"dimension unknown");
#define ASSERTL0(condition, msg)
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
virtual void v_Advect(const int nConvective, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &advVel, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble &time, const Array< OneD, Array< OneD, NekDouble > > &pFwd=NullNekDoubleArrayofArray, const Array< OneD, Array< OneD, NekDouble > > &pBwd=NullNekDoubleArrayofArray)
Advects a vector field.
AdvectionFactory & GetAdvectionFactory()
Gets the factory for initialising advection objects.
static AdvectionSharedPtr create(std::string advType)
AdvectionNonConservative()
virtual void v_InitObject(LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields)
Initialise AdvectionNonConservative objects and store them before starting the time-stepping.
virtual SOLVER_UTILS_EXPORT void v_InitObject(LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields)
Initialises the advection object.
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.