43 "NavierStokes equations in conservative variables.");
55 if(
m_session->DefinesSolverInfo(
"PROBLEMTYPE"))
58 std::string ProblemTypeStr =
m_session->GetSolverInfo(
"PROBLEMTYPE");
80 ASSERTL0(
false,
"Implicit CFE not set up.");
98 bool dumpInitialConditions,
101 EquationSystem::v_SetInitialConditions(initialtime,
false);
105 int phystot =
m_fields[0]->GetTotPoints();
108 m_session->LoadParameter(
"Noise", Noise,0.0);
109 int m_nConvectiveFields =
m_fields.num_elements();
113 for (
int i = 0; i < m_nConvectiveFields; i++)
116 m_comm->GetColumnComm()->GetRank()+1);
118 noise, 1,
m_fields[i]->UpdatePhys(), 1);
126 if (dumpInitialConditions)
139 int nvariables = inarray.num_elements();
150 for (i = 0; i < nvariables; ++i)
156 for (i = 0; i < nvariables-1; ++i)
173 for (i = 1; i < nvariables-1; ++i)
178 inarrayTemp[i-1], 1);
182 for (i = 0; i < nvariables-2; ++i)
184 Vmath::Vcopy(npoints, inarrayTemp[i], 1, inarrayDiff[i], 1);
190 inarrayDiff[nvariables-2], 1);
195 for (i = 0; i < nvariables; ++i)
204 std::vector<SolverUtils::ForcingSharedPtr>::const_iterator x;
207 (*x)->Apply(
m_fields, inarray, outarray, time);
217 int nvariables = inarray.num_elements();
226 for(i = 0; i < nvariables; ++i)
236 ASSERTL0(
false,
"No Continuous Galerkin for full compressible "
237 "Navier-Stokes equations");
241 ASSERTL0(
false,
"Unknown projection scheme");
254 for (
int n = 0; n <
m_fields[0]->GetBndConditions().num_elements(); ++n)
256 std::string type =
m_fields[0]->GetBndConditions()[n]->GetUserDefined();
virtual void v_InitObject()
Initialization object for CompressibleFlowSystem class.
void DoOdeProjection(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
static SolverUtils::EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession)
#define ASSERTL0(condition, msg)
virtual void v_InitObject()
Initialization object for CompressibleFlowSystem class.
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
std::vector< std::pair< std::string, std::string > > SummaryList
SOLVER_UTILS_EXPORT void Checkpoint_Output(const int n)
Write checkpoint file of m_fields.
enum MultiRegions::ProjectionType m_projectionType
Type of projection; e.g continuous or discontinuous.
virtual void v_SetInitialConditions(NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0)
void GetTemperature(const Array< OneD, const Array< OneD, NekDouble > > &physfield, Array< OneD, NekDouble > &pressure, Array< OneD, NekDouble > &temperature)
void Vdiv(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x/y.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
LibUtilities::CommSharedPtr m_comm
Communicator.
void DoOdeRhs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
virtual void v_GenerateSummary(SolverUtils::SummaryList &s)
Print a summary of time stepping parameters.
void SetBoundaryConditions(Array< OneD, Array< OneD, NekDouble > > &physarray, NekDouble time)
SOLVER_UTILS_EXPORT int NoCaseStringCompare(const string &s1, const string &s2)
Perform a case-insensitive string comparison.
void SetCommonBC(const std::string &userDefStr, const int n, const NekDouble time, int &cnt, Array< OneD, Array< OneD, NekDouble > > &inarray)
Set boundary conditions which can be: a) Wall and Symmerty BCs implemented at CompressibleFlowSystem ...
void DefineProjection(FuncPointerT func, ObjectPointerT obj)
bool m_explicitAdvection
Indicates if explicit or implicit treatment of advection is used.
void DefineOdeRhs(FuncPointerT func, ObjectPointerT obj)
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
int m_spacedim
Spatial dimension (>= expansion dim).
EquationSystemFactory & GetEquationSystemFactory()
SolverUtils::AdvectionSharedPtr m_advection
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.
SolverUtils::DiffusionSharedPtr m_diffusion
SOLVER_UTILS_EXPORT int GetNpoints()
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
virtual void v_SetInitialConditions(NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0)
ProblemType m_problemType
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
void FillWhiteNoise(int n, const T eps, T *x, const int incx, int outseed)
Fills a vector with white noise.
SOLVER_UTILS_EXPORT MultiRegions::ExpListSharedPtr GetPressure()
Get pressure field if available.
static std::string className
virtual void v_GenerateSummary(SolverUtils::SummaryList &s)
Print a summary of time stepping parameters.
virtual ~NavierStokesCFE()
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
std::vector< SolverUtils::ForcingSharedPtr > m_forcing
NavierStokesCFE(const LibUtilities::SessionReaderSharedPtr &pSession)
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.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.
const char *const ProblemTypeMap[]