Commit b20b8e5f authored by steffen.schotthoefer's avatar steffen.schotthoefer
Browse files

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

parents 92b8fa78 573021e7
......@@ -52,6 +52,7 @@ BC_DIRICHLET = ( void )
% Quadrature Rule
%QUAD_TYPE = MONTE_CARLO
QUAD_TYPE = GAUSS_LEGENDRE_TENSORIZED
%
% Quadrature Order
QUAD_ORDER = 12
......@@ -59,4 +60,4 @@ QUAD_ORDER = 12
%
% ----- Output ----
%
VOLUME_OUTPUT = (MINIMAL, MOMENTS, MINIMAL)
VOLUME_OUTPUT = (MINIMAL, MOMENTS)
......@@ -407,22 +407,55 @@ void Config::SetPostprocessing() {
}
}
// Output Postprocessing
// check for doublicates and remove them
// --- Output Postprocessing ---
// Check for doublicates in VOLUME OUTPUT
std::map<VOLUME_OUTPUT, int> dublicate_map;
for( unsigned short idx_volOutput = 0; idx_volOutput < _nVolumeOutput; idx_volOutput++ ) {
std::map<VOLUME_OUTPUT, int>::iterator it = dublicate_map.find( _volumeOutput[idx_volOutput] );
it->second++;
if( it == dublicate_map.end() ) {
dublicate_map.insert( std::pair<VOLUME_OUTPUT, int>( _volumeOutput[idx_volOutput], 0 ) );
}
else {
it->second++;
}
}
for( auto& e : dublicate_map ) {
std::cout << '{' << e.first << ", " << e.second << '}' << '\n';
if( e.second > 0 ) {
ErrorMessages::Error( "Each output group for option VOLUME_OUTPUT can only be set once. \n Please check your .cfg file.",
ErrorMessages::Error( "Each output group for option VOLUME_OUTPUT can only be set once.\nPlease check your .cfg file.",
CURRENT_FUNCTION );
}
}
// Check, if the choice of volume output is compatible to the solver
for( unsigned short idx_volOutput = 0; idx_volOutput < _nVolumeOutput; idx_volOutput++ ) {
switch( _solverName ) {
case SN_SOLVER:
if( _volumeOutput[idx_volOutput] != MINIMAL ) {
ErrorMessages::Error( "SN_SOLVER only supports volume output MINIMAL.\nPlease check your .cfg file.", CURRENT_FUNCTION );
}
break;
case MN_SOLVER:
if( _volumeOutput[idx_volOutput] != MINIMAL || _volumeOutput[idx_volOutput] != MOMENTS ) {
ErrorMessages::Error( "MN_SOLVER only supports volume output MINIMAL and MOMENTS.\nPlease check your .cfg file.",
CURRENT_FUNCTION );
}
break;
case PN_SOLVER:
if( _volumeOutput[idx_volOutput] != MINIMAL || _volumeOutput[idx_volOutput] != MOMENTS ) {
ErrorMessages::Error( "PN_SOLVER only supports volume output MINIMAL and MOMENTS.\nPlease check your .cfg file.",
CURRENT_FUNCTION );
}
break;
case CSD_SN_SOLVER:
if( _volumeOutput[idx_volOutput] != MINIMAL ) {
ErrorMessages::Error( "CSD_SN_SOLVER only supports volume output MINIMAL.\nPlease check your .cfg file.", CURRENT_FUNCTION );
}
break;
}
}
// Set default volume output
if( _nVolumeOutput == 0 ) { // If no specific output is chosen, use "MINIMAL"
_nVolumeOutput = 1;
......
Supports Markdown
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