Commit 03dbe454 authored by jonas.kusch's avatar jonas.kusch
Browse files

fixed 2D solver


Former-commit-id: 6cea9382
parent 2b9d6a8a
......@@ -149,15 +149,16 @@ CSDSolverTrafoFP2D::CSDSolverTrafoFP2D( Config* settings ) : SNSolver( settings
//_density = std::vector<double>( _nCells, 1.0 );
// exit(EXIT_SUCCESS);
double densityMin = 0.1;
for( unsigned j = 0; j < _nCells; ++j ) {
if( _density[j] < densityMin ) _density[j] = densityMin;
}
}
void CSDSolverTrafoFP2D::Solve() {
auto log = spdlog::get( "event" );
double densityMin = 0.1;
for( unsigned j = 0; j < _nCells; ++j ) {
if( _density[j] < densityMin ) _density[j] = densityMin;
}
// save original energy field for boundary conditions
auto energiesOrig = _energies;
......@@ -209,7 +210,7 @@ void CSDSolverTrafoFP2D::Solve() {
}
// determine minimal density for CFL computation
double densityMin = _density[0];
densityMin = _density[0];
for( unsigned j = 1; j < _nCells; ++j ) {
if( densityMin > _density[j] ) densityMin = _density[j];
}
......
......@@ -85,6 +85,9 @@ Solver::Solver( Config* settings ) : _settings( settings ) {
// initialize Helper Variables
_fluxNew = Vector( _nCells, 0 );
_flux = Vector( _nCells, 0 );
// write density
_density = _problem->GetDensity( _mesh->GetCellMidPoints() );
}
Solver::~Solver() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment