41using namespace LibUtilities;
 
   55    : 
Extrapolate(pSession, pFields, pPressure, pVel, advObject)
 
   62    size_t dim     = 
m_fields[0]->GetCoordim(0);
 
   65    size_t nTracePts = 
m_fields[0]->GetTrace()->GetNpoints();
 
   66    for (
size_t i = 0; i < dim; ++i)
 
   81    boost::ignore_unused(fields, N, kinvis);
 
   82    ASSERTL0(
false, 
"This method should not be called by Substepping routine");
 
   90    size_t order = IntegrationScheme->GetOrder();
 
   94    if ((IntegrationScheme->GetName() == 
"Euler" &&
 
   95         IntegrationScheme->GetVariant() == 
"Backward") ||
 
   97        (IntegrationScheme->GetName() == 
"BDFImplicit" &&
 
   98         (order == 1 || order == 2)))
 
  101        std::string vSubStepIntScheme        = 
"RungeKutta";
 
  102        std::string vSubStepIntSchemeVariant = 
"SSP";
 
  103        int vSubStepIntSchemeOrder           = order;
 
  105        if (
m_session->DefinesSolverInfo(
"SubStepIntScheme"))
 
  107            vSubStepIntScheme = 
m_session->GetSolverInfo(
"SubStepIntScheme");
 
  108            vSubStepIntSchemeVariant = 
"";
 
  109            vSubStepIntSchemeOrder   = order;
 
  114                vSubStepIntScheme, vSubStepIntSchemeVariant,
 
  115                vSubStepIntSchemeOrder, std::vector<NekDouble>());
 
  118        size_t ndim = order + 1;
 
  122        int ntotpts         = 
m_fields[0]->GetTotPoints();
 
  125        for (
size_t i = 1; i < ndim * nvel; ++i)
 
  132        ASSERTL0(0, 
"Integration method not suitable: Options include " 
  133                    "BackwardEuler or BDFImplicitOrder{1,2}");
 
  136    m_intSteps = IntegrationScheme->GetNumIntegrationPhases();
 
  153    size_t nVariables     = inarray.size();
 
  154    size_t nQuadraturePts = inarray[0].size();
 
  157    size_t ncoeffs = 
m_fields[0]->GetNcoeffs();
 
  162    for (i = 1; i < nVariables; ++i)
 
  164        WeakAdv[i] = WeakAdv[i - 1] + ncoeffs;
 
  173        Velfields[i] = Velfields[i - 1] + nQuadraturePts;
 
  180        x->PreApply(
m_fields, Velfields, Velfields, time);
 
  186        x->Apply(
m_fields, outarray, outarray, time);
 
  189    for (i = 0; i < nVariables; ++i)
 
  191        m_fields[i]->IProductWRTBase(outarray[i], WeakAdv[i]);
 
  199    for (i = 0; i < nVariables; ++i)
 
  205        m_fields[i]->MultiplyByElmtInvMass(WeakAdv[i], WeakAdv[i]);
 
  208        m_fields[i]->BwdTrans(WeakAdv[i], outarray[i]);
 
  219    boost::ignore_unused(time);
 
  220    ASSERTL1(inarray.size() == outarray.size(),
 
  221             "Inarray and outarray of different sizes ");
 
  223    for (
size_t i = 0; i < inarray.size(); ++i)
 
  225        Vmath::Vcopy(inarray[i].size(), inarray[i], 1, outarray[i], 1);
 
  236    boost::ignore_unused(Aii_Dt);
 
  267    size_t npts = 
m_fields[0]->GetTotPoints();
 
  274    for (n = 0; n < nvel; ++n)
 
  278        for (i = nblocks - 1; i > 0; --i)
 
  288    for (i = 0; i < nvel; ++i)
 
  299        for (n = 0; n < nvel; ++n)
 
  301            for (i = 1; i < nblocks; ++i)
 
  322    static int ncalls = 1;
 
  335             "Number of substeps has exceeded maximum");
 
  341        std::cout << 
"Sub-integrating using " << nsubsteps
 
  348    for (
size_t m = 0; m < nint; ++m)
 
  351        fields = solutionVector[m];
 
  359        for (n = 0; n < nsubsteps; ++n)
 
  377    size_t n_element = 
m_fields[0]->GetExpSize();
 
  387    for (
size_t i = 0; i < 
m_velocity.size(); ++i)
 
  393    for (
size_t el = 0; el < n_element; ++el)
 
  397                                 (ExpOrder[el] - 1) * (ExpOrder[el] - 1));
 
  411    ASSERTL1(physfield.size() == Outarray.size(),
 
  412             "Physfield and outarray are of different dimensions");
 
  417    size_t nTracePts = 
m_fields[0]->GetTrace()->GetNpoints();
 
  436    for (i = 0; i < nDimensions; ++i)
 
  438        m_fields[0]->ExtractTracePhys(velfield[i], Fwd);
 
  442    for (i = 0; i < physfield.size(); ++i)
 
  446        m_fields[i]->GetFwdBwdTracePhys(physfield[i], Fwd, Bwd);
 
  449        m_fields[0]->GetTrace()->Upwind(Vn, Fwd, Bwd, numflux);
 
  452        Vmath::Vsub(nTracePts, numflux, 1, Fwd, 1, Fwd, 1);
 
  453        Vmath::Vsub(nTracePts, numflux, 1, Bwd, 1, Bwd, 1);
 
  460        m_fields[0]->AddFwdBwdTraceIntegral(Fwd, Bwd, Outarray[i]);
 
  471    size_t npts = 
m_fields[0]->GetTotPoints();
 
  481    for (i = 0; i <= ord; ++i)
 
  483        for (j = 0; j <= ord; ++j)
 
  493    for (i = 0; i < nvel; ++i)
 
  497        for (j = 1; j <= ord; ++j)
 
#define ASSERTL0(condition, msg)
 
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
 
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
 
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
 
void DefineProjection(FuncPointerT func, ObjectPointerT obj)
 
void DefineOdeRhs(FuncPointerT func, ObjectPointerT obj)
 
An abstract base class encapsulating the concept of advection of a vector field.
 
static void Daxpy(const int &n, const double &alpha, const double *x, const int &incx, const double *y, const int &incy)
BLAS level 1: y = alpha x plus y.
 
TimeIntegrationSchemeFactory & GetTimeIntegrationSchemeFactory()
 
std::shared_ptr< SessionReader > SessionReaderSharedPtr
 
std::shared_ptr< TimeIntegrationScheme > TimeIntegrationSchemeSharedPtr
 
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
 
std::shared_ptr< Advection > AdvectionSharedPtr
A shared pointer to an Advection object.
 
The above copyright notice and this permission notice shall be included.
 
ExtrapolateFactory & GetExtrapolateFactory()
 
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.
 
void Neg(int n, T *x, const int incx)
Negate x = -x.
 
T Vmin(int n, const T *x, const int incx)
Return the minimum element in x - called vmin to avoid conflict with min.
 
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
 
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
 
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
 
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
 
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.