35 #include <boost/core/ignore_unused.hpp> 44 string ImageWarpingSystem::className =
47 ImageWarpingSystem::create,
48 "Image warping system.");
50 ImageWarpingSystem::ImageWarpingSystem(
86 if (m_fields[0]->GetTrace())
94 "AdvectionType", advName,
"WeakDG");
100 "UpwindType", riemName,
"Upwind");
116 ASSERTL0(
false,
"Implicit unsteady Advection not set up.");
130 boost::ignore_unused(time);
133 int ncoeffs = inarray[0].num_elements();
140 "CG not implemented yet.");
150 m_fields[0]->PhysDeriv(inarray[0], dIdx1, dIdx2);
158 for (
int i = 0; i < 2; ++i)
160 Vmath::Vmul(npoints, &alloc[i*npoints], 1, inarray[1].
get(), 1,
161 m_fields[i+2]->UpdatePhys().
get(), 1);
163 m_fields[i+2]->UpdatePhys().
get(), 1);
175 for(
int i = 0; i < 2; ++i)
186 dIdx2.get(), 1, inarray[0].get(), 1,
191 m_fields[0]->IProductWRTBase(dIdx1, tmp2);
194 m_fields[0]->MultiplyByElmtInvMass(tmp2, tmp2);
196 Vmath::Vadd(npoints, outarray[0], 1, tmp, 1, outarray[0], 1);
209 int nvariables = inarray.num_elements();
219 for(
int i = 0; i < nvariables; ++i)
226 ASSERTL0(
false,
"Unknown projection scheme");
245 for (
int i = 0; i <
m_velocity.num_elements(); ++i)
264 "Dimension of flux array and velocity array do not match");
266 int nq = physfield[0].num_elements();
268 for (
int i = 0; i < flux.num_elements(); ++i)
270 for (
int j = 0; j < flux[0].num_elements(); ++j)
Array< OneD, Array< OneD, NekDouble > > m_velocity
#define ASSERTL0(condition, msg)
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
SolverUtils::AdvectionSharedPtr m_advObject
Advection term.
void DoOdeRhs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
std::vector< std::pair< std::string, std::string > > SummaryList
std::shared_ptr< ContField2D > ContField2DSharedPtr
virtual void v_InitObject()
Init object for UnsteadySystem class.
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
enum MultiRegions::ProjectionType m_projectionType
Type of projection; e.g continuous or discontinuous.
std::map< ConstFactorType, NekDouble > ConstFactorMap
Array< OneD, NekDouble > m_traceVn
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Array holding trace normals for DG simulations in the forwards direction.
virtual void v_GenerateSummary(SolverUtils::SummaryList &s)
Print a summary of time stepping parameters.
void DefineProjection(FuncPointerT func, ObjectPointerT obj)
virtual SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &s)
Print a summary of time stepping parameters.
Array< OneD, NekDouble > & GetNormalVelocity()
Get the normal velocity.
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
bool m_explicitAdvection
Indicates if explicit or implicit treatment of advection is used.
virtual ~ImageWarpingSystem()
void DefineOdeRhs(FuncPointerT func, ObjectPointerT obj)
Base class for unsteady solvers.
RiemannSolverFactory & GetRiemannSolverFactory()
int m_spacedim
Spatial dimension (>= expansion dim).
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
AdvectionFactory & GetAdvectionFactory()
Gets the factory for initialising advection objects.
SolverUtils::RiemannSolverSharedPtr m_riemannSolver
void Neg(int n, T *x, const int incx)
Negate x = -x.
EquationSystemFactory & GetEquationSystemFactory()
void DoOdeProjection(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
SOLVER_UTILS_EXPORT void SetBoundaryConditions(NekDouble time)
Evaluates the boundary conditions at the given time.
SOLVER_UTILS_EXPORT int GetNpoints()
void Vvtvvtp(int n, const T *v, int incv, const T *w, int incw, const T *x, int incx, const T *y, int incy, T *z, int incz)
vvtvvtp (vector times vector plus vector times vector):
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
SOLVER_UTILS_EXPORT int GetTraceNpoints()
SpatialDomains::MeshGraphSharedPtr m_graph
Pointer to graph defining mesh.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
void GetFluxVector(const Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &flux)
virtual SOLVER_UTILS_EXPORT void v_InitObject()
Init object for UnsteadySystem class.
void Zero(int n, T *x, const int incx)
Zero vector.
A base class for PDEs which include an advection component.
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
std::shared_ptr< SessionReader > SessionReaderSharedPtr
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.
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.
static FlagList NullFlagList
An empty flag list.
std::vector< int > m_intVariables