outflow1d.cpp
1 #include "outflow1d.hpp"
2 #include "../../misc/universal_error.hpp"
3 #include "flux_conversion.hpp"
4 
5 Extensive Outflow::operator()
6  (const SimulationState1D& ss,
7  const EquationOfState& eos,
8  const RiemannSolver& rs,
9  const vector<double>& vertex_velocity,
10  const bool side) const
11 {
12  const vector<double> vertices = ss.getVertices();
13  if(side){
14  const ComputationalCell& cell = ss.getCells().back();
15  const Primitive ghost = cc2primitive(cell, eos);
16  const double vv = vertex_velocity[vertices.size()-1];
17  return flux2extensive
18  (rs(ghost,ghost,vv),
19  cell);
20  }
21  else{
22  const ComputationalCell& cell = ss.getCells().front();
23  const Primitive ghost = cc2primitive(cell, eos);
24  const double vv = vertex_velocity[0];
25  return flux2extensive
26  (rs(ghost, ghost, vv),
27  cell);
28  }
29 }
Extensive variables.
Definition: extensive.hpp:18
const vector< double > & getVertices(void) const
Access to vertices.
Base class for Riemann solver.
const vector< ComputationalCell > & getCells(void) const
Access to hydro cells.
Base class for equation of state.
Outflow boundary conditions.
Primitive hydrodynamic variables.
Package for computational domain and hydro cells.
Computational cell.