Commit 097e3881 authored by Jannick Wolters's avatar Jannick Wolters
Browse files

Merge branch 'PN_CSD' of git.scc.kit.edu:rtsn/rtsn into PN_CSD

parents cc662021 fd43acaf
Pipeline #143048 passed with stage
in 20 minutes and 18 seconds
......@@ -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
......
......@@ -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
......
......@@ -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.\nPlease check your .cfg file.",
CURRENT_FUNCTION );
}
break;
default:
ErrorMessages::Error( "Solver output check not implemented for this Solver.\nThis is the fault of the coder.", CURRENT_FUNCTION );
}
}
......
......@@ -208,8 +208,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;
}
}
}
......@@ -242,8 +255,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_FP_TRAFO Solver!", CURRENT_FUNCTION ); break;
default: ErrorMessages::Error( "Volume Output Group not defined for CSD_PN_TRAFO Solver!", CURRENT_FUNCTION ); break;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment