Commit 870d16b5 authored by steffen.schotthoefer's avatar steffen.schotthoefer
Browse files

small change in solverbase

parent 45c3c394
......@@ -12,7 +12,7 @@ class NewtonOptimizer : public OptimizerBase
inline ~NewtonOptimizer() {}
void Solve( Vector& lambda, Vector& u, VectorVector& moments, unsigned idx_cell ) override;
void Solve( Vector& lambda, Vector& u, VectorVector& moments, unsigned idx_cell = 0 ) override;
private:
/*! @brief: Computes gradient of objective function and stores it in grad
......
......@@ -19,7 +19,7 @@ class OptimizerBase
/*! @brief : Computes the optimal Lagrange multilpiers for the dual entropy minimization problem
* @param : Vector u = pointer to vector of given moments. // Maybe use pointer for performance?
* @return : Vector alpha = optimal lagrange multipliers. Has the same length as Vector u. */
virtual void Solve( Vector& lambda, Vector& u, VectorVector& moments, unsigned idx_cell ) = 0;
virtual void Solve( Vector& lambda, Vector& u, VectorVector& moments, unsigned idx_cell = 0 ) = 0;
protected:
EntropyBase* _entropy; /*! @brief: Class to handle entropy functional evaluations */
......
......@@ -7,6 +7,7 @@ class CSDSNSolver : public SNSolver
{
private:
std::vector<double> _dose;
std::vector<double> _density; // patient density, dim(_density) = _nCells
public:
/**
......
......@@ -20,10 +20,7 @@ class MNSolver : public Solver
/*! @brief MNSolver destructor */
~MNSolver();
/**
* @brief Solve functions runs main time loop
*/
void Solve() override;
void Solve() override; /*! @brief Solve functions runs main time loop */
void Save() const override; /*! @brief Save Output solution to VTK file */
void Save( int currEnergy ) const override; /*! @brief Save Output solution at given energy (pseudo time) to VTK file */
......
......@@ -25,7 +25,6 @@ class Solver
unsigned _nEnergies; /*! @brief number of energy/time steps, number of nodal energy values for CSD */
double _dE; /*! @brief energy/time step size */
std::vector<double> _energies; // energy groups used in the simulation [keV]
std::vector<double> _density; // patient density, dim(_density) = _nCells
std::vector<double> _s; // stopping power, dim(_s) = _nTimeSteps
std::vector<VectorVector> _Q; /*! @brief external source term */
......
......@@ -182,6 +182,8 @@ void MNSolver::Solve() {
+ _sigmaS[idx_energy][idx_cell] * _scatterMatDiag[idx_system] ); /* scattering influence */
}
}
// Update Solution
_sol = psiNew;
// pseudo time iteration output
......
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