Commit 1f64aab7 authored by steffen.schotthoefer's avatar steffen.schotthoefer
Browse files

start catching doublicates in CVOLUME OUTPUT


Former-commit-id: 471ce6fc
parent f5785da9
...@@ -59,4 +59,4 @@ QUAD_ORDER = 12 ...@@ -59,4 +59,4 @@ QUAD_ORDER = 12
% %
% ----- Output ---- % ----- Output ----
% %
VOLUME_OUTPUT = (MINIMAL, MOMENTS) VOLUME_OUTPUT = (MINIMAL, MOMENTS, MINIMAL)
...@@ -408,6 +408,22 @@ void Config::SetPostprocessing() { ...@@ -408,6 +408,22 @@ void Config::SetPostprocessing() {
} }
// Output Postprocessing // Output Postprocessing
// check for doublicates and remove them
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++;
}
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.",
CURRENT_FUNCTION );
}
}
// Set default volume output
if( _nVolumeOutput == 0 ) { // If no specific output is chosen, use "MINIMAL" if( _nVolumeOutput == 0 ) { // If no specific output is chosen, use "MINIMAL"
_nVolumeOutput = 1; _nVolumeOutput = 1;
_volumeOutput.push_back( MINIMAL ); _volumeOutput.push_back( MINIMAL );
......
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