Commit 4b021da8 authored by jannick.wolters's avatar jannick.wolters
Browse files

added *XSE functions to linesource_physical

parent 072c9434
Pipeline #103292 passed with stages
in 24 minutes and 55 seconds
......@@ -36,6 +36,9 @@ class LineSource_SN_Pseudo1D_Physics : public LineSource_SN_Pseudo1D
public:
LineSource_SN_Pseudo1D_Physics( Config* settings, Mesh* mesh );
VectorVector GetScatteringXSE( const Vector& energies, const Vector& angles ) override;
Vector GetTotalXSE( const Vector& energies ) override;
};
class LineSource_PN : public ProblemBase
......
......@@ -44,10 +44,18 @@ VectorVector LineSource_SN_Pseudo1D::SetupIC() {
return psi;
}
// ---- LineSource_SN_Pseudo1D_Physics ----
LineSource_SN_Pseudo1D_Physics::LineSource_SN_Pseudo1D_Physics( Config* settings, Mesh* mesh ) : LineSource_SN_Pseudo1D( settings, mesh ) {
_physics = new Physics( settings->GetHydrogenFile(), settings->GetOxygenFile(), "../input/stopping_power.txt" );
}
VectorVector LineSource_SN_Pseudo1D_Physics::GetScatteringXSE( const Vector& energies, const Vector& angles ) {
return _physics->GetScatteringXS( energies, angles );
}
Vector LineSource_SN_Pseudo1D_Physics::GetTotalXSE( const Vector& energies ) { return _physics->GetTotalXSE( energies ); }
// ---- LineSource_PN ----
int LineSource_PN::GlobalIndex( int l, int k ) const {
......
......@@ -135,6 +135,7 @@ void CSDSNSolver::Solve() {
// Save( n );
dFlux = blaze::l2Norm( fluxNew - fluxOld );
fluxOld = fluxNew;
if( std::isinf( dFlux ) || std::isnan( dFlux ) ) break;
if( rank == 0 ) log->info( "{:03.8f} {:01.5e} {:01.5e}", _energies[n], _dE / densityMin, dFlux );
}
}
......
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