parameters: (inputcsData, inVariableInfo)
docstring: fairly complex high level mpi-operation routine.  Takes a variable,\n     finds the min/max (global) and finds a node id or element id corresponding\n     to the node or element for both the min and the max value.  Has some\n     intelligence to avoid recaculating and doing mpi communication if the\n     information had already been found for this catalyst callback
docstring_summary: fairly complex high level mpi-operation routine.  Takes a variable,\n     finds the min/max (global) and finds a node id or element id corresponding\n     to the node or element for both the min and the max value.  Has some\n     intelligence to avoid recaculating and doing mpi communication if the\n     information had already been found for this catalyst callback
docstring_tokens: fairly complex high level mpi - operation routine . Takes a variable \ n finds the min / max ( global ) and finds a node id or element id corresponding \ n to the node or element for both the min and the max value . Has some \ n intelligence to avoid recaculating and doing mpi communication if the \ n information had already been found for this catalyst callback
function: def FindNodeOrElementIdForMinMax(inputcsData, inVariableInfo):
    "fairly complex high level mpi-operation routine.  Takes a variable,\n     finds the min/max (global) and finds a node id or element id corresponding\n     to the node or element for both the min and the max value.  Has some\n     intelligence to avoid recaculating and doing mpi communication if the\n     information had already been found for this catalyst callback"
  
    if PhactoriDbg(100):
      myDebugPrint3("FindNodeOrElementIdForMinMax entered: " + \
        str(inVariableInfo.mVariableName) + "\n", 100)
  
    #if already been done for this catalyst callback, just return
    if inVariableInfo.mStats.mIdsTestCounter == \
        gPipeAndViewsState.mFrameTagCounter:
      if PhactoriDbg(100):
        myDebugPrint3("already calculated for this callback, returning\n", 100)
      return
  
    #if variable is global, this shouldn't be called
    if inVariableInfo.mVariableType == "global":
      myDebugPrint3AndException("FindNodeOrElementIdForMinMax:\n"
        "this should not be called with global variable " + \
        inVariableInfo.mVariableName + "\n")
  
    #first get the min/max for the variable if necessary
    if inVariableInfo.mStats.mStatsTestCounter != \
        gPipeAndViewsState.mFrameTagCounter:
      if PhactoriDbg(100):
        myDebugPrint3("min/max not available, calculating\n", 100)
      DataMinMax = [0.0, 0.0, False]
      DataSumCnt = [0.0, 0]
      FindMinMaxSumCntFromData(inputcsData, inVariableInfo, 
          None, DataMinMax, DataSumCnt,
          None, None)
    else:
      if PhactoriDbg(100):
        myDebugPrint3("min/max previously calculated\n", 100)
  
    #next, get the local node/element id, if any, which contain min and max
    #values
    inVariableInfo.mStats.mLocalFoundMinId = False
    inVariableInfo.mStats.mLocalMinIdCount = 0
    inVariableInfo.mStats.mMinId = -1
    inVariableInfo.mStats.mLocalFoundMaxId = False
    inVariableInfo.mStats.mLocalMaxIdCount = 0
    inVariableInfo.mStats.mMaxId = -1
    FindNodeOrElementIdForMinMaxRecurse1(inputcsData, inVariableInfo)
  
    #now get every process to agree on which node or element id contains the
    #max and min value; for multiple instances we choose the id with the highest
    #integer value
    idForMinAndidForMax = [inVariableInfo.mStats.mMinId,
        inVariableInfo.mStats.mMaxId]
    UseReduceToGetMaximumIntegers(idForMinAndidForMax)
    inVariableInfo.mStats.mMinId = idForMinAndidForMax[0]
    inVariableInfo.mStats.mMaxId = idForMinAndidForMax[1]
  
    #mark done for this catalyst callback, so we won't do extra mpi
    #communication if we call this routine again 
    inVariableInfo.mStats.mIdsTestCounter = gPipeAndViewsState.mFrameTagCounter
  
    if PhactoriDbg(100):
      myDebugPrint3(
        "counter:   " + str(inVariableInfo.mStats.mIdsTestCounter) + "\n"
        "min:   " + str(inVariableInfo.mStats.mMin) + "\n"
        "at id: " + str(inVariableInfo.mStats.mMinId) + "\n"
        "max:   " + str(inVariableInfo.mStats.mMax) + "\n"
        "at id: " + str(inVariableInfo.mStats.mMaxId) + "\n"
        "FindNodeOrElementIdForMinMax returning\n")
function_tokens: def FindNodeOrElementIdForMinMax ( inputcsData , inVariableInfo ) : if PhactoriDbg ( 100 ) : myDebugPrint3 ( "FindNodeOrElementIdForMinMax entered: " + str ( inVariableInfo . mVariableName ) + "\n" , 100 ) #if already been done for this catalyst callback, just return if inVariableInfo . mStats . mIdsTestCounter == gPipeAndViewsState . mFrameTagCounter : if PhactoriDbg ( 100 ) : myDebugPrint3 ( "already calculated for this callback, returning\n" , 100 ) return #if variable is global, this shouldn't be called if inVariableInfo . mVariableType == "global" : myDebugPrint3AndException ( "FindNodeOrElementIdForMinMax:\n" "this should not be called with global variable " + inVariableInfo . mVariableName + "\n" ) #first get the min/max for the variable if necessary if inVariableInfo . mStats . mStatsTestCounter != gPipeAndViewsState . mFrameTagCounter : if PhactoriDbg ( 100 ) : myDebugPrint3 ( "min/max not available, calculating\n" , 100 ) DataMinMax = [ 0.0 , 0.0 , False ] DataSumCnt = [ 0.0 , 0 ] FindMinMaxSumCntFromData ( inputcsData , inVariableInfo , None , DataMinMax , DataSumCnt , None , None ) else : if PhactoriDbg ( 100 ) : myDebugPrint3 ( "min/max previously calculated\n" , 100 ) #next, get the local node/element id, if any, which contain min and max #values inVariableInfo . mStats . mLocalFoundMinId = False inVariableInfo . mStats . mLocalMinIdCount = 0 inVariableInfo . mStats . mMinId = - 1 inVariableInfo . mStats . mLocalFoundMaxId = False inVariableInfo . mStats . mLocalMaxIdCount = 0 inVariableInfo . mStats . mMaxId = - 1 FindNodeOrElementIdForMinMaxRecurse1 ( inputcsData , inVariableInfo ) #now get every process to agree on which node or element id contains the #max and min value; for multiple instances we choose the id with the highest #integer value idForMinAndidForMax = [ inVariableInfo . mStats . mMinId , inVariableInfo . mStats . mMaxId ] UseReduceToGetMaximumIntegers ( idForMinAndidForMax ) inVariableInfo . mStats . mMinId = idForMinAndidForMax [ 0 ] inVariableInfo . mStats . mMaxId = idForMinAndidForMax [ 1 ] #mark done for this catalyst callback, so we won't do extra mpi #communication if we call this routine again  inVariableInfo . mStats . mIdsTestCounter = gPipeAndViewsState . mFrameTagCounter if PhactoriDbg ( 100 ) : myDebugPrint3 ( "counter:   " + str ( inVariableInfo . mStats . mIdsTestCounter ) + "\n" "min:   " + str ( inVariableInfo . mStats . mMin ) + "\n" "at id: " + str ( inVariableInfo . mStats . mMinId ) + "\n" "max:   " + str ( inVariableInfo . mStats . mMax ) + "\n" "at id: " + str ( inVariableInfo . mStats . mMaxId ) + "\n" "FindNodeOrElementIdForMinMax returning\n" )