89 std::cout <<
"CFL (zero plane): ";
91 std::cout << cfl <<
" (in elmt " << elmtid <<
")" << std::endl;
112 const bool FlagAcousticCFL)
114 int nelmt =
m_fields[0]->GetExpSize();
132 for (
int el = 0; el < nelmt; ++el)
134 order = std::max(expOrder[el] - 1, 1);
135 cfl[el] =
m_timestep * (stdVelocity[el] * cLambda * order * order);
146 int n_element =
m_fields[0]->GetExpSize();
153 CFL = CFL_loc = cfl[elmtid];
157 elmtid =
m_fields[0]->GetExp(elmtid)->GetGeom()->GetGlobalID();
168 elmtid = elmtid %
m_fields[0]->GetPlane(0)->GetExpSize();
SOLVER_UTILS_EXPORT NekDouble GetCFLEstimate(int &elmtid)
SOLVER_UTILS_EXPORT Array< OneD, NekDouble > GetElmtCFLVals(const bool FlagAcousticCFL=true)
virtual SOLVER_UTILS_EXPORT Array< OneD, NekDouble > v_GetMaxStdVelocity(const NekDouble SpeedSoundFactor=1.0)
SOLVER_UTILS_EXPORT void v_InitObject(bool DeclareField=true) override
Initialisation object for EquationSystem.
int m_cflWriteFldWaitSteps
Number of timesteps after which IO_CFLWriteFld is activated.
NekDouble m_cflWriteFld
Write field if cfl is higher than IO_CFLWriteFld treshold.
SOLVER_UTILS_EXPORT AdvectionSystem(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
SOLVER_UTILS_EXPORT bool v_PostIntegrate(int step) override
SOLVER_UTILS_EXPORT ~AdvectionSystem() override
int m_cflsteps
Dump cfl estimate.
LibUtilities::CommSharedPtr m_comm
Communicator.
NekDouble m_timestep
Time step size.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
SOLVER_UTILS_EXPORT const Array< OneD, int > GetNumExpModesPerExp()
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.
enum HomogeneousType m_HomogeneousType
Base class for unsteady solvers.
virtual SOLVER_UTILS_EXPORT bool v_PostIntegrate(int step)
SOLVER_UTILS_EXPORT void v_InitObject(bool DeclareField=true) override
Init object for UnsteadySystem class.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
int Imax(int n, const T *x, const int incx)
Return the index of the maximum element in x.