csdsolvertrafofp.h 2.42 KB
Newer Older
jonas.kusch's avatar
jonas.kusch committed
1
2
3
4
5
6
7
8
9
10
#ifndef CSDSOLVERTRAFOFP_H
#define CSDSOLVERTRAFOFP_H

#include "solvers/snsolver.h"

class Physics;

class CSDSolverTrafoFP : public SNSolver
{
  private:
11
    std::vector<double> _dose; /*!< @brief TODO */
jonas.kusch's avatar
jonas.kusch committed
12
13

    // Physics acess
14
    Vector _energies; /*!< @brief energy levels for CSD, lenght = _nEnergies */
Steffen Schotthöfer's avatar
Steffen Schotthöfer committed
15
    Vector _angle;    /*!< @brief angles for SN */
jonas.kusch's avatar
jonas.kusch committed
16

17
    std::vector<Matrix> _sigmaSE; /*!<  @brief scattering cross section for all energies*/
Steffen Schotthöfer's avatar
Steffen Schotthöfer committed
18
    Vector _sigmaTE;              /*!<  @brief total cross section for all energies*/
jonas.kusch's avatar
jonas.kusch committed
19

Steffen Schotthöfer's avatar
Steffen Schotthöfer committed
20
    Matrix _L;  /*!<  @brief Laplace Beltrami Matrix */
21
    Matrix _IL; /*!<  @brief Laplace Beltrami Matrix */
jonas.kusch's avatar
jonas.kusch committed
22

Steffen Schotthöfer's avatar
Steffen Schotthöfer committed
23
    double _alpha;  /*!<  @brief  Coefficient of GFP operators (see Olbrant 2010, Appendix B)*/
24
    double _alpha2; /*!<  @brief  Coefficient of GFP operators (see Olbrant 2010, Appendix B)*/
Steffen Schotthöfer's avatar
Steffen Schotthöfer committed
25
    double _beta;   /*!<  @brief  Coefficient of GFP operators (see Olbrant 2010, Appendix B)*/
jonas.kusch's avatar
jonas.kusch committed
26

27
    Matrix _xi; /*!<  @brief matrix of transport coefficients */
Tianbai Xiao's avatar
Tianbai Xiao committed
28
29
    Vector _xi1;
    Vector _xi2;
30

Steffen Schotthöfer's avatar
Steffen Schotthöfer committed
31
32
    unsigned _FPMethod; /*!<  @brief Encodes different ways of computing coefficients alpha, alpha2 & beta, _FPMethod == 1, 2 ,3 stand for methods
                           with increasing accuracy (see Olbrant 2010, Appendix B)*/
jonas.kusch's avatar
jonas.kusch committed
33

34
    bool _RT; /*!<  @brief radiotherapy application (on/off), if true use crosssections + stopping powers from database  */
jonas.kusch's avatar
jonas.kusch committed
35

36
37
    double _energyMin; /*!<  @brief minimal energy in energy grid*/
    double _energyMax; /*!<  @brief maximal energy in energy grid*/
jonas.kusch's avatar
jonas.kusch committed
38

jonas.kusch's avatar
jonas.kusch committed
39
40
    void GenerateEnergyGrid( bool refinement );

41
    // Helper variables
42
    Vector _energiesOrig; /*!< @brief original energy levels for CSD, lenght = _nEnergies */
Steffen Schotthöfer's avatar
Steffen Schotthöfer committed
43
    Matrix _identity;     /*!< @brief: identity matrix for FP scattering. Dim (_nq,_nq)*/
44

jonas.kusch's avatar
jonas.kusch committed
45
46
47
48
49
50
  public:
    /**
     * @brief CSDSolverTrafoFP constructor
     * @param settings stores all needed information
     */
    CSDSolverTrafoFP( Config* settings );
51
52
53
54
55
56
57
58
59
60
61
62

    virtual ~CSDSolverTrafoFP() {}

  private:
    // IO
    void PrepareVolumeOutput() override final;
    void WriteVolumeOutput( unsigned idx_pseudoTime ) override final;

    // Solver
    void FVMUpdate( unsigned idx_energy ) override final;
    void FluxUpdate() override final;
    void IterPreprocessing( unsigned idx_pseudotime ) override final;
jonas.kusch's avatar
jonas.kusch committed
63
    void virtual IterPostprocessing( unsigned idx_pseudotime ) override final;
64
    void SolverPreprocessing() override final;
jonas.kusch's avatar
jonas.kusch committed
65
66
};

jonas.kusch's avatar
jonas.kusch committed
67
#endif    // CSDSOLVERTRAFOFP_H