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
fd43acaf
Commit
fd43acaf
authored
Mar 23, 2021
by
Steffen Schotthöfer
Browse files
fix pn cfg file. Fix output preparation for csdpn. add moment output for csdpn
parent
43b37700
Pipeline
#143047
failed with stage
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
code/input/linesource_PN.cfg
View file @
fd43acaf
...
...
@@ -31,9 +31,9 @@ CFL_NUMBER = 0.7
% Final time for simulation
TIME_FINAL = 0.3
% Maximal Moment degree
MAX_MOMENT_SOLVER =
2
MAX_MOMENT_SOLVER =
13
% Reconstruction order
RECONS_ORDER =
2
RECONS_ORDER =
1
% ---- Boundary Conditions ----
% Example: BC_DIRICLET = (dummyMarker1, dummyMarker2)
...
...
@@ -43,7 +43,7 @@ BC_DIRICHLET = ( void )
%
% ----- Output ----
%
VOLUME_OUTPUT = (MINIMAL,
MOMENTS, DUAL_
MOMENTS)
VOLUME_OUTPUT = (MINIMAL, MOMENTS)
VOLUME_OUTPUT_FREQUENCY = 1
SCREEN_OUTPUT = (ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT)
SCREEN_OUTPUT_FREQUENCY = 1
...
...
code/input/pointSource_PNCSD.cfg
View file @
fd43acaf
...
...
@@ -44,7 +44,7 @@ QUAD_ORDER = 6
%
% ----- Output ----
%
VOLUME_OUTPUT = (MINIMAL, MEDICAL)
VOLUME_OUTPUT = (MINIMAL, MEDICAL
, MOMENTS
)
VOLUME_OUTPUT_FREQUENCY = 1
SCREEN_OUTPUT = (ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT)
SCREEN_OUTPUT_FREQUENCY = 1
...
...
code/src/common/config.cpp
View file @
fd43acaf
...
...
@@ -563,7 +563,6 @@ void Config::SetPostprocessing() {
case
CSD_SN_FOKKERPLANCK_TRAFO_SOLVER_2D
:
// Fallthrough
case
CSD_SN_FOKKERPLANCK_TRAFO_SH_SOLVER_2D
:
// Fallthrough
case
CSD_SN_SOLVER
:
// Fallthrough
case
CSD_PN_SOLVER
:
// Fallthrough
supportedGroups
=
{
MINIMAL
,
MEDICAL
};
if
(
supportedGroups
.
end
()
==
std
::
find
(
supportedGroups
.
begin
(),
supportedGroups
.
end
(),
_volumeOutput
[
idx_volOutput
]
)
)
{
...
...
@@ -571,6 +570,17 @@ void Config::SetPostprocessing() {
CURRENT_FUNCTION
);
}
break
;
case
CSD_PN_SOLVER
:
supportedGroups
=
{
MINIMAL
,
MEDICAL
,
MOMENTS
};
if
(
supportedGroups
.
end
()
==
std
::
find
(
supportedGroups
.
begin
(),
supportedGroups
.
end
(),
_volumeOutput
[
idx_volOutput
]
)
)
{
ErrorMessages
::
Error
(
"CSD_PN_SOLVER types only supports volume output MEDICAL, MOMENTS and MINIMAL.
\n
Please check your .cfg file."
,
CURRENT_FUNCTION
);
}
break
;
default:
ErrorMessages
::
Error
(
"Solver output check not implemented for this Solver.
\n
This is the fault of the coder."
,
CURRENT_FUNCTION
);
}
}
...
...
code/src/solvers/csdpnsolver.cpp
View file @
fd43acaf
...
...
@@ -205,8 +205,21 @@ void CSDPNSolver::PrepareVolumeOutput() {
_outputFields
[
idx_group
][
1
].
resize
(
_nCells
);
_outputFieldNames
[
idx_group
][
1
]
=
"normalized dose"
;
break
;
case
MOMENTS
:
// As many entries as there are moments in the system
_outputFields
[
idx_group
].
resize
(
_nSystem
);
_outputFieldNames
[
idx_group
].
resize
(
_nSystem
);
default:
ErrorMessages
::
Error
(
"Volume Output Group not defined for CSD_SN_FP_TRAFO Solver!"
,
CURRENT_FUNCTION
);
break
;
for
(
int
idx_l
=
0
;
idx_l
<=
(
int
)
_polyDegreeBasis
;
idx_l
++
)
{
for
(
int
idx_k
=
-
idx_l
;
idx_k
<=
idx_l
;
idx_k
++
)
{
_outputFields
[
idx_group
][
GlobalIndex
(
idx_l
,
idx_k
)].
resize
(
_nCells
);
_outputFieldNames
[
idx_group
][
GlobalIndex
(
idx_l
,
idx_k
)]
=
std
::
string
(
"u_"
+
std
::
to_string
(
idx_l
)
+
"^"
+
std
::
to_string
(
idx_k
)
);
}
}
break
;
default:
ErrorMessages
::
Error
(
"Volume Output Group not defined for PN Solver!"
,
CURRENT_FUNCTION
);
break
;
}
}
}
...
...
@@ -239,8 +252,15 @@ void CSDPNSolver::WriteVolumeOutput( unsigned idx_pseudoTime ) {
_outputFields
[
idx_group
][
1
][
idx_cell
]
/=
maxDose
;
}
break
;
case
MOMENTS
:
for
(
unsigned
idx_sys
=
0
;
idx_sys
<
_nSystem
;
idx_sys
++
)
{
for
(
unsigned
idx_cell
=
0
;
idx_cell
<
_nCells
;
++
idx_cell
)
{
_outputFields
[
idx_group
][
idx_sys
][
idx_cell
]
=
_sol
[
idx_cell
][
idx_sys
];
}
}
break
;
default:
ErrorMessages
::
Error
(
"Volume Output Group not defined for CSD_
SN_F
P_TRAFO Solver!"
,
CURRENT_FUNCTION
);
break
;
default:
ErrorMessages
::
Error
(
"Volume Output Group not defined for CSD_P
N
_TRAFO Solver!"
,
CURRENT_FUNCTION
);
break
;
}
}
}
...
...
jannick.wolters
@jm2154
mentioned in commit
90e83978
·
Apr 30, 2021
mentioned in commit
90e83978
mentioned in commit 90e8397823fff8fdd7abfa18422df8396ef4d547
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