42 string NavierStokesCFE::className =
44 "NavierStokesCFE", NavierStokesCFE::create,
45 "NavierStokes equations in conservative variables.");
47 NavierStokesCFE::NavierStokesCFE(
57 if(
m_session->DefinesSolverInfo(
"PROBLEMTYPE"))
60 std::string ProblemTypeStr =
m_session->GetSolverInfo(
"PROBLEMTYPE");
82 ASSERTL0(
false,
"Implicit CFE not set up.");
100 bool dumpInitialConditions,
107 int phystot =
m_fields[0]->GetTotPoints();
110 m_session->LoadParameter(
"Noise", Noise,0.0);
111 int m_nConvectiveFields =
m_fields.num_elements();
115 for (
int i = 0; i < m_nConvectiveFields; i++)
118 m_comm->GetColumnComm()->GetRank()+1);
120 noise, 1,
m_fields[i]->UpdatePhys(), 1);
128 if (dumpInitialConditions)
141 int nvariables = inarray.num_elements();
152 for (i = 0; i < nvariables; ++i)
158 for (i = 0; i < nvariables-1; ++i)
175 for (i = 1; i < nvariables-1; ++i)
180 inarrayTemp[i-1], 1);
184 for (i = 0; i < nvariables-2; ++i)
186 Vmath::Vcopy(npoints, inarrayTemp[i], 1, inarrayDiff[i], 1);
192 inarrayDiff[nvariables-2], 1);
197 for (i = 0; i < nvariables; ++i)
206 std::vector<SolverUtils::ForcingSharedPtr>::const_iterator x;
209 (*x)->Apply(
m_fields, inarray, outarray, time);
219 int nvariables = inarray.num_elements();
228 for(i = 0; i < nvariables; ++i)
238 ASSERTL0(
false,
"No Continuous Galerkin for full compressible "
239 "Navier-Stokes equations");
243 ASSERTL0(
false,
"Unknown projection scheme");
256 for (
int n = 0; n <
m_fields[0]->GetBndConditions().num_elements(); ++n)
258 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)
#define ASSERTL0(condition, msg)
virtual void v_InitObject()
Initialization object for CompressibleFlowSystem class.
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
SOLVER_UTILS_EXPORT int NoCaseStringCompare(const std::string &s1, const std::string &s2)
Perform a case-insensitive string comparison.
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)
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).
virtual SOLVER_UTILS_EXPORT void v_SetInitialConditions(NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0)
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.
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
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[]