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
07f6c769
Commit
07f6c769
authored
Mar 22, 2021
by
Steffen Schotthöfer
Browse files
added dose computation
Former-commit-id:
c68eeaed
parent
9dc96f36
Changes
3
Hide whitespace changes
Inline
Side-by-side
code/include/solvers/csdpnsolver.h
View file @
07f6c769
...
...
@@ -32,7 +32,6 @@ class CSDPNSolver : public PNSolver
void
IterPreprocessing
(
unsigned
/*idx_iter*/
)
override
;
void
IterPostprocessing
(
unsigned
/*idx_iter*/
)
override
;
void
ComputeRadFlux
()
override
;
void
FluxUpdate
()
override
;
void
FVMUpdate
(
unsigned
idx_energy
)
override
;
...
...
code/src/solvers/csdpnsolver.cpp
View file @
07f6c769
...
...
@@ -60,7 +60,7 @@ CSDPNSolver::CSDPNSolver( Config* settings ) : PNSolver( settings ) {
}
Interpolation
interpS
(
E_ref
,
S_tab
);
Vector
S
=
interpS
(
_energies
);
_s
=
interpS
(
_energies
);
}
void
CSDPNSolver
::
SolverPreprocessing
()
{
...
...
@@ -77,9 +77,21 @@ void CSDPNSolver::IterPostprocessing( unsigned /*idx_iter*/ ) {
// --- Compute Flux for solution and Screen Output ---
ComputeRadFlux
();
}
void
CSDPNSolver
::
ComputeRadFlux
()
{}
unsigned
n
=
idx_pseudotime
;
// -- Compute Dose
for
(
unsigned
j
=
0
;
j
<
_nCells
;
++
j
)
{
if
(
n
>
0
)
{
_dose
[
j
]
+=
0.5
*
_dE
*
(
_fluxNew
[
j
]
*
_s
[
_nEnergies
-
n
-
1
]
+
_flux
[
j
]
*
_s
[
_nEnergies
-
n
]
)
/
_density
[
j
];
// update dose with trapezoidal rule
}
else
{
_dose
[
j
]
+=
_dE
*
_fluxNew
[
j
]
*
_s
[
_nEnergies
-
n
-
1
]
/
_density
[
j
];
}
_solverOutput
[
j
]
=
_fluxNew
[
j
];
// Carefull here
_flux
[
j
]
=
_fluxNew
[
j
];
// Carefull here
}
}
void
CSDPNSolver
::
FluxUpdate
()
{
// _mesh->ReconstructSlopesU( _nSystem, _solDx, _solDy, _sol );
...
...
code/src/solvers/csdsolvertrafofp.cpp
View file @
07f6c769
...
...
@@ -188,6 +188,7 @@ void CSDSolverTrafoFP::IterPostprocessing( unsigned idx_pseudotime ) {
_sol
=
_solNew
;
unsigned
n
=
idx_pseudotime
;
// Compute Dose
for
(
unsigned
j
=
0
;
j
<
_nCells
;
++
j
)
{
_fluxNew
[
j
]
=
dot
(
_sol
[
j
],
_weights
);
if
(
n
>
0
)
{
...
...
Write
Preview
Markdown
is supported
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