Commit 573021e7 authored by Steffen Schotthöfer's avatar Steffen Schotthöfer
Browse files

Implemented compatibility check for solver VOLUME_OUTPUT

parent bc8e713c
Pipeline #109633 passed with stage
in 18 minutes and 32 seconds
......@@ -407,8 +407,9 @@ 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++ ) {
......@@ -427,6 +428,34 @@ void Config::SetPostprocessing() {
}
}
// 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