45 AdjointAdvection::create);
50 AdjointAdvection::AdjointAdvection():
60 const int nConvectiveFields,
69 ASSERTL1(nConvectiveFields == inarray.num_elements(),
70 "Number of convective fields and Inarray are not compatible");
72 int nPointsTot = fields[0]->GetNpoints();
73 int ndim = advVel.num_elements();
78 for(
int i = 0; i < ndim; ++i)
83 fields[i]->HomogeneousBwdTrans(advVel[i],velocity[i]);
87 velocity[i] = advVel[i];
92 for(
int i = 0; i < nDerivs; ++i)
100 for (
int i = 0; i < ndim; ++i)
109 for(
int i = 0; i < ndim; ++i)
116 fields[i]->PhysDeriv(inarray[i], grad[0]);
121 fields[i]->PhysDeriv(inarray[i], grad[0], grad[1]);
126 fields[i]->PhysDeriv(inarray[i], grad[0], grad[1], grad[2]);
130 fields[i]->HomogeneousBwdTrans(grad[0], grad[0]);
131 fields[i]->HomogeneousBwdTrans(grad[1], grad[1]);
132 fields[i]->HomogeneousBwdTrans(grad[2], grad[2]);
140 for(
int j = 1; j < nDerivs; ++j)
155 for(
int j = 0; j < lim; ++j)
165 fields[i]->HomogeneousFwdTrans(outarray[i],outarray[i]);
bool m_singleMode
flag to determine if use single mode or not
Array< OneD, Array< OneD, NekDouble > > m_baseflow
Storage for base flow.
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
int m_slices
number of slices
virtual void v_Advect(const int nConvectiveFields, 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.
Array< OneD, Array< OneD, NekDouble > > m_interp
interpolation vector
void UpdateBase(const NekDouble m_slices, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble m_time, const NekDouble m_period)
virtual ~AdjointAdvection()
AdvectionFactory & GetAdvectionFactory()
Gets the factory for initialising advection objects.
void Neg(int n, T *x, const int incx)
Negate x = -x.
NekDouble m_period
period length
bool m_multipleModes
flag to determine if use multiple mode or not
bool m_halfMode
flag to determine if use half mode or not
void UpdateGradBase(const int var, const MultiRegions::ExpListSharedPtr &field)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Array< OneD, Array< OneD, NekDouble > > m_gradBase
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.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.