Computes timestep using CFL condition. More...
Go to the source code of this file.
Functions | |
void | new_dt (MeshS *pM) |
Computes timestep using CFL condition. |
Computes timestep using CFL condition.
PURPOSE: Computes timestep using CFL condition on cell-centered velocities and sound speed, and Alfven speed from face-centered B, across all Grids being updated on this processor. With MPI parallel jobs, also finds minimum dt across all processors.
For special relativity, the time step limit is just (1/dx), since the fastest wave speed is never larger than c=1.
A CFL condition is also applied using particle velocities if PARTICLES is defined.
CONTAINS PUBLIC FUNCTIONS:
Definition in file new_dt.c.
void new_dt | ( | MeshS * | pM | ) |
Computes timestep using CFL condition.
Definition at line 32 of file new_dt.c.
References ConsS::B1c, GridS::B1i, ConsS::B2c, GridS::B2i, ConsS::B3c, GridS::B3i, cc_pos(), CourNo, ConsS::d, MeshS::Domain, MeshS::DomainsPerLevel, GridS::dt, MeshS::dt, GridS::dx1, GridS::dx2, GridS::dx3, ConsS::E, Gamma, Gamma_1, DomainS::Grid, GridS::is, Iso_csound2, GridS::js, GridS::ks, ConsS::M1, ConsS::M2, ConsS::M3, MeshS::NLevels, GridS::nparticle, MeshS::nstep, GridS::Nx, par_getd(), GridS::particle, q, MeshS::time, and GridS::U.
Referenced by main().