Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KiT-RT
KiT-RT
Commits
864dc986
Commit
864dc986
authored
Feb 26, 2021
by
Tianbai Xiao
Browse files
Merge branch 'develop' of
https://git.scc.kit.edu/rtsn/rtsn
into develop
Former-commit-id:
7644c7e0
parents
3930d6e9
39ae30c2
Changes
13
Hide whitespace changes
Inline
Side-by-side
code/include/solvers/mnsolver.h
View file @
864dc986
...
...
@@ -7,7 +7,7 @@ class EntropyBase;
class
SphericalBase
;
class
OptimizerBase
;
class
MNSolver
:
public
Solver
class
MNSolver
:
public
Solver
Base
{
public:
/**
...
...
code/include/solvers/pnsolver.h
View file @
864dc986
...
...
@@ -3,7 +3,7 @@
#include
"solvers/solverbase.h"
class
PNSolver
:
public
Solver
class
PNSolver
:
public
Solver
Base
{
public:
/*! @brief PNSolver constructor
...
...
code/include/solvers/snsolver.h
View file @
864dc986
...
...
@@ -3,7 +3,7 @@
#include
"solvers/solverbase.h"
class
SNSolver
:
public
Solver
class
SNSolver
:
public
Solver
Base
{
protected:
Matrix
_scatteringKernel
;
/*! @brief scattering kernel for the quadrature */
...
...
code/include/solvers/solverbase.h
View file @
864dc986
...
...
@@ -16,90 +16,90 @@ class ProblemBase;
class
QuadratureBase
;
class
Reconstructor
;
class
Solver
/*! @brief Base class for all solvers. */
class
SolverBase
{
protected:
Mesh
*
_mesh
;
/*! @brief mesh object for writing out information */
NumericalFlux
*
_g
;
/*! @brief class for numerical flux */
Config
*
_settings
;
/*! @brief config class for global information */
ProblemBase
*
_problem
;
/*! @brief problem class for initial conditions */
NumericalFlux
*
_g
;
/*!< @brief class for numerical flux */
Config
*
_settings
;
/*!< @brief config class for global information */
ProblemBase
*
_problem
;
/*!< @brief problem class for initial conditions */
// --------- Often used variables of member classes for faster access ----
unsigned
_nEnergies
;
/*! @brief number of energysteps, number of nodal energy values for CSD */
unsigned
_maxIter
;
/*! @brief number of time steps, for non CSD, this equals _nEnergies, for _csd, _maxIter = _nEnergies-1*/
// Time or Energystepping
unsigned
_maxIter
;
/*!< @brief number of time steps, for non CSD, this equals _nEnergies, for _csd, _maxIter = _nEnergies-1*/
unsigned
_nEnergies
;
/*!< @brief number of energysteps, number of nodal energy values for CSD */
double
_dE
;
/*!< @brief energy/time step size */
Vector
_energies
;
/*!< @brief energy groups used in the simulation [keV] */
double
_dE
;
/*! @brief energy/time step size */
Vector
_energies
;
// energy groups used in the simul
ation
[keV]
std
::
vector
<
double
>
_density
;
// patient density, dim(_density) = _nC
ells
Vector
_s
;
// stopping power, dim(_s) = _nTimeSteps (only for csdsolver)
std
::
vector
<
VectorVector
>
_Q
;
/*!
@brief
external source term
*/
VectorVector
_sigmaS
;
/*!
@brief
scattering cross section for all energies. len: _nEnergies x numCells
*/
VectorVector
_sigmaT
;
/*!
@brief
total cross section f
or
a
ll
energies. len: _nEnergies x num
Cell
s
*/
// Mesh related members
Mesh
*
_mesh
;
/*!< @brief mesh object for writing out inform
ation
*/
unsigned
_nCells
;
/*!< @brief number of spatial c
ells
*/
std
::
vector
<
BOUNDARY_TYPE
>
_boundaryCells
;
/*!< @brief boundary type for all cells, dim(_boundary) = (_NCells) */
std
::
vector
<
double
>
_areas
;
/*!
<
@brief
surface area of all spatial cells, dim(_areas) = _NCells
*/
std
::
vector
<
std
::
vector
<
Vector
>>
_normals
;
/*!
<
@brief
edge normals multiplied by edge length, dim(_normals) = (_NCells,nEdgesPerCell,spatialDim)
*/
std
::
vector
<
std
::
vector
<
unsigned
>>
_neighbors
;
/*!
<
@brief
edge neighb
or
ce
ll
ids, dim(_neighbors) = (_NCells,nEdgesPer
Cell
)
*/
// quadrature related numbers
QuadratureBase
*
_quadrature
;
/*! @brief quadrature to create members below */
unsigned
_nq
;
/*! @brief number of quadrature points */
// slope related params
Reconstructor
*
_reconstructor
;
/*!< @brief reconstructor object for high-order scheme */
unsigned
_reconsOrder
;
/*!< @brief reconstruction order (current: 1 & 2) */
VectorVector
_psiDx
;
/*!< @brief slope of solutions in X direction */
VectorVector
_psiDy
;
/*!< @brief slope of solutions in Y direction */
VectorVector
_cellMidPoints
;
/*!< @brief middle point locations of elements */
std
::
vector
<
std
::
vector
<
Vector
>>
_interfaceMidPoints
;
/*!< @brief middle point locations of edges */
// VectorVector _quadPoints;
/*!
@brief
quadrature points, dim(_quadPoints
) =
(
_n
System,spatialDim
) */
//
Vector _
weight
s; /*!
@brief
quadrature weights, dim(_weights) = (_NCells
) */
std
::
vector
<
double
>
_density
;
/*!
<
@brief
patient density, dim(_density
) = _n
Cells (only for csdsolver
) */
Vector
_s
;
/*!
<
@brief
stopping power, dim(_s) = _maxIter (only for csdsolver
) */
// Mesh related members
unsigned
_nCells
;
/*! @brief number of spatial cells */
std
::
vector
<
BOUNDARY_TYPE
>
_boundaryCells
;
/*! boundary type for all cells, dim(_boundary) = (_NCells) */
std
::
vector
<
double
>
_areas
;
/*! @brief surface area of all spatial cells, dim(_areas) = _NCells */
/*! @brief edge normals multiplied by edge length, dim(_normals) = (_NCells,nEdgesPerCell,spatialDim) */
std
::
vector
<
std
::
vector
<
Vector
>>
_normals
;
/*! @brief edge neighbor cell ids, dim(_neighbors) = (_NCells,nEdgesPerCell) */
std
::
vector
<
std
::
vector
<
unsigned
>>
_neighbors
;
std
::
vector
<
VectorVector
>
_Q
;
/*!< @brief external source term. Dim(_Q) = _maxIter x (_nCells x _nSystem) */
VectorVector
_sigmaS
;
/*!< @brief scattering cross section for all energies. len: _nEnergies x _nCells */
VectorVector
_sigmaT
;
/*!< @brief total cross section for all energies. len: _nEnergies x _nCells*/
// slope related params
Reconstructor
*
_reconstructor
;
/*! @brief reconstructor object for high-order scheme */
unsigned
_reconsOrder
;
/*! @brief reconstruction order (current: 1 & 2) */
VectorVector
_psiDx
;
/*! @brief slope of solutions in X direction */
VectorVector
_psiDy
;
/*! @brief slope of solutions in Y direction */
VectorVector
_cellMidPoints
;
/*! @brief middle point locations of elements */
std
::
vector
<
std
::
vector
<
Vector
>>
_interfaceMidPoints
;
/*! @brief middle point locations of edges */
// quadrature related numbers
QuadratureBase
*
_quadrature
;
/*!< @brief pointer to quadrature class */
unsigned
_nq
;
/*!< @brief number of quadrature points */
// Solution related members
VectorVector
_sol
;
/*! @brief solution of the PDE, e.g. angular flux or moments */
std
::
vector
<
double
>
_solverOutput
;
/*! @brief LEGACY: Outputfield for solver ==> Will be replaced by _outputFields in the near future */
VectorVector
_sol
;
/*!< @brief solution of the PDE, e.g. angular flux or moments */
VectorVector
_solNew
;
/*!< @brief VectorVector to store the new flux and later the new solution per iteration */
Vector
_fluxNew
;
/*!< @brief Vector to store the new Flux. Dim _nCells */
Vector
_flux
;
/*!< @brief Vector to store the old Flux. Dim _nCells*/
std
::
vector
<
double
>
_solverOutput
;
/*!< @brief LEGACY: Outputfield for solver ==> Will be replaced by _outputFields in the near future */
// Output related members
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>>>
_outputFields
;
/*! @brief: Solver Output: dimensions (GroupID,FieldID,CellID).*/
std
::
vector
<
std
::
vector
<
std
::
string
>>
_outputFieldNames
;
/*! @brief: Names of the outputFields: dimensions (GroupID,FieldID) */
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>>>
_outputFields
;
/*!
<
@brief: Solver Output: dimensions (GroupID,FieldID,CellID).*/
std
::
vector
<
std
::
vector
<
std
::
string
>>
_outputFieldNames
;
/*!
<
@brief: Names of the outputFields: dimensions (GroupID,FieldID) */
// we will have to add a further dimension for quadPoints and weights once we start with multilevel SN
// Output related members
std
::
vector
<
double
>
_screenOutputFields
;
/*! @brief: Solver Output: dimensions (FieldID). */
std
::
vector
<
std
::
string
>
_screenOutputFieldNames
;
/*! @brief: Names of the outputFields: dimensions (FieldID) */
std
::
vector
<
double
>
_screenOutputFields
;
/*!
<
@brief: Solver Output: dimensions (FieldID). */
std
::
vector
<
std
::
string
>
_screenOutputFieldNames
;
/*!
<
@brief: Names of the outputFields: dimensions (FieldID) */
// Output related members
std
::
vector
<
double
>
_historyOutputFields
;
/*! @brief: Solver Output: dimensions (FieldID). */
std
::
vector
<
std
::
string
>
_historyOutputFieldNames
;
/*! @brief: Names of the outputFields: dimensions (FieldID) */
// Internal Members
VectorVector
_solNew
;
/*! @brief: VectorVector to store the new flux and later the new solution per iteration */
// REPLACES psiNEW
Vector
_fluxNew
;
/*! @brief: Vector to store the new Flux. Dim _nCells */
Vector
_flux
;
/*! @brief: Vector to store the old Flux. Dim _nCells*/
std
::
vector
<
double
>
_historyOutputFields
;
/*!< @brief: Solver Output: dimensions (FieldID). */
std
::
vector
<
std
::
string
>
_historyOutputFieldNames
;
/*!< @brief: Names of the outputFields: dimensions (FieldID) */
// ---- Member functions ----
// Solver
/*! @brief Performs preprocessing steps before the pseudo time iteration is started
*/
/*! @brief Performs preprocessing steps before the pseudo time iteration is started*/
virtual
void
SolverPreprocessing
();
/*! @brief Performs preprocessing for the current solver iteration */
virtual
void
IterPreprocessing
(
unsigned
idx_pseudotime
)
=
0
;
/*! @brief Performs preprocessing for the current solver iteration
@param idx_iter : current (peudo) time iteration */
virtual
void
IterPreprocessing
(
unsigned
idx_iter
)
=
0
;
/*! @brief Performs postprocessing for the current solver iteration */
virtual
void
IterPostprocessing
(
unsigned
idx_pseudotime
)
=
0
;
/*! @brief Constructs the flux update for the current iteration and stores it in psiNew*/
virtual
void
FluxUpdate
()
=
0
;
/*! @brief Computes the finite Volume update step for the current iteration */
virtual
void
FVMUpdate
(
unsigned
idx_energy
)
=
0
;
/*! @brief Computes the finite Volume update step for the current iteration
@param idx_iter : current (peudo) time iteration */
virtual
void
FVMUpdate
(
unsigned
idx_iter
)
=
0
;
// Helper
/*! @brief ComputeTimeStep calculates the maximal stable time step */
/*! @brief ComputeTimeStep calculates the maximal stable time step using the cfl number
@param used cfl number */
double
ComputeTimeStep
(
double
cfl
)
const
;
/*! @brief: Computes the flux of the solution to check conservation properties */
virtual
void
ComputeRadFlux
()
=
0
;
...
...
@@ -107,23 +107,29 @@ class Solver
// IO
/*! @brief Initializes the output groups and fields of this solver and names the fields */
virtual
void
PrepareVolumeOutput
()
=
0
;
/*! @brief Function that prepares VTK export and csv export of the current solver iteration */
virtual
void
WriteVolumeOutput
(
unsigned
iteration
)
=
0
;
/*! @brief Function that prepares VTK export and csv export of the current solver iteration
@param idx_iter : current (pseudo) time iteration */
virtual
void
WriteVolumeOutput
(
unsigned
idx_iter
)
=
0
;
/*! @brief Save Output solution at given energy (pseudo time) to VTK file. Write frequency is given by
option VOLUME_OUTPUT_FREQUENCY. Always prints last iteration without iteration affix.*/
void
PrintVolumeOutput
(
int
currEnergy
)
const
;
option VOLUME_OUTPUT_FREQUENCY. Always prints last iteration without iteration affix.
@param idx_iter : current (pseudo) time iteration */
void
PrintVolumeOutput
(
int
idx_iter
)
const
;
/*! @brief: Initialized the output fields and their Names for the screenoutput */
void
PrepareScreenOutput
();
/*! @brief Function that writes screen and history output fields */
void
WriteScalarOutput
(
unsigned
iteration
);
/*! @brief Function that writes screen and history output fields
@param idx_iter : current (pseudo) time iteration */
void
WriteScalarOutput
(
unsigned
idx_iter
);
/*! @brief Prints ScreenOutputFields to Screen and to logger. Write frequency is given by
option SCREEN_OUTPUT_FREQUENCY. Always prints last iteration. */
void
PrintScreenOutput
(
unsigned
iteration
);
option SCREEN_OUTPUT_FREQUENCY. Always prints last iteration.
@param idx_iter : current (pseudo) time iteration */
void
PrintScreenOutput
(
unsigned
idx_iter
);
/*! @brief: Initialized the historyOutputFields and their Names for history output. Write frequency is given by
option HISTORY_OUTPUT_FREQUENCY. Always prints last iteration. */
void
PrepareHistoryOutput
();
/*! @brief Prints HistoryOutputFields to logger */
void
PrintHistoryOutput
(
unsigned
iteration
);
/*! @brief Prints HistoryOutputFields to logger
@param idx_iter : current (pseudo) time iteration */
void
PrintHistoryOutput
(
unsigned
idx_iter
);
/*! @brief Pre Solver Screen and Logger Output */
void
DrawPreSolverOutput
();
/*! @brief Post Solver Screen and Logger Output */
...
...
@@ -131,17 +137,17 @@ class Solver
public:
/*! @brief Solver constructor
* @param settings stores all needed information */
Solver
(
Config
*
settings
);
* @param settings
:config class that
stores all needed
config
information */
Solver
Base
(
Config
*
settings
);
virtual
~
Solver
();
virtual
~
Solver
Base
();
/*! @brief Create constructor
* @param settings stores all needed information
* @return pointer to Solver */
static
Solver
*
Create
(
Config
*
settings
);
* @param settings
:config class that
stores all needed
config
information
* @return pointer to Solver
Base
*/
static
Solver
Base
*
Create
(
Config
*
settings
);
/*! @brief Solve functions runs main
time loop
*/
/*! @brief Solve functions runs main
iteration loop. Components of the solve loop are pure virtual and subclassed by the child solvers.
*/
virtual
void
Solve
();
/*! @brief Save Output solution to VTK file */
...
...
code/src/main.cpp
View file @
864dc986
...
...
@@ -48,7 +48,7 @@ int main( int argc, char** argv ) {
}
else
{
// Build solver
Solver
*
solver
=
Solver
::
Create
(
config
);
Solver
Base
*
solver
=
Solver
Base
::
Create
(
config
);
// Run solver and export
solver
->
Solve
();
...
...
code/src/solvers/mnsolver.cpp
View file @
864dc986
...
...
@@ -17,7 +17,7 @@
#include
<iostream>
MNSolver
::
MNSolver
(
Config
*
settings
)
:
Solver
(
settings
)
{
MNSolver
::
MNSolver
(
Config
*
settings
)
:
Solver
Base
(
settings
)
{
_LMaxDegree
=
settings
->
GetMaxMomentDegree
();
_basis
=
SphericalBase
::
Create
(
_settings
);
...
...
code/src/solvers/pnsolver.cpp
View file @
864dc986
...
...
@@ -10,7 +10,7 @@
#include
"spdlog/spdlog.h"
#include
<mpi.h>
PNSolver
::
PNSolver
(
Config
*
settings
)
:
Solver
(
settings
)
{
PNSolver
::
PNSolver
(
Config
*
settings
)
:
Solver
Base
(
settings
)
{
_LMaxDegree
=
settings
->
GetMaxMomentDegree
();
_nTotalEntries
=
GlobalIndex
(
int
(
_LMaxDegree
),
int
(
_LMaxDegree
)
)
+
1
;
...
...
code/src/solvers/snsolver.cpp
View file @
864dc986
...
...
@@ -13,7 +13,7 @@
#include
<iostream>
#include
<mpi.h>
SNSolver
::
SNSolver
(
Config
*
settings
)
:
Solver
(
settings
)
{
SNSolver
::
SNSolver
(
Config
*
settings
)
:
Solver
Base
(
settings
)
{
_quadPoints
=
_quadrature
->
GetPoints
();
_weights
=
_quadrature
->
GetWeights
();
...
...
code/src/solvers/solverbase.cpp
View file @
864dc986
...
...
@@ -18,7 +18,7 @@
#include
<mpi.h>
Solver
::
Solver
(
Config
*
settings
)
{
Solver
Base
::
Solver
Base
(
Config
*
settings
)
{
_settings
=
settings
;
// @TODO save parameters from settings class
...
...
@@ -94,13 +94,13 @@ Solver::Solver( Config* settings ) {
//_density = std::vector( _mesh->GetCellMidPoints().size(), 0.0 );
}
Solver
::~
Solver
()
{
Solver
Base
::~
Solver
Base
()
{
delete
_quadrature
;
delete
_mesh
;
delete
_problem
;
}
Solver
*
Solver
::
Create
(
Config
*
settings
)
{
Solver
Base
*
Solver
Base
::
Create
(
Config
*
settings
)
{
switch
(
settings
->
GetSolverName
()
)
{
case
SN_SOLVER
:
return
new
SNSolver
(
settings
);
...
...
@@ -116,7 +116,7 @@ Solver* Solver::Create( Config* settings ) {
return
nullptr
;
// This code is never reached. Just to disable compiler warnings.
}
void
Solver
::
Solve
()
{
void
Solver
Base
::
Solve
()
{
// --- Preprocessing ---
...
...
@@ -161,9 +161,9 @@ void Solver::Solve() {
DrawPostSolverOutput
();
}
void
Solver
::
PrintVolumeOutput
()
const
{
ExportVTK
(
_settings
->
GetOutputFile
(),
_outputFields
,
_outputFieldNames
,
_mesh
);
}
void
Solver
Base
::
PrintVolumeOutput
()
const
{
ExportVTK
(
_settings
->
GetOutputFile
(),
_outputFields
,
_outputFieldNames
,
_mesh
);
}
void
Solver
::
PrintVolumeOutput
(
int
currEnergy
)
const
{
void
Solver
Base
::
PrintVolumeOutput
(
int
currEnergy
)
const
{
if
(
_settings
->
GetVolumeOutputFrequency
()
!=
0
&&
currEnergy
%
(
unsigned
)
_settings
->
GetVolumeOutputFrequency
()
==
0
)
{
ExportVTK
(
_settings
->
GetOutputFile
()
+
"_"
+
std
::
to_string
(
currEnergy
),
_outputFields
,
_outputFieldNames
,
_mesh
);
}
...
...
@@ -173,7 +173,7 @@ void Solver::PrintVolumeOutput( int currEnergy ) const {
}
// --- Helper ---
double
Solver
::
ComputeTimeStep
(
double
cfl
)
const
{
double
Solver
Base
::
ComputeTimeStep
(
double
cfl
)
const
{
double
maxEdge
=
-
1.0
;
for
(
unsigned
j
=
0
;
j
<
_nCells
;
j
++
)
{
for
(
unsigned
l
=
0
;
l
<
_normals
[
j
].
size
();
l
++
)
{
...
...
@@ -185,7 +185,7 @@ double Solver::ComputeTimeStep( double cfl ) const {
}
// --- IO ----
void
Solver
::
PrepareScreenOutput
()
{
void
Solver
Base
::
PrepareScreenOutput
()
{
unsigned
nFields
=
(
unsigned
)
_settings
->
GetNScreenOutput
();
_screenOutputFieldNames
.
resize
(
nFields
);
...
...
@@ -212,7 +212,7 @@ void Solver::PrepareScreenOutput() {
}
}
void
Solver
::
WriteScalarOutput
(
unsigned
iteration
)
{
void
Solver
Base
::
WriteScalarOutput
(
unsigned
iteration
)
{
unsigned
nFields
=
(
unsigned
)
_settings
->
GetNScreenOutput
();
double
mass
=
0.0
;
...
...
@@ -251,7 +251,6 @@ void Solver::WriteScalarOutput( unsigned iteration ) {
_screenOutputFields
[
idx_field
]
=
1
;
}
break
;
default:
ErrorMessages
::
Error
(
"Screen output group not defined!"
,
CURRENT_FUNCTION
);
break
;
}
}
...
...
@@ -314,7 +313,7 @@ void Solver::WriteScalarOutput( unsigned iteration ) {
}
}
void
Solver
::
PrintScreenOutput
(
unsigned
iteration
)
{
void
Solver
Base
::
PrintScreenOutput
(
unsigned
iteration
)
{
int
rank
;
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
auto
log
=
spdlog
::
get
(
"event"
);
...
...
@@ -366,7 +365,7 @@ void Solver::PrintScreenOutput( unsigned iteration ) {
}
}
void
Solver
::
PrepareHistoryOutput
()
{
void
Solver
Base
::
PrepareHistoryOutput
()
{
unsigned
nFields
=
(
unsigned
)
_settings
->
GetNHistoryOutput
();
_historyOutputFieldNames
.
resize
(
nFields
);
...
...
@@ -393,7 +392,7 @@ void Solver::PrepareHistoryOutput() {
}
}
void
Solver
::
PrintHistoryOutput
(
unsigned
iteration
)
{
void
Solver
Base
::
PrintHistoryOutput
(
unsigned
iteration
)
{
int
rank
;
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
auto
log
=
spdlog
::
get
(
"tabular"
);
...
...
@@ -418,7 +417,7 @@ void Solver::PrintHistoryOutput( unsigned iteration ) {
}
}
void
Solver
::
DrawPreSolverOutput
()
{
void
Solver
Base
::
DrawPreSolverOutput
()
{
// MPI
int
rank
;
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
...
...
@@ -463,7 +462,7 @@ void Solver::DrawPreSolverOutput() {
}
}
void
Solver
::
DrawPostSolverOutput
()
{
void
Solver
Base
::
DrawPostSolverOutput
()
{
// MPI
int
rank
;
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
...
...
@@ -497,4 +496,4 @@ void Solver::DrawPostSolverOutput() {
}
}
void
Solver
::
SolverPreprocessing
()
{}
void
Solver
Base
::
SolverPreprocessing
()
{}
code/tests/test_cases.cpp
View file @
864dc986
...
...
@@ -36,8 +36,8 @@ TEST_CASE( "SN_SOLVER", "[validation_tests]" ) {
SECTION
(
"checkerboard"
)
{
std
::
string
config_file_name
=
std
::
string
(
TESTS_PATH
)
+
sn_fileDir
+
"checkerboard_SN.cfg"
;
Config
*
config
=
new
Config
(
config_file_name
);
Solver
*
solver
=
Solver
::
Create
(
config
);
Config
*
config
=
new
Config
(
config_file_name
);
Solver
Base
*
solver
=
Solver
Base
::
Create
(
config
);
solver
->
Solve
();
solver
->
PrintVolumeOutput
();
...
...
@@ -57,8 +57,8 @@ TEST_CASE( "SN_SOLVER", "[validation_tests]" ) {
SECTION
(
"linesource"
)
{
std
::
string
config_file_name
=
std
::
string
(
TESTS_PATH
)
+
sn_fileDir
+
"linesource_SN.cfg"
;
Config
*
config
=
new
Config
(
config_file_name
);
Solver
*
solver
=
Solver
::
Create
(
config
);
Config
*
config
=
new
Config
(
config_file_name
);
Solver
Base
*
solver
=
Solver
Base
::
Create
(
config
);
solver
->
Solve
();
solver
->
PrintVolumeOutput
();
...
...
@@ -80,8 +80,8 @@ TEST_CASE( "PN_SOLVER", "[validation_tests]" ) {
SECTION
(
"checkerboard"
)
{
std
::
string
config_file_name
=
std
::
string
(
TESTS_PATH
)
+
pn_fileDir
+
"checkerboard_PN.cfg"
;
Config
*
config
=
new
Config
(
config_file_name
);
Solver
*
solver
=
Solver
::
Create
(
config
);
Config
*
config
=
new
Config
(
config_file_name
);
Solver
Base
*
solver
=
Solver
Base
::
Create
(
config
);
solver
->
Solve
();
solver
->
PrintVolumeOutput
();
...
...
@@ -100,8 +100,8 @@ TEST_CASE( "PN_SOLVER", "[validation_tests]" ) {
SECTION
(
"linesource"
)
{
std
::
string
config_file_name
=
std
::
string
(
TESTS_PATH
)
+
pn_fileDir
+
"linesource_PN.cfg"
;
Config
*
config
=
new
Config
(
config_file_name
);
Solver
*
solver
=
Solver
::
Create
(
config
);
Config
*
config
=
new
Config
(
config_file_name
);
Solver
Base
*
solver
=
Solver
Base
::
Create
(
config
);
solver
->
Solve
();
solver
->
PrintVolumeOutput
();
...
...
@@ -125,8 +125,8 @@ TEST_CASE( "MN_SOLVER", "[validation_tests]" ) {
SECTION
(
"checkerboard"
)
{
std
::
string
config_file_name
=
std
::
string
(
TESTS_PATH
)
+
mn_fileDir
+
"checkerboard_MN.cfg"
;
Config
*
config
=
new
Config
(
config_file_name
);
Solver
*
solver
=
Solver
::
Create
(
config
);
Config
*
config
=
new
Config
(
config_file_name
);
Solver
Base
*
solver
=
Solver
Base
::
Create
(
config
);
solver
->
Solve
();
solver
->
PrintVolumeOutput
();
...
...
@@ -149,8 +149,8 @@ TEST_CASE( "MN_SOLVER", "[validation_tests]" ) {
{
std
::
string
config_file_name
=
std
::
string
(
TESTS_PATH
)
+
mn_fileDir
+
"linesource_MN_Quad.cfg"
;
Config
*
config
=
new
Config
(
config_file_name
);
Solver
*
solver
=
Solver
::
Create
(
config
);
Config
*
config
=
new
Config
(
config_file_name
);
Solver
Base
*
solver
=
Solver
Base
::
Create
(
config
);
solver
->
Solve
();
solver
->
PrintVolumeOutput
();
...
...
@@ -170,8 +170,8 @@ TEST_CASE( "MN_SOLVER", "[validation_tests]" ) {
{
// --- Maxwell Boltzmann Entropy ---
std
::
string
config_file_name
=
std
::
string
(
TESTS_PATH
)
+
mn_fileDir
+
"linesource_MN_MB.cfg"
;
Config
*
config
=
new
Config
(
config_file_name
);
Solver
*
solver
=
Solver
::
Create
(
config
);
Config
*
config
=
new
Config
(
config_file_name
);
Solver
Base
*
solver
=
Solver
Base
::
Create
(
config
);
solver
->
Solve
();
solver
->
PrintVolumeOutput
();
...
...
@@ -197,7 +197,7 @@ TEST_CASE( "CSD_SN_FP_SOLVER", "[validation_tests]" ) {
std::string config_file_name = std::string( TESTS_PATH ) + csd_sn_fileDir + "waterphantom_1D.cfg";
Config* config = new Config( config_file_name );
Solver* solver = Solver::Create( config );
Solver
Base
* solver = Solver
Base
::Create( config );
solver->Solve();
solver->PrintVolumeOutput();
auto test = readVTKFile( std::string( TESTS_PATH ) + "result/rtsn_test_waterphantom_1D_CSD_FP.vtk" );
...
...
@@ -220,7 +220,7 @@ TEST_CASE( "CSD_SN_FP_2D_SOLVER", "[validation_tests]" ) {
std::string config_file_name = std::string( TESTS_PATH ) + csd_sn_fileDir + "waterphantom_2D.cfg";
Config* config = new Config( config_file_name );
Solver* solver = Solver::Create( config );
Solver
Base
* solver = Solver
Base
::Create( config );
solver->Solve();
solver->PrintVolumeOutput();
auto test = readVTKFile( std::string( TESTS_PATH ) + "result/rtsn_test_waterphantom_2D_CSD_FP.vtk" );
...
...
@@ -243,7 +243,7 @@ TEST_CASE( "CSD_SN_FP_SH_2D_SOLVER", "[validation_tests]" ) {
std::string config_file_name = std::string( TESTS_PATH ) + csd_sn_fileDir + "waterphantom_2D_sh.cfg";
Config* config = new Config( config_file_name );
Solver* solver = Solver::Create( config );
Solver
Base
* solver = Solver
Base
::Create( config );
solver->Solve();
solver->PrintVolumeOutput();
// solver->Save();
...
...
@@ -281,8 +281,8 @@ TEST_CASE( "screen_output", "[output]" ) {
std
::
string
historyLoggerReference
=
std
::
string
(
TESTS_PATH
)
+
out_fileDir
+
"validate_logger_csv_reference"
;
std
::
string
historyLogger
=
std
::
string
(
TESTS_PATH
)
+
"result/logs/validate_logger_output_csv"
;
Config
*
config
=
new
Config
(
config_file_name
);
Solver
*
solver
=
Solver
::
Create
(
config
);
Config
*
config
=
new
Config
(
config_file_name
);
Solver
Base
*
solver
=
Solver
Base
::
Create
(
config
);
solver
->
Solve
();
// Force Logger to flush
...
...
doc/Doxyfile.in
View file @
864dc986
...
...
@@ -482,19 +482,19 @@ NUM_PROC_THREADS = 1
# normally produced when WARNINGS is set to YES.
# The default value is: NO.
EXTRACT_ALL =
NO
EXTRACT_ALL =
YES
# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
# be included in the documentation.
# The default value is: NO.
EXTRACT_PRIVATE =
NO
EXTRACT_PRIVATE =
YES
# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
# methods of a class will be included in the documentation.
# The default value is: NO.
EXTRACT_PRIV_VIRTUAL =
NO
EXTRACT_PRIV_VIRTUAL =
YES
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
# scope will be included in the documentation.
...
...
doc/solvers/index.rst
View file @
864dc986
...
...
@@ -4,7 +4,7 @@ Solvers
.. toctree::
:maxdepth: 1
solver
solver
base
csdsnsolver
csdsnsolverfp
csdsnsolvernotrafo
...
...
doc/solvers/solver.rst
deleted
100644 → 0
View file @
3930d6e9
Solver
==========
.. doxygenclass:: Solver
:members:
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment