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
c25709a1
Commit
c25709a1
authored
Mar 23, 2021
by
jannick.wolters
Browse files
Merge branch 'PN_CSD' of git.scc.kit.edu:rtsn/rtsn into PN_CSD
Former-commit-id:
097e3881
parents
97145627
90e83978
Changes
4
Hide whitespace changes
Inline
Side-by-side
code/input/linesource_PN.cfg
View file @
c25709a1
...
@@ -31,9 +31,9 @@ CFL_NUMBER = 0.7
...
@@ -31,9 +31,9 @@ CFL_NUMBER = 0.7
% Final time for simulation
% Final time for simulation
TIME_FINAL = 0.3
TIME_FINAL = 0.3
% Maximal Moment degree
% Maximal Moment degree
MAX_MOMENT_SOLVER =
2
MAX_MOMENT_SOLVER =
13
% Reconstruction order
% Reconstruction order
RECONS_ORDER =
2
RECONS_ORDER =
1
% ---- Boundary Conditions ----
% ---- Boundary Conditions ----
% Example: BC_DIRICLET = (dummyMarker1, dummyMarker2)
% Example: BC_DIRICLET = (dummyMarker1, dummyMarker2)
...
@@ -43,7 +43,7 @@ BC_DIRICHLET = ( void )
...
@@ -43,7 +43,7 @@ BC_DIRICHLET = ( void )
%
%
% ----- Output ----
% ----- Output ----
%
%
VOLUME_OUTPUT = (MINIMAL,
MOMENTS, DUAL_
MOMENTS)
VOLUME_OUTPUT = (MINIMAL, MOMENTS)
VOLUME_OUTPUT_FREQUENCY = 1
VOLUME_OUTPUT_FREQUENCY = 1
SCREEN_OUTPUT = (ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT)
SCREEN_OUTPUT = (ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT)
SCREEN_OUTPUT_FREQUENCY = 1
SCREEN_OUTPUT_FREQUENCY = 1
...
...
code/input/pointSource_PNCSD.cfg
View file @
c25709a1
...
@@ -44,7 +44,7 @@ QUAD_ORDER = 6
...
@@ -44,7 +44,7 @@ QUAD_ORDER = 6
%
%
% ----- Output ----
% ----- Output ----
%
%
VOLUME_OUTPUT = (MINIMAL, MEDICAL)
VOLUME_OUTPUT = (MINIMAL, MEDICAL
, MOMENTS
)
VOLUME_OUTPUT_FREQUENCY = 1
VOLUME_OUTPUT_FREQUENCY = 1
SCREEN_OUTPUT = (ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT)
SCREEN_OUTPUT = (ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT)
SCREEN_OUTPUT_FREQUENCY = 1
SCREEN_OUTPUT_FREQUENCY = 1
...
...
code/src/common/config.cpp
View file @
c25709a1
...
@@ -563,7 +563,6 @@ void Config::SetPostprocessing() {
...
@@ -563,7 +563,6 @@ void Config::SetPostprocessing() {
case
CSD_SN_FOKKERPLANCK_TRAFO_SOLVER_2D
:
// Fallthrough
case
CSD_SN_FOKKERPLANCK_TRAFO_SOLVER_2D
:
// Fallthrough
case
CSD_SN_FOKKERPLANCK_TRAFO_SH_SOLVER_2D
:
// Fallthrough
case
CSD_SN_FOKKERPLANCK_TRAFO_SH_SOLVER_2D
:
// Fallthrough
case
CSD_SN_SOLVER
:
// Fallthrough
case
CSD_SN_SOLVER
:
// Fallthrough
case
CSD_PN_SOLVER
:
// Fallthrough
supportedGroups
=
{
MINIMAL
,
MEDICAL
};
supportedGroups
=
{
MINIMAL
,
MEDICAL
};
if
(
supportedGroups
.
end
()
==
std
::
find
(
supportedGroups
.
begin
(),
supportedGroups
.
end
(),
_volumeOutput
[
idx_volOutput
]
)
)
{
if
(
supportedGroups
.
end
()
==
std
::
find
(
supportedGroups
.
begin
(),
supportedGroups
.
end
(),
_volumeOutput
[
idx_volOutput
]
)
)
{
...
@@ -571,6 +570,17 @@ void Config::SetPostprocessing() {
...
@@ -571,6 +570,17 @@ void Config::SetPostprocessing() {
CURRENT_FUNCTION
);
CURRENT_FUNCTION
);
}
}
break
;
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 @
c25709a1
...
@@ -208,8 +208,21 @@ void CSDPNSolver::PrepareVolumeOutput() {
...
@@ -208,8 +208,21 @@ void CSDPNSolver::PrepareVolumeOutput() {
_outputFields
[
idx_group
][
1
].
resize
(
_nCells
);
_outputFields
[
idx_group
][
1
].
resize
(
_nCells
);
_outputFieldNames
[
idx_group
][
1
]
=
"normalized dose"
;
_outputFieldNames
[
idx_group
][
1
]
=
"normalized dose"
;
break
;
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
;
}
}
}
}
}
}
...
@@ -242,8 +255,15 @@ void CSDPNSolver::WriteVolumeOutput( unsigned idx_pseudoTime ) {
...
@@ -242,8 +255,15 @@ void CSDPNSolver::WriteVolumeOutput( unsigned idx_pseudoTime ) {
_outputFields
[
idx_group
][
1
][
idx_cell
]
/=
maxDose
;
_outputFields
[
idx_group
][
1
][
idx_cell
]
/=
maxDose
;
}
}
break
;
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
;
}
}
}
}
}
}
...
...
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