Commit d3cf4b49 authored by steffen.schotthoefer's avatar steffen.schotthoefer
Browse files

small bug fix with MN: optimizer needs moments, not volume averaged moments

parent aa9d8ea9
......@@ -135,6 +135,7 @@ void MNSolver::Solve() {
double dFlux = 1e10;
Vector fluxNew( _nCells, 0.0 );
Vector fluxOld( _nCells, 0.0 );
Vector _solTimesArea( _nTotalEntries, 0.0 );
double mass1 = 0;
for( unsigned i = 0; i < _nCells; ++i ) {
......@@ -163,7 +164,9 @@ void MNSolver::Solve() {
// ------- Reconstruction Step ----------------
_optimizer->Solve( _alpha[idx_cell], _sol[idx_cell], _moments, idx_cell );
_solTimesArea = _sol[idx_cell] * _areas[idx_cell]; // reconstrucor need moments, not control volume averaged moments!
_optimizer->Solve( _alpha[idx_cell], _solTimesArea, _moments, idx_cell );
// ------- Relizablity Reconstruction Step ----
......
Supports Markdown
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