6 bool approx_equal(
double a,
double b,
double thres=1e-9)
19 const double p=
abs(parallel);
20 const double v=
abs(vel);
46 Primitive preal=calc_primitive(cells[real_cell],eos, normal);
47 const Vector3D parallel = GetParallel(cells[real_cell].velocity,normal);
50 Primitive pghost = calc_primitive(other,eos,normal);
54 sol = rs(preal,pghost,fv);
56 sol = rs(pghost,preal,fv);
60 res.tracers.resize(other.
tracers.size(),0);
72 eos,normal),calc_primitive(cells[face.
neighbors.second],
80 res.tracers = (sol.
Mass>0 ? 1 : -1)*res.mass*donor.
tracers;
89 return CalcRigidWall(tess,cells,eos,index,rs);
90 return CalcSingleFluxInBulk(tess,cells,eos,index,rs,face_vel);
100 const vector<Vector3D>& point_velocities)
const 103 for(
size_t i=0;i<res.size();++i)
112 res[i]=CalcSingleFlux(tess,cells,eos,i,rs_,fv);
Set of conserved variables (extensive)
Vector2D Momentum
Momentum.
std::pair< size_t, size_t > neighbors
Neighboring cells.
Abstract class for tessellation in 3D.
virtual Vector3D CalcFaceVelocity(size_t p0, size_t p1, Vector3D const &v0, Vector3D const &v1) const =0
Calculates the velocity of a face.
virtual Vector3D Normal(size_t faceindex) const =0
Returns a vector normal to the face whose magnitude is the seperation between the neighboring points...
Vector3D Reflect(Vector3D const &v, Vector3D const &normal)
Reflect vector.
virtual bool IsGhostPoint(size_t index) const =0
Checks if a point is a ghost point or not.
Container for the hydrodynamic variables.
virtual double dp2c(double d, double p, tvector const &tracers=tvector(), vector< string > const &tracernames=vector< string >()) const =0
Calculates the speed of sound.
~FirstOrderHydroFlux(void)
Class destructor.
double Energy
Total energy (kinetic + thermal)
double y
Component in the y direction.
Class for flux calculator for first order hydro. Assumes rigid walls as default.
FirstOrderHydroFlux(RiemannSolver const &rs)
Class constructor.
Base class for Riemann solver.
double ScalarProd(Vector3D const &v1, Vector3D const &v2)
Scalar product of two vectors.
Base class for equation of state.
virtual Face const & GetFace(size_t index) const =0
Returns Face (interface between cells)
Vector2D normalize(const Vector2D &v)
Normalized a vector.
virtual bool BoundaryFace(size_t index) const =0
Returns if the face is a boundary one.
Vector3D velocity
Velocity.
virtual double dp2e(double d, double p, tvector const &tracers=tvector(), vector< string > const &tracernames=vector< string >()) const =0
Calculates the thermal energy per unit mass.
virtual size_t GetTotalFacesNumber(void) const =0
Returns the total number of faces.
double abs(Vector3D const &v)
Norm of a vector.
vector< double > tracers
Tracers.
Primitive hydrodynamic variables.
vector< Conserved3D > operator()(const Tessellation3D &tess, const vector< ComputationalCell > &cells, const EquationOfState &eos, const vector< Vector3D > &point_velocities) const
Calculates the fluxes.
Conserved variables for a 3D computational cell.
Interface between two cells.
double x
Component in the x direction.