diff --git a/README.md b/README.md index 8a49b05c..1432b79b 100644 --- a/README.md +++ b/README.md @@ -140,13 +140,12 @@ ldconfig /usr/local/lib ``` ## Cite ``` -@article{kitrt, - author = {Schotthöfer, Steffen and Kusch, Jonas and Stammer, Pia and Wolters, Jannick and Xiao, Tianbai }, - title = {KiT-RT: Kinetic Transport for Radio Therapy Solver}, - year = {2022}, - publisher = {GitHub}, - journal = {GitHub repository}, - howpublished = {\url{https://github.com/CSMMLab/KiT-RT}}, - commit = {b9943e1aae6a54c2c3d2033d168de1ab7912ae75} +@misc{kitrt2022, + title={KiT-RT: An extendable framework for radiative transfer and therapy}, + author={Jonas Kusch and Steffen Schotthöfer and Pia Stammer and Jannick Wolters and Tianbai Xiao}, + year={2022}, + eprint={2205.08417}, + archivePrefix={arXiv}, + primaryClass={physics.med-ph} } ``` diff --git a/examples/configs/DataGeneratorRegression2D.cfg b/examples/configs/DataGeneratorRegression2D.cfg index dc1e71a2..b1a3d5db 100644 --- a/examples/configs/DataGeneratorRegression2D.cfg +++ b/examples/configs/DataGeneratorRegression2D.cfg @@ -1,7 +1,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Data Generator for % % Neural Entropy Closure % -% Author % +% Author % % Date 17.12.2020 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % @@ -11,16 +11,22 @@ SAMPLER_NAME = REGRESSION_SAMPLER TRAINING_SET_SIZE = 10000 SIZE_BY_DIMENSION = NO MAX_VALUE_FIRST_MOMENT = 1 -SPATIAL_DIM = 2 -MAX_MOMENT_SOLVER = 1 -REALIZABLE_SET_EPSILON_U1 = 0.08 -REALIZABLE_SET_EPSILON_U0 = 0.08 + NORMALIZED_SAMPLING = YES ALPHA_SAMPLING = YES UNIFORM_SAMPLING = NO -ALPHA_SAMPLING_BOUND = 30 -MIN_EIGENVALUE_THRESHOLD = 1e-9 -REALIZABILITY_RECONSTRUCTION = NO + + +%Configure the spatial dimension of the closure here +SPATIAL_DIM = 2 + +%Configure the maximum moment of the closure here +MAX_MOMENT_SOLVER = 1 + +% Determine, how close to the boundary you want to sample. Higher alpha inplies harder training +ALPHA_SAMPLING_BOUND = 10 +% Higher eigenvalue treshold implies larger distance to the boundary +MIN_EIGENVALUE_THRESHOLD = 1e-4 % % ---- File specifications ---- @@ -31,7 +37,7 @@ OUTPUT_DIR = ../result OUTPUT_FILE = DataGenerator2D % Log directory LOG_DIR = ../result/logs -LOG_FILE = dataGen2D +LOG_FILE = Monomial_M1_2D_normal_gaussian % % --- Spherical Basis ---- @@ -42,6 +48,7 @@ SPHERICAL_BASIS = SPHERICAL_MONOMIALS % --- Entropy settings ---- ENTROPY_FUNCTIONAL = MAXWELL_BOLTZMANN ENTROPY_OPTIMIZER = NEWTON +REALIZABILITY_RECONSTRUCTION = NO % % ----- Newton Solver Specifications ---- % diff --git a/src/common/mesh.cpp b/src/common/mesh.cpp index f1b5ce72..1e43d967 100644 --- a/src/common/mesh.cpp +++ b/src/common/mesh.cpp @@ -17,7 +17,6 @@ Mesh::Mesh( std::vector nodes, ComputeCellMidpoints(); ComputeConnectivity(); ComputeBounds(); - // ComputeCellInterfaceMidpoints(); } Mesh::~Mesh() {} diff --git a/src/problems/starmapvalidation.cpp b/src/problems/starmapvalidation.cpp index 7ee34dda..bc50a749 100644 --- a/src/problems/starmapvalidation.cpp +++ b/src/problems/starmapvalidation.cpp @@ -88,7 +88,6 @@ StarMapValidation_Moment::StarMapValidation_Moment( Config* settings, Mesh* mesh StarMapValidation_Moment::~StarMapValidation_Moment() {} VectorVector StarMapValidation_Moment::SetupIC() { - SphericalBase* tempBase = SphericalBase::Create( _settings ); unsigned ntotalEquations = tempBase->GetBasisSize(); delete tempBase; @@ -103,6 +102,7 @@ VectorVector StarMapValidation_Moment::SetupIC() { x = cellMidpoints[idx_cell][0]; y = cellMidpoints[idx_cell][1]; f = NormPDF( x, pos_beam[0], stddev ) * NormPDF( y, pos_beam[1], stddev ); + initialSolution[idx_cell][0] = f * StarMAPmoments[0]; for( unsigned idx_sys = 1; idx_sys < ntotalEquations; idx_sys++ ) { initialSolution[idx_cell][idx_sys] = f * StarMAPmoments[idx_sys]; // must be VectorVector diff --git a/src/solvers/csdmnsolver.cpp b/src/solvers/csdmnsolver.cpp index 26f5bb68..01025aba 100644 --- a/src/solvers/csdmnsolver.cpp +++ b/src/solvers/csdmnsolver.cpp @@ -76,7 +76,7 @@ void CSDMNSolver::IterPreprocessing( unsigned idx_iter ) { _optimizer->SolveMultiCell( _alpha, _sol, _momentBasis, alpha_norm_dummy ); // ------- Solution reconstruction step ---- - //#pragma omp parallel for +#pragma omp parallel for for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { for( unsigned idx_quad = 0; idx_quad < _nq; idx_quad++ ) { // compute the kinetic density at all grid cells