Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KiT-RT
KiT-RT
Commits
3ad7dc10
Commit
3ad7dc10
authored
Feb 19, 2021
by
Steffen Schotthöfer
Browse files
repaired bug in MN solver. trimmed some test cases
parent
ddc93440
Pipeline
#136509
failed with stage
in 16 minutes and 13 seconds
Changes
9
Pipelines
2
Expand all
Hide whitespace changes
Inline
Side-by-side
code/src/problems/checkerboard.cpp
View file @
3ad7dc10
...
...
@@ -95,7 +95,7 @@ std::vector<VectorVector> Checkerboard_PN::GetExternalSource( const Vector& /*en
VectorVector
Q
(
_mesh
->
GetNumCells
(),
Vector
(
1u
,
0.0
)
);
auto
cellMids
=
_mesh
->
GetCellMidPoints
();
for
(
unsigned
j
=
0
;
j
<
cellMids
.
size
();
++
j
)
{
if
(
isSource
(
cellMids
[
j
]
)
)
Q
[
j
]
=
1
0
.0
/
std
::
sqrt
(
4
*
M_PI
);
// isotropic source
if
(
isSource
(
cellMids
[
j
]
)
)
Q
[
j
]
=
1.0
/
std
::
sqrt
(
4
*
M_PI
);
// isotropic source
}
return
std
::
vector
<
VectorVector
>
(
1u
,
Q
);
}
...
...
code/src/solvers/mnsolver.cpp
View file @
3ad7dc10
...
...
@@ -189,10 +189,12 @@ void MNSolver::FVMUpdate( unsigned idx_energy ) {
// Dirichlet Boundaries stay
if
(
_boundaryCells
[
idx_cell
]
==
BOUNDARY_TYPE
::
DIRICHLET
)
continue
;
// Flux update
for
(
unsigned
idx_sys
=
0
;
idx_sys
<
_nTotalEntries
;
idx_sys
++
)
{
_solNew
[
idx_cell
][
idx_sys
]
=
_sol
[
idx_cell
][
idx_sys
]
-
(
_dE
/
_areas
[
idx_cell
]
)
*
_solNew
[
idx_cell
][
idx_sys
];
/* cell averaged flux */
-
_dE
*
_sol
[
idx_cell
][
idx_sys
]
*
(
_sigmaT
[
idx_energy
][
idx_cell
]
/* absorbtion influence */
+
_sigmaS
[
idx_energy
][
idx_cell
]
*
_scatterMatDiag
[
idx_sys
]
);
/* scattering influence */
for
(
unsigned
idx_system
=
0
;
idx_system
<
_nTotalEntries
;
idx_system
++
)
{
_solNew
[
idx_cell
][
idx_system
]
=
_sol
[
idx_cell
][
idx_system
]
-
(
_dE
/
_areas
[
idx_cell
]
)
*
_solNew
[
idx_cell
][
idx_system
]
/* cell averaged flux */
-
_dE
*
_sol
[
idx_cell
][
idx_system
]
*
(
_sigmaT
[
idx_energy
][
idx_cell
]
/* absorbtion influence */
+
_sigmaS
[
idx_energy
][
idx_cell
]
*
_scatterMatDiag
[
idx_system
]
);
/* scattering influence */
}
// Source Term
_solNew
[
idx_cell
][
0
]
+=
_dE
*
_Q
[
0
][
idx_cell
][
0
];
...
...
code/src/solvers/pnsolver.cpp
View file @
3ad7dc10
...
...
@@ -150,10 +150,6 @@ void PNSolver::FluxUpdate() {
}
}
}
// std::cout << norm( _solNew[idx_cell] ) << "\n";
// if( norm( _solNew[idx_cell] ) > 0.001 ) {
// std::cout << _solNew[idx_cell] << "\n";
//}
}
}
...
...
code/tests/input/validation_tests/CSD_SN_FP_2D_solver/waterphantom_2D.cfg
View file @
3ad7dc10
...
...
@@ -18,6 +18,7 @@ CT_FILE = phantom.png
PROBLEM = PHANTOM2D
HYDROGEN_FILE = ENDL_H.txt
OXYGEN_FILE = ENDL_O.txt
MAX_ENERGY_CSD = 0.01
%
% ---- Solver specifications ----
%
...
...
code/tests/input/validation_tests/CSD_SN_FP_2D_solver/waterphantom_2D_CSD_SN_FP_SH_reference.vtk
View file @
3ad7dc10
This diff is collapsed.
Click to expand it.
code/tests/input/validation_tests/CSD_SN_FP_2D_solver/waterphantom_2D_sh.cfg
View file @
3ad7dc10
...
...
@@ -18,6 +18,7 @@ CT_FILE = phantom.png
PROBLEM = PHANTOM2D
HYDROGEN_FILE = ENDL_H.txt
OXYGEN_FILE = ENDL_O.txt
MAX_ENERGY_CSD = 0.01
%
% ---- Solver specifications ----
%
...
...
@@ -35,7 +36,7 @@ QUAD_ORDER = 6
% ----- Output ----
%
VOLUME_OUTPUT = (MINIMAL, MEDICAL)
VOLUME_OUTPUT_FREQUENCY =
1
VOLUME_OUTPUT_FREQUENCY =
0
SCREEN_OUTPUT = (ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT)
SCREEN_OUTPUT_FREQUENCY = 0
HISTORY_OUTPUT = (ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT)
...
...
code/tests/input/validation_tests/CSD_SN_FP_solver/waterphantom_1D.cfg
View file @
3ad7dc10
...
...
@@ -18,6 +18,7 @@ PROBLEM = WATERPHANTOM
HYDROGEN_FILE = ENDL_H.txt
OXYGEN_FILE = ENDL_O.txt
STOPPING_POWER_FILE = stopping_power.txt
MAX_ENERGY_CSD = 5.0
%
% ---- Solver specifications ----
%
...
...
code/tests/input/validation_tests/dataGenerator/validate_dataGen_csv_reference
View file @
3ad7dc10
This diff is collapsed.
Click to expand it.
code/tests/test_cases.cpp
View file @
3ad7dc10
...
...
@@ -189,7 +189,6 @@ TEST_CASE( "MN_SOLVER", "[validation_tests]" ) {
}
}
}
/*
TEST_CASE( "CSD_SN_FP_SOLVER", "[validation_tests]" ) {
std::string csd_sn_fileDir = "input/validation_tests/CSD_SN_FP_solver/";
...
...
@@ -261,7 +260,6 @@ TEST_CASE( "CSD_SN_FP_SH_2D_SOLVER", "[validation_tests]" ) {
}
}
*/
// --- Validation Tests Output ---
void
tokenize
(
std
::
string
const
&
str
,
const
char
delim
,
std
::
vector
<
std
::
string
>&
out
)
{
size_t
start
;
...
...
@@ -360,7 +358,6 @@ TEST_CASE( "screen_output", "[output]" ) {
REQUIRE
(
eqLen
);
// Files must be of same length
}
/*
TEST_CASE
(
"Test the Data Generator"
,
"[dataGen]"
)
{
std
::
string
out_fileDir
=
"input/validation_tests/dataGenerator/"
;
spdlog
::
drop_all
();
// Make sure to write in own logging file
...
...
@@ -421,4 +418,3 @@ TEST_CASE( "Test the Data Generator", "[dataGen]" ) {
}
REQUIRE
(
testPassed
);
}
*/
jannick.wolters
@jm2154
mentioned in commit
a2fcf152
·
Apr 30, 2021
mentioned in commit
a2fcf152
mentioned in commit a2fcf152d0cc437b531cc64d51d39d1d191908e6
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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