Commit 38ceba85 authored by Steffen Schotthöfer's avatar Steffen Schotthöfer
Browse files

update

parent 56bde3c3
Pipeline #142975 failed with stage
in 5 minutes and 16 seconds
......@@ -53,6 +53,8 @@ inline void PrintVectorVector( const VectorVector vectorIn ) {
}
}
inline void PrintMatrix( const Matrix mat ) { std::cout << mat << std::endl; }
/*!
* @brief utility function for returning the last number in a string
* @param str string to be checked
......
......@@ -8,7 +8,7 @@
#include "problems/icru.h"
#include "problems/problembase.h"
#include "solvers/csdpn_starmap_constants.h"
#include "toolboxes/textprocessingtoolbox.h"
// externals
#include "spdlog/spdlog.h"
#include <mpi.h>
......@@ -52,7 +52,11 @@ CSDPNSolver::CSDPNSolver( Config* settings ) : PNSolver( settings ) {
}
}
printf( "%d", sigma_ref.rows() );
// printf( "%d", sigma_ref.rows() );
// std::cout << size( sigma_ref ) << std::endl;
// std::cout << sigma_ref.rows() << std::endl;
// std::cout << _energies.size() << std::endl;
Matrix sigma_t( _energies.size(), sigma_ref.rows() );
for( unsigned idx_degree = 0; idx_degree < _polyDegreeBasis; ++idx_degree ) {
......@@ -61,6 +65,12 @@ CSDPNSolver::CSDPNSolver( Config* settings ) : PNSolver( settings ) {
blaze::column( sigma_t, idx_degree ) = interp( _energies );
}
// std::cout << "here\n";
// std::cout << size( sigma_t ) << std::endl;
_sigmaT = sigma_t;
TextProcessingToolbox::PrintMatrix( sigma_t );
Interpolation interpS( E_tab, S_tab );
_s = interpS( _energies );
}
......@@ -145,7 +155,7 @@ void CSDPNSolver::FVMUpdate( unsigned idx_energy ) {
_solNew[idx_cell][idx_sys] = _sol[idx_cell][idx_sys] - ( _dE / _areas[idx_cell] ) * _solNew[idx_cell][idx_sys] /* cell averaged flux */
- _dE * _sol[idx_cell][idx_sys] *
( _sigmaT[idx_energy][idx_cell] /* absorbtion influence */
+ _sigmaS[idx_energy][idx_cell] * _scatterMatDiag[idx_sys] ); /* scattering influence */
- _sigmaS[idx_energy][idx_cell] * _scatterMatDiag[idx_sys] ); /* scattering influence */
}
// Source Term
_solNew[idx_cell][0] += _dE * _Q[0][idx_cell][0];
......
......@@ -162,8 +162,9 @@ void PNSolver::FVMUpdate( unsigned idx_energy ) {
for( unsigned idx_sys = 0; idx_sys < _nSystem; idx_sys++ ) {
_solNew[idx_cell][idx_sys] = _sol[idx_cell][idx_sys] - ( _dE / _areas[idx_cell] ) * _solNew[idx_cell][idx_sys] /* cell averaged flux */
- _dE * _sol[idx_cell][idx_sys] *
( _sigmaT[idx_energy][idx_cell] /* absorbtion influence */
+ _sigmaS[idx_energy][idx_cell] * _scatterMatDiag[idx_sys] ); /* scattering influence */
( _sigmaS[idx_energy][idx_cell] * _scatterMatDiag[idx_sys] /* scattering influence */
+ _sigmaT[idx_energy][idx_cell] );
/* total xs influence */ // Vorzeichenfehler!
}
// Source Term
_solNew[idx_cell][0] += _dE * _Q[0][idx_cell][0];
......@@ -345,7 +346,7 @@ void PNSolver::ComputeFluxComponents() {
void PNSolver::ComputeScatterMatrix() {
// --- Isotropic ---
_scatterMatDiag[0] = -1.0;
_scatterMatDiag[0] = -1;
for( unsigned idx_diag = 1; idx_diag < _nSystem; idx_diag++ ) {
_scatterMatDiag[idx_diag] = 0.0;
}
......
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