35 #include <boost/core/ignore_unused.hpp>
43 string IsentropicVortex::className =
45 "IsentropicVortex", IsentropicVortex::create,
46 "Euler equations for the isentropic vortex test case.");
48 IsentropicVortex::IsentropicVortex(
80 bool dumpInitialConditions,
83 boost::ignore_unused(domain);
101 for (
int i = 0; i <
m_fields.size(); ++i)
119 if (!fs::is_directory(newdir))
121 fs::create_directory(newdir);
123 if (
m_comm->GetTimeComm()->GetRank() == 0)
162 boost::ignore_unused(z);
177 for (
int i = 0; i < nq; ++i)
181 r =
sqrt(xbar * xbar + ybar * ybar);
182 tmp =
m_beta * exp(1 - r * r);
184 pow(1.0 - (
m_gamma - 1.0) * tmp * tmp * fac, 1.0 / (
m_gamma - 1.0));
185 u[1][i + o] = u[0][i + o] * (
m_u0 - tmp * ybar / (2 * M_PI));
186 u[2][i + o] = u[0][i + o] * (
m_v0 + tmp * xbar / (2 * M_PI));
189 0.5 * (u[1][i + o] * u[1][i + o] + u[2][i + o] * u[2][i + o]) /
virtual void v_SetInitialConditions(NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0) override
Set the initial conditions.
virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override
Print a summary of time stepping parameters.
NekDouble m_beta
Maximum strength of the perturbation.
virtual ~IsentropicVortex()
Destructor for EulerCFE class.
NekDouble m_y0
Origin in y-direction.
NekDouble m_v0
Velocity in y-direction.
void EvaluateIsentropicVortex(const Array< OneD, NekDouble > &x, const Array< OneD, NekDouble > &y, const Array< OneD, NekDouble > &z, Array< OneD, Array< OneD, NekDouble >> &u, NekDouble time, const int o=0)
Isentropic Vortex Test Case.
NekDouble m_x0
Origin in x-direction.
NekDouble m_u0
Velocity in x-direction.
virtual void v_EvaluateExactSolution(unsigned int field, Array< OneD, NekDouble > &outfield, const NekDouble time=0.0) override
Get the exact solutions for isentropic vortex and Ringleb flow problems.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
int m_spacedim
Spatial dimension (>= expansion dim).
SOLVER_UTILS_EXPORT bool ParallelInTime()
Check if solver use Parallel-in-Time.
LibUtilities::CommSharedPtr m_comm
Communicator.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
SOLVER_UTILS_EXPORT void Checkpoint_Output(const int n)
Write checkpoint file of m_fields.
bool m_useInitialCondition
Flag to determine if IC are used.
SOLVER_UTILS_EXPORT void WriteFld(const std::string &outname)
Write field data to the given filename.
std::string m_sessionName
Name of the session.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
int m_nchk
Number of checkpoints written so far.
int m_checksteps
Number of steps between checkpoints.
SOLVER_UTILS_EXPORT int GetTotPoints()
Base class for unsteady solvers.
virtual SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &s) override
Print a summary of time stepping parameters.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::vector< std::pair< std::string, std::string > > SummaryList
EquationSystemFactory & GetEquationSystemFactory()
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
The above copyright notice and this permission notice shall be included.
void Zero(int n, T *x, const int incx)
Zero vector.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
scalarT< T > sqrt(scalarT< T > in)