Commit bb51d524 authored by jonas.kusch's avatar jonas.kusch
Browse files

fixed multiply defined densities

parent a22c444f
......@@ -14,7 +14,6 @@ class CSDSNSolver : public SNSolver
// Physics acess
Vector _energies; /*! @brief: energy levels for CSD, lenght = _nEnergies */
Vector _angle; /*! @brief: angles for SN */
std::vector<double> _density; /*! @brief: patient density for each grid cell */
std::vector<Matrix> _sigmaSE; /*! @brief scattering cross section for all energies*/
Vector _sigmaTE; /*! @brief total cross section for all energies*/
......
......@@ -14,12 +14,11 @@ class CSDSNSolverFP : public SNSolver
// Physics acess
Vector _energies; /*! @brief: energy levels for CSD, lenght = _nEnergies */
Vector _angle; /*! @brief: angles for SN */
std::vector<double> _density; /*! @brief: patient density for each grid cell */
std::vector<Matrix> _sigmaSE; /*! @brief scattering cross section for all energies*/
Vector _sigmaTE; /*! @brief total cross section for all energies*/
Matrix _L; /*! @brief Laplace Beltrami Matrix */
Matrix _L; /*! @brief Laplace Beltrami Matrix */
Matrix _IL; /*! @brief Laplace Beltrami Matrix */
double _alpha;
......
......@@ -14,7 +14,6 @@ class CSDSNSolverNoTrafo : public SNSolver
// Physics acess
Vector _energies; /*! @brief: energy levels for CSD, lenght = _nEnergies */
Vector _angle; /*! @brief: angles for SN */
std::vector<double> _density; /*! @brief: patient density for each grid cell */
std::vector<Matrix> _sigmaSE; /*! @brief scattering cross section for all energies*/
Vector _sigmaTE; /*! @brief total cross section for all energies*/
......
......@@ -14,7 +14,6 @@ class CSDSolverTrafoFP : public SNSolver
// Physics acess
Vector _energies; /*! @brief: energy levels for CSD, lenght = _nEnergies */
Vector _angle; /*! @brief: angles for SN */
std::vector<double> _density; /*! @brief: patient density for each grid cell */
std::vector<Matrix> _sigmaSE; /*! @brief scattering cross section for all energies*/
Vector _sigmaTE; /*! @brief total cross section for all energies*/
......
......@@ -19,7 +19,7 @@ CSDSolverTrafoFP::CSDSolverTrafoFP( Config* settings ) : SNSolver( settings ) {
_energyMax = 5e0;
// write equidistant energy grid (false) or refined grid (true)
GenerateEnergyGrid( true );
GenerateEnergyGrid( false );
// create 1D quadrature
unsigned nq = _settings->GetNQuadPoints();
......@@ -102,12 +102,13 @@ CSDSolverTrafoFP::CSDSolverTrafoFP( Config* settings ) : SNSolver( settings ) {
_scatteringKernel( p, p ) = _weights[p];
}
_density = std::vector<double>( _nCells, 1.0 );
//_density = std::vector<double>( _nCells, 1.0 );
// exit(EXIT_SUCCESS);
}
void CSDSolverTrafoFP::Solve() {
std::cout << "Solve" << std::endl;
std::cout << "Density set with size " << _density.size() << std::endl;
auto log = spdlog::get( "event" );
auto energiesOrig = _energies;
......
......@@ -7,12 +7,12 @@
#include "problems/problembase.h"
#include "quadratures/quadraturebase.h"
#include "solvers/csdsnsolver.h"
#include "solvers/csdsnsolverfp.h"
#include "solvers/csdsnsolvernotrafo.h"
#include "solvers/csdsolvertrafofp.h"
#include "solvers/mnsolver.h"
#include "solvers/pnsolver.h"
#include "solvers/snsolver.h"
#include "solvers/csdsnsolvernotrafo.h"
#include "solvers/csdsnsolverfp.h"
#include "solvers/csdsolvertrafofp.h"
Solver::Solver( Config* settings ) : _settings( settings ) {
// @TODO save parameters from settings class
......@@ -52,6 +52,11 @@ Solver::Solver( Config* settings ) : _settings( settings ) {
// Solver Output
_solverOutput.resize( _nCells ); // Currently only Flux
// store density
VectorVector cellMids = _mesh->GetCellMidPoints();
_density = _problem->GetDensity( cellMids );
std::cout << "Density set with size " << _density.size() << std::endl;
}
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