lib/io/parser.cc
/**
 ********************************************************************************************************************************************
 * \brief   Function to test if the probes specified by user are valid
 *
 *          All the probe indices should lie within the domain limits.
 *          This function performs this check to avoid unpleasant surprises later on.
 ********************************************************************************************************************************************
 */
\brief   Function to test if the probes specified by user are valid
All the probe indices should lie within the domain limits.
This function performs this check to avoid unpleasant surprises later on.
\ brief Function to test if the probes specified by user are valid All the probe indices should lie within the domain limits . This function performs this check to avoid unpleasant surprises later on .
void parser::testProbes() {
    for (unsigned int i = 0; i < probesList.size(); i++) {
        if (probesList[i][0] < 0 or probesList[i][0] > int(pow(2, xInd)) + 1) {
            std::cout << "ERROR: The X index of the probe " << probesList[i] << " lies outside the bounds of the domain. ABORTING" << std::endl;
            MPI_Finalize();
            exit(0);
        }
#ifndef PLANAR
        if (probesList[i][1] < 0 or probesList[i][1] > int(pow(2, yInd)) + 1) {
            std::cout << "ERROR: The Y index of the probe " << probesList[i] << " lies outside the bounds of the domain. ABORTING" << std::endl;
            MPI_Finalize();
            exit(0);
        }
#endif
        if (probesList[i][2] < 0 or probesList[i][2] > int(pow(2, zInd)) + 1) {
            std::cout << "ERROR: The Z index of the probe " << probesList[i] << " lies outside the bounds of the domain. ABORTING" << std::endl;
            MPI_Finalize();
            exit(0);
        }
    }
}
void parser :: testProbes ( ) { for ( unsigned int i = 0 ; i < probesList . size ( ) ; i ++ ) { if ( probesList [ i ] [ 0 ] < 0 or probesList [ i ] [ 0 ] > int ( pow ( 2 , xInd ) ) + 1 ) { std :: cout << " " << probesList [ i ] << " " << std :: endl ; MPI_Finalize ( ) ; exit ( 0 ) ; } #ifndef PLANAR if ( probesList [ i ] [ 1 ] < 0 or probesList [ i ] [ 1 ] > int ( pow ( 2 , yInd ) ) + 1 ) { std :: cout << " " << probesList [ i ] << " " << std :: endl ; MPI_Finalize ( ) ; exit ( 0 ) ; } #endif if ( probesList [ i ] [ 2 ] < 0 or probesList [ i ] [ 2 ] > int ( pow ( 2 , zInd ) ) + 1 ) { std :: cout << " " << probesList [ i ] << " " << std :: endl ; MPI_Finalize ( ) ; exit ( 0 ) ; } } }
\brief   Function to test if the probes specified by user are valid
          All the probe indices should lie within the domain limits.
\ brief Function to test if the probes specified by user are valid All the probe indices should lie within the domain limits .