diff --git a/doc/sqa/CIlist/LST-1136_RAVEN_Configuration_Items_List.docx b/doc/sqa/CIlist/LST-1136_RAVEN_Configuration_Items_List.docx index 0aaf664400..319cc37260 100644 Binary files a/doc/sqa/CIlist/LST-1136_RAVEN_Configuration_Items_List.docx and b/doc/sqa/CIlist/LST-1136_RAVEN_Configuration_Items_List.docx differ diff --git a/doc/user_manual/Installation/clone.tex b/doc/user_manual/Installation/clone.tex index 9e944e473b..ef024e1576 100644 --- a/doc/user_manual/Installation/clone.tex +++ b/doc/user_manual/Installation/clone.tex @@ -148,6 +148,6 @@ \subsubsection{Updating RAVEN} \end{itemize} \subsubsection{In-use Testing} - -At any time, tests can be checked by re-running the installation tests as -described in Section \ref{sec:testing raven}. +Whenever RAVEN is installed on a new computer or whenever there is a significant change to the operating system, +in-use tests shall be conducted. +Acceptable performance of RAVEN shall be confirmed by running the installation tests as described in \ref{sec:testing raven}. diff --git a/framework/Application.py b/framework/Application.py index 929a69376c..2ec4b2144c 100644 --- a/framework/Application.py +++ b/framework/Application.py @@ -35,7 +35,12 @@ import PySide.QtCore as qtc __QtAvailable = True except ImportError as e: - __QtAvailable = False + try: + import PySide2.QtWidgets as qtw + import PySide2.QtCore as qtc + __QtAvailable = True + except ImportError as e: + __QtAvailable = False if __QtAvailable: class InteractiveApplication(qtw.QApplication, MessageHandler.MessageUser): diff --git a/framework/CodeInterfaces/RAVEN/RAVENInterface.py b/framework/CodeInterfaces/RAVEN/RAVENInterface.py index 1d47b8ab46..ddf58ac974 100644 --- a/framework/CodeInterfaces/RAVEN/RAVENInterface.py +++ b/framework/CodeInterfaces/RAVEN/RAVENInterface.py @@ -75,8 +75,9 @@ def _readMoreXML(self,xmlNode): @ In, xmlNode, xml.etree.ElementTree.Element, Xml element node @ Out, None. """ - if os.path.basename(xmlNode.find("executable").text) != 'raven_framework': - raise IOError(self.printTag+' ERROR: executable must be "raven_framework" (in whatever location)!') + baseName = os.path.basename(xmlNode.find("executable").text) + if baseName not in ['raven_framework','Driver.py']: + raise IOError(self.printTag+' ERROR: executable must be "raven_framework" (in whatever location)! Got "'+baseName+'"!') linkedDataObjects = xmlNode.find("outputExportOutStreams") if linkedDataObjects is None: @@ -162,7 +163,7 @@ def generateCommand(self,inputFiles,executable,clargs=None,fargs=None, preExec=N outputfile = self.outputPrefix+inputFiles[index].getBase() # we set the command type to serial since the SLAVE RAVEN handles the parallel on its own pre = "" - if "python" not in executable.lower() or executable.endswith(".py"): + if "python" not in executable.lower() or not executable.endswith(".py"): pre = self.preCommand.strip() + " " executeCommand = [('serial',pre + executable+ ' '+inputFiles[index].getFilename())] returnCommand = executeCommand, outputfile diff --git a/framework/CsvLoader.py b/framework/CsvLoader.py index efcf7fd77a..33e63ee166 100644 --- a/framework/CsvLoader.py +++ b/framework/CsvLoader.py @@ -45,7 +45,6 @@ def __init__(self,messageHandler): @ Out, None """ self.allOutParam = False # all output parameters? - self.fieldNames = [] # self.allFieldNames = [] self.type = 'CsvLoader' self.printTag = self.type @@ -76,14 +75,6 @@ def loadCsvFile(self,myFile): myFile.close() return data - def getFieldNames(self): - """ - Function to get actual field names (desired output parameter keywords) - @ In, None - @ Out, fieldNames, list, field names' list - """ - return self.fieldNames - def getAllFieldNames(self): """ Function to get all field names found in the csv file @@ -91,483 +82,3 @@ def getAllFieldNames(self): @ Out, allFieldNames, list, list of field names (headers) """ return self.allFieldNames - - def csvLoadData(self,fileIn,options): - """ - General interface function to call the private methods for loading the different dataObjects! - @ In, fileIn, string, csv file name - @ In, options, dict, dictionary of options - @ Out, csvLoadData, tuple, tuple of (listhistIn,listhistOut) - """ - if options['type'] == 'Point': - return self.__csvLoaderForPoint(fileIn[0],options) - elif options['type'] == 'History': - return self.__csvLoaderForHistory(fileIn[0],options) - elif options['type'] == 'PointSet': - return self.__csvLoaderForPointSet(fileIn,options) - elif options['type'] == 'HistorySet': - listhistIn = {} - listhistOut = {} - for index in range(len(fileIn)): - tupleVar = self.__csvLoaderForHistory(fileIn[index],options) - # dictionary of dictionary key = i => ith history ParameterValues dictionary - listhistIn[index] = tupleVar[0] - listhistOut[index] = tupleVar[1] - del tupleVar - return(listhistIn,listhistOut) - else: - self.raiseAnError(IOError,'Type ' + options['type'] + ' unknown') - - def __csvLoaderForPoint(self,fileIn,options): - """ - loader for point data type - @ In, fileIn, string, file name - @ In, options, dict, dictionary of options: - outputPivotVal, output value at which the outputs need to be collected - inParam, input Parameters - outParam, output Parameters - inputRow, outputPivotVal-step from which the input parameters need to be taken - sampledVars, optional, dictionary of input parameters. The code is going to - look for the inParams in the CSV, if it does not find it - it will try to get the values from this dictionary (if present) - - - - - - - - @ Out, (inDict,outDict), tuple, the tuple containing the input and output dictionaries - """ - inParam, outParam, inputRow, outputRow = copy.deepcopy(options['inParam']), copy.deepcopy(options['outParam']), copy.deepcopy(options.get('inputRow',None)), copy.deepcopy(options.get('outputRow',None)) - sampledVars, inputPivotVal, outputPivotVal, operator = options.get('SampledVars',None), options.get('inputPivotValue',None), options.get('outputPivotValue',None), options.get('operator',None) - pivotParameter = options.get('pivotParameter',None) - - if 'alias' in options.keys(): - for aliasType in options['alias'].keys(): - for var in options['alias'][aliasType].keys(): - if var.strip() in inParam if aliasType == 'input' else outParam: - checkVars = sampledVars.keys() if sampledVars is not None else [] - if aliasType == 'input' and var.strip() not in checkVars: - inParam[inParam.index(var.strip())] = options['alias'][aliasType][var] - elif aliasType == 'output': - outParam[outParam.index(var.strip())] = options['alias'][aliasType][var] - else: - self.raiseAWarning('the ' + aliasType +' alias"'+var.strip()+'" has been defined but has not been found among the variables!') - - self.allOutParam = 'all' in outParam - if outputPivotVal != None: - outputPivotValEnd = 'end' in outputPivotVal - if not outputPivotValEnd: - outputPivotVal = float(outputPivotVal) - else: - outputPivotValEnd = operator is None and outputRow is None - - if [inputRow,inputPivotVal].count(None) == 2: - inputRow = 0 - if inputRow != None : - inputRow = int(inputRow) - if inputRow > 0: - inputRow -= 1 - if outputRow != None: - outputRow = int(outputRow) - if outputRow > 0: - outputRow -= 1 - inDict, outDict = {}, {} - - #load the data into the numpy array - data = self.loadCsvFile(fileIn) - if pivotParameter != None: - pivotIndex = self.allFieldNames.index(pivotParameter) if pivotParameter in self.allFieldNames else None - if pivotIndex == None: - self.raiseAnError(IOError,'pivotParameter ' +pivotParameter+' has not been found in file '+ str(fileIn) + '!') - else: - pivotIndex = self.allFieldNames.index("time") if "time" in self.allFieldNames else None - # if None...default is 0 - if pivotIndex == None: - pivotIndex = 0 - if inputRow > data[:,0].size-1 and inputRow != -1: - self.raiseAnError(IOError,'inputRow is greater than number of actual rows in file '+ str(fileIn) + '!') - - if(self.allOutParam): - self.fieldNames = self.allFieldNames - else: - self.fieldNames = outParam - - #fill input param dictionary - for key in inParam: - ix = self.allFieldNames.index(key) if key in self.allFieldNames else None - if ix != None: - if inputPivotVal != None: - if float(inputPivotVal) > np.max(data[:,pivotIndex]) or float(inputPivotVal) < np.min(data[:,pivotIndex]): - self.raiseAnError(IOError,'inputPivotVal is out of the min and max for input ' + key+' in file '+ str(fileIn) + '!') - inDict[key] = np.atleast_1d(np.array(interp1d(data[:,pivotIndex], data[:,ix], kind='linear')(float(inputPivotVal)))) - else: - inDict[key] = np.atleast_1d(np.array(data[inputRow,ix])) - else: - if sampledVars != None: - if key in sampledVars.keys(): - inDict[key], ix = copy.deepcopy(np.atleast_1d(np.array(sampledVars[key]))), 0 - if ix == None and key != 'InputPlaceHolder': - self.raiseAnError(IOError,"the parameter " + key + " has not been found") - # outputPivotVal end case - if outputPivotValEnd: - lastRow = data[:,0].size - 1 - if self.allOutParam: - for key in self.allFieldNames: - outDict[key] = np.atleast_1d(np.array(data[lastRow,self.allFieldNames.index(key)])) - else: - for key in outParam: - if key in self.allFieldNames: - outDict[key] = np.atleast_1d(np.array(data[lastRow,self.allFieldNames.index(key)])) - else: - self.raiseAnError(IOError,"the parameter " + str(key) + " has not been found") - elif outputRow != None: - if outputRow > data[:,0].size-1 and outputRow != -1: - self.raiseAnError(IOError,'outputRow is greater than number of actual rows in file '+ str(fileIn) + '!') - if self.allOutParam: - for key in self.allFieldNames: - outDict[key] = np.atleast_1d(np.array(data[outputRow,self.allFieldNames.index(key)])) - else: - for key in outParam: - if key in self.allFieldNames: - outDict[key] = np.atleast_1d(np.array(data[outputRow,self.allFieldNames.index(key)])) - else: - self.raiseAnError(IOError,"the parameter " + str(key) + " has not been found") - elif operator != None: - if operator not in ['max','min','average']: - self.raiseAnError(IOError,'operator unknown. Available are min,max,average') - if self.allOutParam: - for key in self.allFieldNames: - if operator == 'max': - outDict[key] = np.atleast_1d(np.array(np.max(data[:,self.allFieldNames.index(key)]))) - if operator == 'min': - outDict[key] = np.atleast_1d(np.array(np.min(data[:,self.allFieldNames.index(key)]))) - if operator == 'average': - outDict[key] = np.atleast_1d(np.array(np.average(data[:,self.allFieldNames.index(key)]))) - else: - for key in outParam: - if key in self.allFieldNames: - if operator == 'max': - outDict[key] = np.atleast_1d(np.array(np.max(data[:,self.allFieldNames.index(key)]))) - if operator == 'min': - outDict[key] = np.atleast_1d(np.array(np.min(data[:,self.allFieldNames.index(key)]))) - if operator == 'average': - outDict[key] = np.atleast_1d(np.array(np.average(data[:,self.allFieldNames.index(key)]))) - else: - self.raiseAnError(IOError,"the parameter " + str(key) + " has not been found") - else: - if self.allOutParam: - for key in self.allFieldNames: - outDict[key] = np.atleast_1d(np.array(interp1d(data[:,pivotIndex], data[:,self.allFieldNames.index(key)], kind='linear')(outputPivotVal))) - else: - for key in outParam: - if key in self.allFieldNames: - outDict[key] = np.atleast_1d(np.array(interp1d(data[:,pivotIndex], data[:,self.allFieldNames.index(key)], kind='linear')(outputPivotVal))) - else: - self.raiseAnError(IOError,"the parameter " + key + " has not been found") - - if 'alias' in options.keys(): - for aliasType in options['alias'].keys(): - for var in options['alias'][aliasType].keys(): - if options['alias'][aliasType][var] in inDict.keys(): - varValue = inDict.pop(options['alias'][aliasType][var]) - inDict[var] = varValue - elif options['alias'][aliasType][var] in outDict.keys(): - varValue = outDict.pop(options['alias'][aliasType][var]) - outDict[var] = varValue - - return (inDict,outDict) - - def __csvLoaderForPointSet(self,filesIn,options): - """ - loader for outputPivotVal point set data type - @ In, filesIn, string, file name - @ In, options, dict, dictionary of options: - outputPivotVal, outputPivotVal - inParam, input Parameters - outParam, output Parameters - inputRow, outputPivotVal-step from which the input parameters need to be taken - sampledVars, optional, dictionary of input parameters. The code is going to - look for the inParams in the CSV, if it does not find it - it will try to get the values from this dictionary (if present) - - - - - - - - @ Out, (inDict,outDict), tuple, the tuple containing the input and output dictionaries - """ - inParam, outParam, inputRow, outputRow = copy.deepcopy(options['inParam']), copy.deepcopy(options['outParam']), copy.deepcopy(options.get('inputRow',None)), copy.deepcopy(options.get('outputRow',None)) - sampledVars, inputPivotVal, outputPivotVal, operator = options.get('SampledVars',None), options.get('inputPivotValue',None), options.get('outputPivotValue',None), options.get('operator',None) - pivotParameter = options.get('pivotParameter',None) - - if 'alias' in options.keys(): - for aliasType in options['alias'].keys(): - for var in options['alias'][aliasType].keys(): - if var.strip() in inParam if aliasType == 'input' else outParam: - checkVars = sampledVars.keys() if sampledVars is not None else [] - if aliasType == 'input' and var.strip() not in checkVars: - inParam[inParam.index(var.strip())] = options['alias'][aliasType][var] - elif aliasType == 'output': - outParam[outParam.index(var.strip())] = options['alias'][aliasType][var] - else: - self.raiseAWarning('the ' + aliasType +' alias"'+var.strip()+'" has been defined but has not been found among the variables!') - - self.allOutParam = 'all' in outParam - if outputPivotVal != None: - outputPivotValEnd = 'end' in outputPivotVal - if not outputPivotValEnd: - outputPivotVal = float(outputPivotVal) - else: - outputPivotValEnd = operator is None and outputRow is None - if [inputRow,inputPivotVal].count(None) == 2: - inputRow = 0 - if inputRow != None : - inputRow = int(inputRow) - if inputRow > 0: - inputRow -= 1 - if outputRow != None: - outputRow = int(outputRow) - if outputRow > 0: - outputRow -= 1 - inDict, outDict = {}, {} - - for i in range(len(filesIn)): - #load the data into the numpy array - data = self.loadCsvFile(filesIn[i]) - if pivotParameter != None: - pivotIndex = self.allFieldNames.index(pivotParameter) if pivotParameter in self.allFieldNames else None - if pivotIndex == None: - self.raiseAnError(IOError,'pivotParameter ' +pivotParameter+' has not been found in file '+ str(filesIn[i]) + '!') - else: - pivotIndex = self.allFieldNames.index("time") if "time" in self.allFieldNames else None - # if None...default is 0 - if pivotIndex == None: - pivotIndex = 0 - if inputRow > data[:,0].size-1 and inputRow != -1: - self.raiseAnError(IOError,'inputRow is greater than number of actual rows in file '+ str(filesIn[i]) + '!') - - if i == 0: - if(self.allOutParam): - self.fieldNames = self.allFieldNames - else: - self.fieldNames = outParam - #fill input param dictionary - for key in inParam: - if i == 0: - inDict[key] = np.zeros(len(filesIn),dtype=object) #[0.0]*len(filesIn) # - ix = self.allFieldNames.index(key) if key in self.allFieldNames else None - if ix != None: - if inputPivotVal != None: - if float(inputPivotVal) > np.max(data[:,pivotIndex]) or float(inputPivotVal) < np.min(data[:,pivotIndex]): - self.raiseAnError(IOError,'inputPivotVal is out of the min and max for input ' + key+' in file '+ str(filesIn[i]) + '!') - inDict[key][i] = interp1d(data[:,pivotIndex], data[:,ix], kind='linear')(float(inputPivotVal)) - else: - inDict[key][i] = data[inputRow,ix] - else: - if sampledVars != None: - if key in sampledVars.keys(): - inDict[key][i], ix = copy.deepcopy(sampledVars[key]), 0 - if ix == None and key != 'InputPlaceHolder': - self.raiseAnError(IOError,"the parameter " + key + " has not been found") - # outputPivotVal end case - if outputPivotValEnd: - lastRow = data[:,0].size - 1 - if self.allOutParam: - for key in self.allFieldNames: - if i == 0: - outDict[key] = np.zeros(len(filesIn)) - outDict[key][i] = data[lastRow,self.allFieldNames.index(key)] - else: - for key in outParam: - if key in self.allFieldNames: - if i == 0: - outDict[key] = np.zeros(len(filesIn)) - outDict[key][i] = data[lastRow,self.allFieldNames.index(key)] - else: - self.raiseAnError(IOError,"the parameter " + str(key) + " has not been found") - elif outputRow != None: - if outputRow > data[: - ,0].size-1 and outputRow != -1: self.raiseAnError(IOError,'outputRow is greater than number of actual rows in file '+ str(filesIn[i]) + '!') - if self.allOutParam: - for key in self.allFieldNames: - if i == 0: - outDict[key] = np.zeros(len(filesIn)) - outDict[key][i] = data[outputRow,self.allFieldNames.index(key)] - else: - for key in outParam: - if key in self.allFieldNames: - if i == 0: - outDict[key] = np.zeros(len(filesIn)) - outDict[key][i] = data[outputRow,self.allFieldNames.index(key)] - else: - self.raiseAnError(IOError,"the parameter " + str(key) + " has not been found") - elif operator != None: - if operator not in ['max','min','average']: - self.raiseAnError(IOError,'operator unknown. Available are min,max,average') - if self.allOutParam: - for key in self.allFieldNames: - if i == 0: - outDict[key] = np.zeros(len(filesIn)) - if operator == 'max': - outDict[key][i] = np.max(data[:,self.allFieldNames.index(key)]) - if operator == 'min': - outDict[key][i] = np.min(data[:,self.allFieldNames.index(key)]) - if operator == 'average': - outDict[key][i] = np.average(data[:,self.allFieldNames.index(key)]) - else: - for key in outParam: - if key in self.allFieldNames: - if i == 0: - outDict[key] = np.zeros(len(filesIn)) - if operator == 'max': - outDict[key][i] = np.max(data[:,self.allFieldNames.index(key)]) - if operator == 'min': - outDict[key][i] = np.min(data[:,self.allFieldNames.index(key)]) - if operator == 'average': - outDict[key][i] = np.average(data[:,self.allFieldNames.index(key)]) - else: - self.raiseAnError(IOError,"the parameter " + str(key) + " has not been found") - else: - if self.allOutParam: - for key in self.allFieldNames: - if i == 0: - outDict[key] = np.zeros(len(filesIn)) - outDict[key][i] = interp1d(data[:,pivotIndex], data[:,self.allFieldNames.index(key)], kind='linear')(outputPivotVal) - else: - for key in outParam: - if i == 0: - outDict[key] = np.zeros(len(filesIn)) - if key in self.allFieldNames: - outDict[key][i] = interp1d(data[:,pivotIndex], data[:,self.allFieldNames.index(key)], kind='linear')(outputPivotVal) - else: - self.raiseAnError(IOError,"the parameter " + key + " has not been found") - del data - - if 'alias' in options.keys(): - for aliasType in options['alias'].keys(): - for var in options['alias'][aliasType].keys(): - if options['alias'][aliasType][var] in inDict.keys(): - varValue = inDict.pop(options['alias'][aliasType][var]) - inDict[var] = varValue - elif options['alias'][aliasType][var] in outDict.keys(): - varValue = outDict.pop(options['alias'][aliasType][var]) - outDict[var] = varValue - return (inDict,outDict) - - def __csvLoaderForHistory(self,fileIn,options): - """ - loader for history data type - @ In, fileIn, string, file name - @ In, options, dict, dictionary of options: - outputPivotVal, outputPivotVal - inParam, input Parameters - outParam, output Parameters - inputRow, outputPivotVal-step from which the input parameters need to be taken - sampledVars, optional, dictionary of input parameters. The code is going to - look for the inParams in the CSV, if it does not find it - it will try to get the values from this dictionary (if present) - - - - - - @ Out, (inDict,outDict), tuple, the tuple containing the input and output dictionaries - """ - inParam, outParam, inputRow = copy.deepcopy(options['inParam']), copy.deepcopy(options['outParam']), copy.deepcopy(options.get('inputRow',None)) - sampledVars, inputPivotVal, outputPivotVal = options.get('SampledVars',None), options.get('inputPivotValue',None), options.get('outputPivotValue',None) - pivotParameter = options.get('pivotParameter',None) - if 'alias' in options.keys(): - for aliasType in options['alias'].keys(): - for var in options['alias'][aliasType].keys(): - if var.strip() in inParam if aliasType == 'input' else outParam: - if aliasType == 'input' and var.strip() not in sampledVars.keys() if sampledVars is not None else []: - inParam[inParam.index(var.strip())] = options['alias'][aliasType][var] - elif aliasType == 'output': - outParam[outParam.index(var.strip())] = options['alias'][aliasType][var] - else: - self.raiseAWarning('the ' + aliasType +' alias"'+var.strip()+'" has been defined but has not been found among the variables!') - - #load the data into the numpy array - data = self.loadCsvFile(fileIn) - self.allOutParam = 'all' in outParam - if pivotParameter != None: - pivotIndex = self.allFieldNames.index(pivotParameter) if pivotParameter in self.allFieldNames else None - if pivotIndex == None: - self.raiseAnError(IOError,'pivotParameter ' +pivotParameter+' has not been found in file '+ str(fileIn) + '!') - else: - pivotIndex = self.allFieldNames.index("time") if "time" in self.allFieldNames else None - # if None...default is 0 - if pivotIndex == None: - pivotIndex = 0 - outputPivotValAll = True - if outputPivotVal != None: - outputPivotValAll = 'all' in outputPivotVal - if not outputPivotValAll: - outputPivotVal = [float(x) for x in outputPivotVal.split()] - if [inputRow,inputPivotVal].count(None) == 2: - inputRow = 0 - if inputRow != None : - inputRow = int(inputRow) - if inputRow > 0: - inputRow -= 1 - if inputRow > data[:,0].size-1 and inputRow != -1: - self.raiseAnError(IOError,'inputRow is greater than number of actual rows in file '+ str(fileIn) + '!') - inDict, outDict = {}, {} - self.fieldNames = self.allFieldNames if self.allOutParam else outParam - - #fill input param dictionary - for key in inParam: - inDict[key] = np.zeros(1) - ix = self.allFieldNames.index(key) if key in self.allFieldNames else None - if ix != None: - if inputPivotVal != None: - if float(inputPivotVal) > np.max(data[:,pivotIndex]) or float(inputPivotVal) < np.min(data[:,pivotIndex]): - self.raiseAnError(IOError,'inputPivotVal is out of the min and max for input ' + key+' in file '+ str(fileIn) + '!') - inDict[key] = np.atleast_1d(np.array(interp1d(data[:,pivotIndex], data[:,ix], kind='linear')(float(inputPivotVal)))) - else: - inDict[key] = np.atleast_1d(np.array(data[inputRow,ix])) - else: - if sampledVars != None: - if key in sampledVars.keys(): - inDict[key], ix = copy.deepcopy(np.atleast_1d(sampledVars[key])), 0 - if ix == None and key != 'InputPlaceHolder': - self.raiseAnError(IOError,"the parameter " + key + " has not been found") - - # outputPivotVal all case - if outputPivotValAll: - if self.allOutParam: - for key in self.allFieldNames: - outDict[key] = data[:,self.allFieldNames.index(key)] - else: - for key in outParam: - if key in self.allFieldNames: - outDict[key] = data[:,self.allFieldNames.index(key)] - else: - self.raiseAnError(IOError,"the parameter " + key + " has not been found") - else: - # pivot value - if self.allOutParam: - for key in self.allFieldNames: - outDict[key] = np.atleast_1d(np.array(interp1d(data[:,pivotIndex], data[:,self.allFieldNames.index(key)], kind='linear')(outputPivotVal))) - else: - for key in outParam: - if key in self.allFieldNames: - outDict[key] = np.atleast_1d(np.array(interp1d(data[:,pivotIndex], data[:,self.allFieldNames.index(key)], kind='linear')(outputPivotVal))) - else: - self.raiseAnError(IOError,"the parameter " + key + " has not been found") - - if 'alias' in options.keys(): - for aliasType in options['alias'].keys(): - for var in options['alias'][aliasType].keys(): - if options['alias'][aliasType][var] in inDict.keys(): - varValue = inDict.pop(options['alias'][aliasType][var]) - inDict[var] = varValue - elif options['alias'][aliasType][var] in outDict.keys(): - varValue = outDict.pop(options['alias'][aliasType][var]) - outDict[var] = varValue - - return (inDict,outDict) diff --git a/framework/GridEntities.py b/framework/GridEntities.py index f8d4d6e8ea..e27bcd56c7 100644 --- a/framework/GridEntities.py +++ b/framework/GridEntities.py @@ -32,7 +32,7 @@ #External Modules End-------------------------------------------------------------------------------- #Internal Modules------------------------------------------------------------------------------------ -from utils.utils import UreturnPrintTag,partialEval,compare, metaclass_insert +from utils.utils import UreturnPrintTag,partialEval,floatConversion,compare, metaclass_insert from BaseClasses import BaseType import utils.TreeStructure as ETS from utils.RAVENiterators import ravenArrayIterator @@ -351,7 +351,7 @@ def _fillGrid(self,child): self.raiseAnError(IOError,"Each XML node needs to have the attribute type!!!!") nameGrid = None if constrType in ['custom','equal']: - bounds = [partialEval(element) for element in child.text.split()] + bounds = [floatConversion(element) for element in child.text.split()] bounds.sort() lower, upper = min(bounds), max(bounds) if 'name' in child.attrib.keys(): diff --git a/framework/PostProcessors/DataMining.py b/framework/PostProcessors/DataMining.py index a2cee0f4d6..7e120848e6 100644 --- a/framework/PostProcessors/DataMining.py +++ b/framework/PostProcessors/DataMining.py @@ -890,7 +890,15 @@ def __runTemporalSciKitLearn(self, Input): try: import PySide.QtCore as qtc + __QtAvailable = True +except ImportError as e: + try: + import PySide2.QtCore as qtc + __QtAvailable = True + except ImportError as e: + __QtAvailable = False +if __QtAvailable: class QDataMining(DataMining,qtc.QObject): """ DataMining class - Computes a hierarchical clustering from an input point @@ -966,7 +974,7 @@ def userInteraction(self): ## Give this UI a unique id in case other threads are requesting UI ## elements - uiID = unicode(id(self)) + uiID = str(id(self)) ## Send the request for a UI thread to the main application self.requestUI.emit('HierarchyWindow', uiID, @@ -993,7 +1001,5 @@ def signalDone(self,uiID): until the correct one has signaled it is done. @Out, None """ - if uiID == unicode(id(self)): + if uiID == str(id(self)): self.uiDone = True -except ImportError as e: - pass diff --git a/framework/PostProcessors/RavenOutput.py b/framework/PostProcessors/RavenOutput.py deleted file mode 100644 index 63f748021a..0000000000 --- a/framework/PostProcessors/RavenOutput.py +++ /dev/null @@ -1,259 +0,0 @@ -# Copyright 2017 Battelle Energy Alliance, LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -""" -Created on July 10, 2013 - -@author: alfoa -""" -from __future__ import division, print_function, unicode_literals, absolute_import -import warnings -warnings.simplefilter('default', DeprecationWarning) - -#External Modules--------------------------------------------------------------- -#External Modules End----------------------------------------------------------- - -#Internal Modules--------------------------------------------------------------- -from .PostProcessor import PostProcessor -from utils import utils -from utils import xmlUtils -from utils import InputData -import Files -import Runners -#Internal Modules End-------------------------------------------------------------------------------- - -class RavenOutput(PostProcessor): - """ - This postprocessor collects the outputs of RAVEN runs (XML format) and turns entries into a PointSet - Someday maybe it should do history sets too. - """ - pass - # DEPRECATED with the new decision that all postprocessors should be able to put their data into a data - # object of some kind. It should no longer be necessary to print to file then read back in again. - # However, the implementation can still be used to read in XML outputs from CSV printings, so we - # leave the code in the event it becomes desired again. - -# @classmethod -# def getInputSpecification(cls): -# """ -# Method to get a reference to a class that specifies the input data for -# class cls. -# @ In, cls, the class for which we are retrieving the specification -# @ Out, inputSpecification, InputData.ParameterInput, class to use for -# specifying input of cls. -# """ -# ## This will replace the lines above -# inputSpecification = super(RavenOutput, cls).getInputSpecification() -# -# inputSpecification.addSub(InputData.parameterInputFactory("dynamic", contentType=InputData.StringType)) -# -# FileType = InputData.parameterInputFactory("File") -# FileType.addParam("name", InputData.StringType, required=True) -# FileType.addParam("ID", InputData.FloatType) -# OutputType = InputData.parameterInputFactory("output", contentType=InputData.StringType) -# OutputType.addParam("name", InputData.StringType, required=True) -# FileType.addSub(OutputType) -# inputSpecification.addSub(FileType) -# -# return inputSpecification -# -# -# def __init__(self, messageHandler): -# """ -# Constructor -# @ In, messageHandler, MessageHandler, message handler object -# @ Out, None -# """ -# PostProcessor.__init__(self, messageHandler) -# self.printTag = 'POSTPROCESSOR RAVENOUTPUT' -# self.IDType = 'int' -# self.files = {} -# # keyed by ID, which gets you to... (self.files[ID]) -# # name: RAVEN name for file (from input) -# # fileObject: FileObject -# # paths: {varName:'path|through|xml|to|var'} -# self.dynamic = False #if true, reading in pivot as input and values as outputs -# -# def initialize(self,runInfo,inputs,initDict): -# """ -# Method to initialize pp -# @ In, runInfo, dict, dictionary of run info (e.g. working dir, etc) -# @ In, inputs, list, list of inputs -# @ In, initDict, dict, dictionary with initialization options -# @ Out, None -# """ -# PostProcessor.initialize(self, runInfo, inputs, initDict) -# #assign File objects to their proper place -# for id,fileDict in self.files.items(): -# found = False -# for i,input in enumerate(inputs): -# #skip things that aren't files -# if not isinstance(input,Files.File): -# continue -# #assign pointer to file object if match found -# if input.name == fileDict['name']: -# self.files[id]['fileObject'] = input -# found = True -# break -# if not found: -# self.raiseAnError(IOError,'Did not find file named "%s" among the Step inputs!' % (input.name)) -# -# def _localReadMoreXML(self,xmlNode): -# """ -# Function to read the portion of the xml input that belongs to this specialized class -# and initialize some stuff based on the inputs got -# @ In, xmlNode, xml.etree.Element, Xml element node -# @ Out, None -# """ -# paramInput = self.getInputSpecification()() -# paramInput.parseNode(xmlNode) -# self._handleInput(paramInput) -# -# def _handleInput(self, paramInput): -# """ -# Function to handle the parsed paramInput for this class. -# @ In, paramInput, ParameterInput, the already parsed input. -# @ Out, None -# """ -# -# #check if in dynamic mode; default is False -# dynamicNode = paramInput.findFirst('dynamic') -# if dynamicNode is not None: -# #could specify as true/false or just have the node present -# text = dynamicNode.value -# if text is not None: -# if text not in utils.stringsThatMeanFalse(): -# self.dynamic = True -# else: -# self.dynamic = True -# numberOfSources = 0 -# for child in paramInput.subparts: -# #if dynamic, accept a single file as -# #if not dynamic, accept a list of files -# if child.getName() == 'File': -# numberOfSources += 1 -# if 'name' not in child.parameterValues: -# self.raiseAnError(IOError,'Each "File" must have an associated "name"; missing for',child.getName(),child.value) -# #make sure you provide an ID and a file name -# if 'ID' not in child.parameterValues: -# id = 0 -# while id in self.files.keys(): -# id += 1 -# self.raiseAWarning(IOError,'Each "File" entry must have an associated "ID"; missing for',child.getName(),child.parameterValues['name'],'so ID is set to',id) -# else: -# #assure ID is a number, since it's going into a data object -# id = child.parameterValues['ID'] -# #if already used, raise an error -# if id in self.files.keys(): -# self.raiseAnError(IOError,'Multiple File nodes have the same ID:',id) -# #store id,filename pair -# self.files[id] = {'name':child.parameterValues['name'].strip(), 'fileObject':None, 'paths':{}} -# #user provides loading information as ans|pearson|x -# for cchild in child.subparts: -# if cchild.getName() == 'output': -# #make sure you provide a label for this data array -# if 'name' not in cchild.parameterValues: -# self.raiseAnError(IOError,'Must specify a "name" for each "output" block! Missing for:',cchild.text) -# varName = cchild.parameterValues['name'].strip() -# if varName in self.files[id]['paths'].keys(): -# self.raiseAnError(IOError,'Multiple "output" blocks for "%s" have the same "name":' %self.files[id]['name'],varName) -# self.files[id]['paths'][varName] = cchild.value.strip() -# #if dynamic, only one File can be specified currently; to fix this, how do you handle different-lengthed times in same data object? -# if self.dynamic and numberOfSources > 1: -# self.raiseAnError(IOError,'For Dynamic reading, only one "File" node can be specified! Got',numberOfSources,'nodes.') -# # check there are entries for each -# if len(self.files)<1: -# self.raiseAWarning('No files were specified to read from! Nothing will be done...') -# # if no outputs listed, remove file from list and warn -# toRemove=[] -# for id,fileDict in self.files.items(): -# if len(fileDict['paths'])<1: -# self.raiseAWarning('No outputs were specified for File with ID "%s"! No extraction will be performed for this file...' %str(id)) -# toRemove.append(id) -# for rem in toRemove: -# del self.files[id] -# -# def run(self, inputIn): -# """ -# This method executes the postprocessor action. -# @ In, inputIn, dict, dictionary of data to process -# @ Out, outputDict, dict, dictionary containing the post-processed results -# """ -# # outputs are realizations that will got into data object -# outputDict={'realizations':[]} -# if self.dynamic: -# #outputs are basically a point set with pivot as input and requested XML path entries as output -# fileName = utils.first(self.files.values())['fileObject'].getAbsFile() -# root,_ = xmlUtils.loadToTree(fileName) -# #determine the pivot parameter -# pivot = root[0].tag -# numPivotSteps = len(root) -# #read from each iterative pivot step -# for p,pivotStep in enumerate(root): -# realization = {'inputs':{},'outputs':{},'metadata':{'loadedFromRavenFile':fileName}} -# realization['inputs'][pivot] = float(pivotStep.attrib['value']) -# for name,path in utils.first(self.files.values())['paths'].items(): -# desiredNode = self._readPath(pivotStep,path,fileName) -# realization['outputs'][name] = float(desiredNode.text) -# outputDict['realizations'].append(realization) -# else: -# # each ID results in a realization for the requested attributes -# for id,fileDict in self.files.items(): -# realization = {'inputs':{'ID':id},'outputs':{},'metadata':{'loadedFromRavenFile':str(fileDict['fileObject'])}} -# for varName,path in fileDict['paths'].items(): -# #read the value from the file's XML -# root,_ = xmlUtils.loadToTree(fileDict['fileObject'].getAbsFile()) -# desiredNode = self._readPath(root,path,fileDict['fileObject'].getAbsFile()) -# realization['outputs'][varName] = float(desiredNode.text) -# outputDict['realizations'].append(realization) -# return outputDict -# -# def collectOutput(self, finishedJob, output): -# """ -# Function to place all of the computed data into the output object -# @ In, finishedJob, JobHandler External or Internal instance, A JobHandler object that is in charge of running this post-processor -# @ In, output, dataObjects, The object where we want to place our computed results -# @ Out, None -# """ -# evaluation = finishedJob.getEvaluation() -# if isinstance(evaluation, Runners.Error): -# self.raiseAnError(RuntimeError, "No available output to collect (run possibly not finished yet)") -# -# outputDictionary = evaluation[1] -# realizations = outputDictionary['realizations'] -# for real in realizations: -# for key in output.getParaKeys('inputs'): -# if key not in real['inputs'].keys(): -# self.raiseAnError(RuntimeError, 'Requested input variable '+key+' has not been extracted. Check the consistency of your input') -# output.updateInputValue(key,real['inputs'][key]) -# for key in output.getParaKeys('outputs'): -# if key not in real['outputs'].keys(): -# self.raiseAnError(RuntimeError, 'Requested output variable '+key+' has not been extracted. Check the consistency of your input') -# output.updateOutputValue(key,real['outputs'][key]) -# for key,val in real['metadata'].items(): -# output.updateMetadata(key,val) -# -# def _readPath(self,root,inpPath,fileName): -# """ -# Reads in values from XML tree. -# @ In, root, xml.etree.ElementTree.Element, node to start from -# @ In, inPath, string, |-separated list defining path from root (not including root) -# @ In, fileName, string, used in error -# @ Out, desiredNode, xml.etree.ElementTree.Element, desired node -# """ -# #improve path format -# path = '/'.join(c.strip() for c in inpPath.strip().split('/')) -# desiredNode = xmlUtils.findPath(root,path) -# if desiredNode is None: -# self.raiseAnError(RuntimeError,'Did not find "%s/%s" in file "%s"' %(root.tag,path,fileName)) -# return desiredNode diff --git a/framework/PostProcessors/TopologicalDecomposition.py b/framework/PostProcessors/TopologicalDecomposition.py index 6d0619ffab..844d4fd520 100644 --- a/framework/PostProcessors/TopologicalDecomposition.py +++ b/framework/PostProcessors/TopologicalDecomposition.py @@ -361,6 +361,15 @@ def run(self, inputIn): try: import PySide.QtCore as qtc + __QtAvailable = True +except ImportError as e: + try: + import PySide2.QtCore as qtc + __QtAvailable = True + except ImportError as e: + __QtAvailable = False + +if __QtAvailable: class QTopologicalDecomposition(TopologicalDecomposition,qtc.QObject): """ TopologicalDecomposition class - Computes an approximated hierarchical @@ -431,7 +440,7 @@ def userInteraction(self): ## Give this UI a unique id in case other threads are requesting UI ## elements - uiID = unicode(id(self)) + uiID = str(id(self)) ## Send the request for a UI thread to the main application self.requestUI.emit('TopologyWindow', uiID, @@ -467,7 +476,5 @@ def signalDone(self,uiID): until the correct one has signaled it is done. @Out, None """ - if uiID == unicode(id(self)): + if uiID == str(id(self)): self.uiDone = True -except ImportError as e: - pass diff --git a/framework/Samplers/Grid.py b/framework/Samplers/Grid.py index c7fb67a22e..c85c598b73 100644 --- a/framework/Samplers/Grid.py +++ b/framework/Samplers/Grid.py @@ -100,6 +100,7 @@ def localInputAndChecks(self,xmlNode, paramInput): if 'limit' in paramInput.parameterValues: self.raiseAnError(IOError,'limit is not used in Grid sampler') self.limit = 1 + ##FIXME: THIS READ MORE XML MUST BE CONVERTED IN THE INPUTPARAMETER COLLECTOR!!!!!!! self.gridEntity._readMoreXml(xmlNode,dimensionTags=["variable","Distribution"],messageHandler=self.messageHandler, dimTagsPrefix={"Distribution":""}) grdInfo = self.gridEntity.returnParameter("gridInfo") for axis, value in grdInfo.items(): diff --git a/framework/SupervisedLearning/PolyExponential.py b/framework/SupervisedLearning/PolyExponential.py index 784a39cf5f..5502ca4c9e 100644 --- a/framework/SupervisedLearning/PolyExponential.py +++ b/framework/SupervisedLearning/PolyExponential.py @@ -40,9 +40,9 @@ class PolyExponential(supervisedLearning): """ - This surrogate is aimed to construct a "time-dep" surrogate based on a polynomial sum of exponentials + This surrogate is aimed to construct a time-dep surrogate based on a polynomial sum of exponentials The surrogate will have the form: - SM(X,z) = \sum_{i=1}^N P_i(X) \exp ( - Q_i(X) z ) + SM(X,z) = sum_{i=1}^N P_i(X) exp ( - Q_i(X) z ) where: z is the independent monotonic variable (e.g. time) X is the vector of the other independent (parametric) variables @@ -90,11 +90,12 @@ def __computeExpTerms(self, x, y, returnPredictDiff=True): """ Method to compute the coefficients of "n" exponential terms that minimize the difference between the training data and the "predicted" data - y(x) = \sum_{i=1}^n a_i \exp ( - b_i x ) + y(x) = sum_{i=1}**n a_i exp ( - bi x ) @ In, x, numpy.ndarray, the x values @ In, y, numpy.ndarray, the target values @ In, storePredictDiff, bool, optional, True if the prediction differences need to be returned (default False) - @ Out, (fi, 1/taui, predictionErr (optional) ), tuple(numpy.ndarray, numpy.ndarray, numpy.ndarray (optional)), a_i and b_i and predictionErr (if returnPredictDiff=True) + @ Out, (fi, taui**(-1), predictionErr (optional) ), tuple(numpy.ndarray, numpy.ndarray, numpy.ndarray (optional)), + ai and bi and predictionErr (if returnPredictDiff=True) """ def _objective(s): """ @@ -130,7 +131,7 @@ def _objective(s): def __evaluateExpTerm(self,x, a, b): """ Evaluate exponential term given x, a and b - y(x) = \sum_{i=1}^n a_i \exp ( - b_i x ) + y(x) = sum_{i=1}**n ai exp ( - bi x ) @ In, x, numpy.ndarray, the x values @ In, a, numpy.ndarray, the a values @ In, b, numpy.ndarray, the b values @@ -239,12 +240,12 @@ def writeXMLPreamble(self, writeTo, targets = None): @ Out, None """ # add description - description = " This XML file contains the main information of the PolyExponential ROM." - description += " If ``coefficients'' are dumped for each realization, the evaluation function (for each realization ``j'') is as follows:" - description += " $SM_{j}(z) = \sum_{i=1}^{N}f_{i}*exp^{-tau_{i}*z}$, with ``z'' beeing the monotonic variable and ``N'' the" - description += " number of exponential terms (expTerms). If the Polynomial coefficients ``poly\_coefficients'' are" - description += " dumped, the SM evaluation function is as follows:" - description += " $SM(X,z) = \sum_{i=1}^{N} P_{i}(X)*exp^{-Q_{i}(X)*z}$, with ``P'' and ``Q'' the polynomial expressions of the exponential terms." + description = r" This XML file contains the main information of the PolyExponential ROM." + description += r" If ``coefficients'' are dumped for each realization, the evaluation function (for each realization ``j'') is as follows:" + description += r" $SM_{j}(z) = \sum_{i=1}^{N}f_{i}*exp^{-tau_{i}*z}$, with ``z'' beeing the monotonic variable and ``N'' the" + description += r" number of exponential terms (expTerms). If the Polynomial coefficients ``poly\_coefficients'' are" + description += r" dumped, the SM evaluation function is as follows:" + description += r" $SM(X,z) = \sum_{i=1}^{N} P_{i}(X)*exp^{-Q_{i}(X)*z}$, with ``P'' and ``Q'' the polynomial expressions of the exponential terms." writeTo.addScalar('ROM', "description", description) def writeXML(self, writeTo, targets = None, skip = None): diff --git a/framework/UI/BaseHierarchicalView.py b/framework/UI/BaseHierarchicalView.py index 05ee1d9bf6..5ecd946de3 100644 --- a/framework/UI/BaseHierarchicalView.py +++ b/framework/UI/BaseHierarchicalView.py @@ -21,9 +21,13 @@ import warnings warnings.simplefilter('default',DeprecationWarning) #End compatibility block for Python 3 +try: + from PySide.QtCore import QSize + from PySide.QtGui import QWidget +except ImportError as e: + from PySide2.QtCore import QSize + from PySide2.QtWidgets import QWidget -from PySide.QtCore import QSize -from PySide.QtGui import QWidget from .ZoomableGraphicsView import ZoomableGraphicsView diff --git a/framework/UI/BaseTopologicalView.py b/framework/UI/BaseTopologicalView.py index c11d784c97..567941e725 100644 --- a/framework/UI/BaseTopologicalView.py +++ b/framework/UI/BaseTopologicalView.py @@ -22,9 +22,12 @@ warnings.simplefilter('default',DeprecationWarning) #End compatibility block for Python 3 - -from PySide.QtCore import QSize -from PySide.QtGui import QWidget +try: + from PySide.QtCore import QSize + from PySide.QtGui import QWidget +except ImportError as e: + from PySide2.QtCore import QSize + from PySide2.QtWidgets import QWidget class BaseTopologicalView(QWidget): """ diff --git a/framework/UI/DendrogramView.py b/framework/UI/DendrogramView.py index d8d2cd6738..c61a82471c 100644 --- a/framework/UI/DendrogramView.py +++ b/framework/UI/DendrogramView.py @@ -24,11 +24,16 @@ import numpy as np import sys - -from PySide import QtCore as qtc -from PySide import QtGui as qtg -from PySide import QtGui as qtw -from PySide import QtSvg as qts +try: + from PySide import QtCore as qtc + from PySide import QtGui as qtg + from PySide import QtGui as qtw + from PySide import QtSvg as qts +except ImportError as e: + from PySide2 import QtCore as qtc + from PySide2 import QtGui as qtg + from PySide2 import QtWidgets as qtw + from PySide2 import QtSvg as qts from .BaseHierarchicalView import BaseHierarchicalView from .ZoomableGraphicsView import ZoomableGraphicsView diff --git a/framework/UI/FitnessView.py b/framework/UI/FitnessView.py index 8e37af9487..b6c9bfa43e 100644 --- a/framework/UI/FitnessView.py +++ b/framework/UI/FitnessView.py @@ -23,10 +23,16 @@ warnings.simplefilter('default',DeprecationWarning) #End compatibility block for Python 3 -from PySide import QtCore as qtc -from PySide import QtGui as qtg -from PySide import QtGui as qtw -from PySide import QtSvg as qts +try: + from PySide import QtCore as qtc + from PySide import QtGui as qtg + from PySide import QtGui as qtw + from PySide import QtSvg as qts +except ImportError as e: + from PySide2 import QtCore as qtc + from PySide2 import QtGui as qtg + from PySide2 import QtWidgets as qtw + from PySide2 import QtSvg as qts from .BaseTopologicalView import BaseTopologicalView @@ -260,7 +266,7 @@ def updateScene(self): fontWidth = fm.width(numTxtItem.text()) numTxtItem.setPos(x+(w-fontHeight)/2.,y-plotHeight+fontWidth) - numTxtItem.rotate(285) + #numTxtItem.rotate(285) #XXX not in qt5 numTxtItem.setFlag(qtw.QGraphicsItem.ItemIsMovable) numTxtItem.setFlag(qtw.QGraphicsItem.ItemIsSelectable) numTxtItem.setZValue(2) @@ -274,7 +280,7 @@ def updateScene(self): fontHeight = fm.height() fontWidth = fm.width(name) txtItem.setPos(x+(w-fontHeight)/2.,y) - txtItem.rotate(270) + #txtItem.rotate(270) #XXX not in qt5 txtItem.setFlag(qtw.QGraphicsItem.ItemIsMovable) txtItem.setFlag(qtw.QGraphicsItem.ItemIsSelectable) txtItem.setZValue(2) diff --git a/framework/UI/HierarchyWindow.py b/framework/UI/HierarchyWindow.py index 6c0b7c89a4..d117f2b5a3 100644 --- a/framework/UI/HierarchyWindow.py +++ b/framework/UI/HierarchyWindow.py @@ -23,9 +23,14 @@ warnings.simplefilter('default',DeprecationWarning) #End compatibility block for Python 3 -from PySide import QtCore as qtc -from PySide import QtGui as qtg -from PySide import QtGui as qtw +try: + from PySide import QtCore as qtc + from PySide import QtGui as qtg + from PySide import QtGui as qtw +except ImportError as e: + from PySide2 import QtCore as qtc + from PySide2 import QtGui as qtg + from PySide2 import QtWidgets as qtw from sys import path @@ -214,7 +219,7 @@ def setLevel(self, newLevel): linkage = self.engine.linkage - self.labels = np.zeros(len(list(self.engine.features.values())[0])) + self.labels = np.zeros(len(self.engine.outputDict['outputs']['labels'])) heads = {} @@ -264,7 +269,7 @@ def getColor(self,idx): """ if idx not in self.colorMap: # self.colorMap[idx] = qtg.QColor(*tuple(255*np.random.rand(3))) - self.colorMap[idx] = qtg.QColor(colors.colorCycle.next()) + self.colorMap[idx] = qtg.QColor(next(colors.colorCycle)) return self.colorMap[idx] @@ -274,8 +279,9 @@ def getData(self): @ In, None @ Out, data, nparray, the data being used by this window. """ - data = np.zeros((len(list(self.engine.features.values())[0]),len(self.engine.features.keys()))) - for col,value in enumerate(self.engine.features.values()): + data = np.zeros((len(self.engine.features), + len(self.engine.outputDict['inputs']))) + for col,value in enumerate(self.engine.outputDict['inputs']): data[:,col] = value return data @@ -283,9 +289,9 @@ def getDimensions(self): """ Get the dimensionality of the underlying data. @ In, None - @ Out, dimensionality, int, the dimensionality of the data being used. + @ Out, dimensionality, string list, the dimensions of the data being used. """ - return self.engine.features.keys() + return self.engine.features def getSelectedIndices(self): """ diff --git a/framework/UI/ScatterView.py b/framework/UI/ScatterView.py index 81912e9ffa..459ff77bc4 100644 --- a/framework/UI/ScatterView.py +++ b/framework/UI/ScatterView.py @@ -24,8 +24,12 @@ import matplotlib -from PySide import QtCore as qtc -from PySide import QtGui as qtw +try: + from PySide import QtCore as qtc + from PySide import QtGui as qtw +except ImportError as e: + from PySide2 import QtCore as qtc + from PySide2 import QtWidgets as qtw from .BaseHierarchicalView import BaseHierarchicalView @@ -183,12 +187,13 @@ def updateScene(self): specialColorKeywords = ['Cluster'] + string_type = '|U7' #If python 2 compatibility is needed, use '|S7' for key,cmb in self.cmbVars.items(): if dimensionality == 2 and key == 'Z': continue if cmb.currentText() == 'Cluster': labels = self.mainWindow.getLabels() - allValues[key] = np.array([self.mainWindow.getColor(label).name() for label in labels], dtype='|S7') + allValues[key] = np.array([self.mainWindow.getColor(label).name() for label in labels], dtype=string_type) values[key] = allValues[key][rows] self.lblColorMaps.setEnabled(False) self.cmbColorMaps.setEnabled(False) diff --git a/framework/UI/ScatterView2D.py b/framework/UI/ScatterView2D.py index 352fb45c36..4f4436779d 100644 --- a/framework/UI/ScatterView2D.py +++ b/framework/UI/ScatterView2D.py @@ -24,9 +24,15 @@ import matplotlib -from PySide import QtCore as qtc -from PySide import QtGui as qtg -from PySide import QtGui as qtw +try: + from PySide import QtCore as qtc + from PySide import QtGui as qtg + from PySide import QtGui as qtw +except ImportError as e: + from PySide2 import QtCore as qtc + from PySide2 import QtGui as qtg + from PySide2 import QtWidgets as qtw + from .BaseTopologicalView import BaseTopologicalView @@ -249,6 +255,7 @@ def updateScene(self): specialColorKeywords = ['Segment','Minimum Flow', 'Maximum Flow'] + string_type = '|U7' #If python 2 compatibility is needed, use '|S7' for key,cmb in self.cmbVars.items(): if cmb.currentText() == 'Predicted from Linear Fit': allValues[key] = self.amsc.PredictY(None) @@ -267,7 +274,7 @@ def updateScene(self): elif cmb.currentText() == 'Segment': colorMap = self.amsc.GetColors() partitions = self.amsc.Partitions() - allValues[key] = np.zeros(self.amsc.GetSampleSize(),dtype='|S7') + allValues[key] = np.zeros(self.amsc.GetSampleSize(),dtype=string_type) for extPair,items in partitions.items(): for item in items: allValues[key][item] = colorMap[extPair] @@ -277,7 +284,7 @@ def updateScene(self): elif cmb.currentText() == 'Maximum Flow': colorMap = self.amsc.GetColors() partitions = self.amsc.Partitions() - allValues[key] = np.zeros(self.amsc.GetSampleSize(),dtype='|S7') + allValues[key] = np.zeros(self.amsc.GetSampleSize(),dtype=string_type) for extPair,items in partitions.items(): for item in items: allValues[key][item] = colorMap[extPair[1]] @@ -287,7 +294,7 @@ def updateScene(self): elif cmb.currentText() == 'Minimum Flow': colorMap = self.amsc.GetColors() partitions = self.amsc.Partitions() - allValues[key] = np.zeros(self.amsc.GetSampleSize(),dtype='|S7') + allValues[key] = np.zeros(self.amsc.GetSampleSize(),dtype=string_type) for extPair,items in partitions.items(): for item in items: allValues[key][item] = colorMap[extPair[0]] @@ -315,7 +322,7 @@ def updateScene(self): lines = [] lineColors = [] for row in rows + minIdxs + maxIdxs: - cols = self.amsc.GetNeighbors(row) + cols = self.amsc.GetNeighbors(int(row)) for col in cols: if col in rows + minIdxs + maxIdxs: lines.append([(allValues['X'][row], allValues['Y'][row]), @@ -440,7 +447,7 @@ def test(self): self.updateScene() self.resizeEvent(qtg.QResizeEvent(qtc.QSize(1,1),qtc.QSize(100,100))) - pair = self.amsc.GetCurrentLabels()[0] + pair = list(self.amsc.GetCurrentLabels())[0] self.amsc.SetSelection([pair,pair[0],pair[1]]) self.updateScene() diff --git a/framework/UI/ScatterView3D.py b/framework/UI/ScatterView3D.py index dd47df8296..15eff3999a 100644 --- a/framework/UI/ScatterView3D.py +++ b/framework/UI/ScatterView3D.py @@ -22,14 +22,20 @@ warnings.simplefilter('default',DeprecationWarning) #End compatibility block for Python 3 -from PySide import QtCore as qtc -from PySide import QtGui as qtg -from PySide import QtGui as qtw +try: + from PySide import QtCore as qtc + from PySide import QtGui as qtg + from PySide import QtGui as qtw +except ImportError as e: + from PySide2 import QtCore as qtc + from PySide2 import QtGui as qtg + from PySide2 import QtWidgets as qtw + from .BaseTopologicalView import BaseTopologicalView import matplotlib -matplotlib.use('Qt4Agg') +matplotlib.use('Qt5Agg') from mpl_toolkits.mplot3d import Axes3D from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas @@ -251,6 +257,7 @@ def updateScene(self): specialColorKeywords = ['Segment','Minimum Flow', 'Maximum Flow'] + string_type = '|U7' #If python 2 compatibility is needed, use '|S7' for key,cmb in self.cmbVars.items(): if cmb.currentText() == 'Predicted from Linear Fit': allValues[key] = self.amsc.PredictY(None) @@ -269,7 +276,7 @@ def updateScene(self): elif cmb.currentText() == 'Segment': colorMap = self.amsc.GetColors() partitions = self.amsc.Partitions() - allValues[key] = np.zeros(self.amsc.GetSampleSize(),dtype='|S7') + allValues[key] = np.zeros(self.amsc.GetSampleSize(),dtype=string_type) for extPair,items in partitions.items(): for item in items: allValues[key][item] = colorMap[extPair] @@ -279,7 +286,7 @@ def updateScene(self): elif cmb.currentText() == 'Maximum Flow': colorMap = self.amsc.GetColors() partitions = self.amsc.Partitions() - allValues[key] = np.zeros(self.amsc.GetSampleSize(),dtype='|S7') + allValues[key] = np.zeros(self.amsc.GetSampleSize(),dtype=string_type) for extPair,items in partitions.items(): for item in items: allValues[key][item] = colorMap[extPair[1]] @@ -289,7 +296,7 @@ def updateScene(self): elif cmb.currentText() == 'Minimum Flow': colorMap = self.amsc.GetColors() partitions = self.amsc.Partitions() - allValues[key] = np.zeros(self.amsc.GetSampleSize(),dtype='|S7') + allValues[key] = np.zeros(self.amsc.GetSampleSize(),dtype=string_type) for extPair,items in partitions.items(): for item in items: allValues[key][item] = colorMap[extPair[0]] @@ -319,7 +326,7 @@ def updateScene(self): lines2 = [] lineIdxs = [] for row in rows + minIdxs + maxIdxs: - cols = self.amsc.GetNeighbors(row) + cols = self.amsc.GetNeighbors(int(row)) for col in cols: if col in rows + minIdxs + maxIdxs: if row < col: @@ -476,7 +483,7 @@ def test(self): self.updateScene() self.resizeEvent(qtg.QResizeEvent(qtc.QSize(1,1),qtc.QSize(100,100))) - pair = self.amsc.GetCurrentLabels()[0] + pair = list(self.amsc.GetCurrentLabels())[0] self.amsc.SetSelection([pair,pair[0],pair[1]]) self.updateScene() diff --git a/framework/UI/SensitivityView.py b/framework/UI/SensitivityView.py index 01904a95ac..7fbd14d9f4 100644 --- a/framework/UI/SensitivityView.py +++ b/framework/UI/SensitivityView.py @@ -23,10 +23,16 @@ warnings.simplefilter('default',DeprecationWarning) #End compatibility block for Python 3 -from PySide import QtCore as qtc -from PySide import QtGui as qtg -from PySide import QtGui as qtw -from PySide import QtSvg as qts +try: + from PySide import QtCore as qtc + from PySide import QtGui as qtg + from PySide import QtGui as qtw + from PySide import QtSvg as qts +except ImportError as e: + from PySide2 import QtCore as qtc + from PySide2 import QtGui as qtg + from PySide2 import QtWidgets as qtw + from PySide2 import QtSvg as qts from .BaseTopologicalView import BaseTopologicalView @@ -534,7 +540,7 @@ def test(self): self.bundledAction.setChecked(False) self.fillAction.setChecked(False) self.updateScene() - pair = self.amsc.GetCurrentLabels()[0] + pair = list(self.amsc.GetCurrentLabels())[0] self.amsc.SetSelection([pair,pair[0],pair[1]]) self.updateScene() diff --git a/framework/UI/TopologyMapView.py b/framework/UI/TopologyMapView.py index 9e04d42ab1..94cedc228a 100644 --- a/framework/UI/TopologyMapView.py +++ b/framework/UI/TopologyMapView.py @@ -30,10 +30,16 @@ warnings.simplefilter('default',DeprecationWarning) #End compatibility block for Python 3 -from PySide import QtCore as qtc -from PySide import QtGui as qtg -from PySide import QtGui as qtw -from PySide import QtSvg as qts +try: + from PySide import QtCore as qtc + from PySide import QtGui as qtg + from PySide import QtGui as qtw + from PySide import QtSvg as qts +except ImportError as e: + from PySide2 import QtCore as qtc + from PySide2 import QtGui as qtg + from PySide2 import QtWidgets as qtw + from PySide2 import QtSvg as qts from .BaseTopologicalView import BaseTopologicalView @@ -90,8 +96,11 @@ def __init__(self, path, parent=None, scene=None,data=None): @ In, data, a dictionary of data for this graphical item to display in its tooltip. """ - super(CustomPathItem, self).__init__(path,parent,scene) + #super(CustomPathItem, self).__init__(path,parent,scene) + super(CustomPathItem, self).__init__(path,parent) self.graphics = [] + if scene is not None: + scene.addItem(self) self.tipSize = qtc.QSize(0,0) font = qtg.QFont('Courier New',2) @@ -349,7 +358,7 @@ def itemChange(self, change, value): """ if change == qtw.QGraphicsItem.ItemSceneHasChanged: - for graphic,path in zip(self.graphics,self.paths): + for graphic in self.graphics: if graphic not in self.scene().items(): self.scene().addItem(graphic) return super(CustomPathItem,self).itemChange(change,value) @@ -920,7 +929,7 @@ def test(self): self.saveImage(self.windowTitle()+'.png') self.resizeEvent(qtg.QResizeEvent(qtc.QSize(1,1),qtc.QSize(100,100))) - pair = self.amsc.GetCurrentLabels()[0] + pair = list(self.amsc.GetCurrentLabels())[0] self.amsc.SetSelection([pair,pair[0],pair[1]]) self.colorAction.setChecked(True) self.fillAction.setChecked(True) @@ -934,7 +943,7 @@ def test(self): action.setChecked(True) self.updateScene() - pair = self.amsc.GetCurrentLabels()[0] + pair = list(self.amsc.GetCurrentLabels())[0] self.amsc.SetSelection([pair,pair[0],pair[1]]) genericMouseEvent = qtg.QMouseEvent(qtc.QEvent.MouseMove, qtc.QPoint(0,0), qtc.Qt.MiddleButton, qtc.Qt.MiddleButton, qtc.Qt.NoModifier) diff --git a/framework/UI/TopologyWindow.py b/framework/UI/TopologyWindow.py index 714bbc1a65..fcbb1375e7 100644 --- a/framework/UI/TopologyWindow.py +++ b/framework/UI/TopologyWindow.py @@ -24,8 +24,12 @@ warnings.simplefilter('default',DeprecationWarning) #End compatibility block for Python 3 -from PySide import QtCore as qtc -from PySide import QtGui as qtw +try: + from PySide import QtCore as qtc + from PySide import QtGui as qtw +except ImportError as e: + from PySide2 import QtCore as qtc + from PySide2 import QtWidgets as qtw from sys import path diff --git a/framework/UI/Tree.py b/framework/UI/Tree.py index b388c5541b..9d165280fa 100644 --- a/framework/UI/Tree.py +++ b/framework/UI/Tree.py @@ -158,18 +158,15 @@ def Layout(self,xoffset,width, truncationSize=0, truncationLevel=0): myOffset = xoffset - def cmp(a,b): + def key(a): """ - A function for comparing two Node items - @ In, a, Node, the first node to compare - @ In, b, Node, the second node to compare - @ Out, value, int, returns -1 if a > b, otherwise returns 1 + A function for getting a key for a Node + @ In, a, Node, the node to get a key from. + @ Out, value, the key """ - if a.level > b.level: - return -1 - return 1 + return a.level - children = sorted(self.children, cmp=cmp) + children = sorted(self.children, key=key) immediateDescendantXs = [] truncated = True diff --git a/framework/UI/ZoomableGraphicsView.py b/framework/UI/ZoomableGraphicsView.py index 50bb9a2fd9..0072d8b3ed 100644 --- a/framework/UI/ZoomableGraphicsView.py +++ b/framework/UI/ZoomableGraphicsView.py @@ -24,10 +24,17 @@ warnings.simplefilter('default',DeprecationWarning) #End compatibility block for Python 3 -from PySide import QtCore as qtc -from PySide import QtGui as qtg -from PySide import QtGui as qtw -from PySide import QtSvg as qts +try: + from PySide import QtCore as qtc + from PySide import QtGui as qtg + from PySide import QtGui as qtw + from PySide import QtSvg as qts +except ImportError as e: + from PySide2 import QtCore as qtc + from PySide2 import QtGui as qtg + from PySide2 import QtWidgets as qtw + from PySide2 import QtSvg as qts + import os ################################################################################ diff --git a/framework/UI/colors.py b/framework/UI/colors.py index e2e48c7ad6..e72324ca39 100644 --- a/framework/UI/colors.py +++ b/framework/UI/colors.py @@ -26,7 +26,11 @@ from matplotlib import cm, colors import numpy as np import itertools -from PySide.QtGui import QColor + +try: + from PySide.QtGui import QColor +except ImportError as e: + from PySide2.QtGui import QColor minPenColor = QColor(33,102,172) minBrushColor = QColor(67,147,195) diff --git a/framework/contrib/AMSC/AMSC_Object.py b/framework/contrib/AMSC/AMSC_Object.py index 8e1256f7ef..413c5c0328 100644 --- a/framework/contrib/AMSC/AMSC_Object.py +++ b/framework/contrib/AMSC/AMSC_Object.py @@ -1003,9 +1003,17 @@ def GetNeighbors(self,idx): """ return self.__amsc.Neighbors(idx) - try: import PySide.QtCore as qtc + __QtAvailable = True +except ImportError as e: + try: + import PySide2.QtCore as qtc + __QtAvailable = True + except ImportError as e: + __QtAvailable = False + +if __QtAvailable: TolColors = ['#88CCEE', '#DDCC77', '#AA4499', '#117733', '#332288', '#999933', '#44AA99', '#882255', '#CC6677'] @@ -1240,8 +1248,5 @@ def FitsSynced(self): return False return True - -except ImportError as e: - pass # sys.stderr.write(str(e) +'\n') # sys.exit(1) diff --git a/framework/unSupervisedLearning.py b/framework/unSupervisedLearning.py index fd6a901dbd..a6ba8dc4f4 100644 --- a/framework/unSupervisedLearning.py +++ b/framework/unSupervisedLearning.py @@ -37,6 +37,8 @@ import abc import ast import copy +import matplotlib +import platform #External Modules End----------------------------------------------------------- #Internal Modules--------------------------------------------------------------- from utils import utils @@ -45,6 +47,9 @@ import DataObjects #Internal Modules End----------------------------------------------------------- +if platform.system() == 'Windows': + matplotlib.use('Agg') + class unSupervisedLearning(utils.metaclass_insert(abc.ABCMeta), MessageHandler.MessageUser): """ This is the general interface to any unSuperisedLearning learning method. @@ -1315,16 +1320,16 @@ def __trainLocal__(self): self.linkage = self.Method.linkage(self.normValues,self.initOptionDict['method'],self.initOptionDict['metric']) if 'dendrogram' in self.initOptionDict and self.initOptionDict['dendrogram'] == 'true': - self.ddata = self.advDendrogram(self.linkage, - p = float(self.initOptionDict['p']), - leaf_rotation = 90., - leaf_font_size = 12., - truncate_mode = self.initOptionDict['truncationMode'], - show_leaf_counts = self.initOptionDict['leafCounts'], - show_contracted = self.initOptionDict['showContracted'], - annotate_above = self.initOptionDict['annotatedAbove'], - #orientation = self.initOptionDict['orientation'], - max_d = self.initOptionDict['level']) + self.advDendrogram(self.linkage, + p = float(self.initOptionDict['p']), + leaf_rotation = 90., + leaf_font_size = 12., + truncate_mode = self.initOptionDict['truncationMode'], + show_leaf_counts = self.initOptionDict['leafCounts'], + show_contracted = self.initOptionDict['showContracted'], + annotate_above = self.initOptionDict['annotatedAbove'], + #orientation = self.initOptionDict['orientation'], + max_d = self.initOptionDict['level']) self.labels_ = hier.hierarchy.fcluster(self.linkage, self.initOptionDict['level'],self.initOptionDict['criterion']) self.outputDict['outputs']['labels'] = self.labels_ @@ -1364,7 +1369,6 @@ def advDendrogram(self,*args, **kwargs): title = 'dendrogram.pdf' plt.savefig(title) plt.close() - return ddata def __evaluateLocal__(self,*args, **kwargs): """ diff --git a/plugins/ExamplePlugin/tests/gold/ravenRunningRavenPlugin/testPointSet_dump.csv b/plugins/ExamplePlugin/tests/gold/ravenRunningRavenPlugin/testPointSet_dump.csv index d2b74d3cc6..5869c96015 100644 --- a/plugins/ExamplePlugin/tests/gold/ravenRunningRavenPlugin/testPointSet_dump.csv +++ b/plugins/ExamplePlugin/tests/gold/ravenRunningRavenPlugin/testPointSet_dump.csv @@ -1,5 +1,3 @@ a,c,b,Xi,monotonicVariable -3.97904821433,0.634425606028,0.000102768564541,1.90891603956e+22,1000000.0 -3.97904821433,0.224664963136,0.000102768564541,1.90891603956e+22,1000000.0 -4.05838057324,0.634425606028,0.00010149511176,4.22010138019e+22,1000000.0 -4.05838057324,0.224664963136,0.00010149511176,4.22010138019e+22,1000000.0 +3.979048214327886,0.6344256060278103,0.0001027685645406647,1.9089160395552006e+22,1000000.0 +4.058380573241912,0.6344256060278103,0.00010149511176025332,4.220101380187826e+22,1000000.0 diff --git a/plugins/ExamplePlugin/tests/ravenRunningRavenPlugin/test_example_plugin.xml b/plugins/ExamplePlugin/tests/ravenRunningRavenPlugin/test_example_plugin.xml index b64fa888cc..76aa74f1e6 100644 --- a/plugins/ExamplePlugin/tests/ravenRunningRavenPlugin/test_example_plugin.xml +++ b/plugins/ExamplePlugin/tests/ravenRunningRavenPlugin/test_example_plugin.xml @@ -43,7 +43,7 @@ - 2 + 1 0.0001 -0.5 diff --git a/plugins/ExamplePlugin/tests/test_raven_running_raven_plugin.xml b/plugins/ExamplePlugin/tests/test_raven_running_raven_plugin.xml index b60740dbd2..ccd30204ba 100644 --- a/plugins/ExamplePlugin/tests/test_raven_running_raven_plugin.xml +++ b/plugins/ExamplePlugin/tests/test_raven_running_raven_plugin.xml @@ -11,6 +11,9 @@ This is a requirement test now. + + Removed HDF5 dumping in order to reduce overhead of IO on HPC slow systems. + In addition, it invokes python directly to remove a bit of overhead for establishing conda R-SI-2 @@ -18,7 +21,7 @@ ravenRunningRavenPlugin FirstMRun - + 1 1 mpi @@ -34,7 +37,6 @@ test_example_plugin.xml raven_running_plugin MC_external - test_external_db testPointSet testPointSet_dump @@ -43,7 +45,7 @@ - %FRAMEWORK_DIR%/../raven_framework + python %FRAMEWORK_DIR%/../framework/Driver.py dumpSumOfExpOutput Samplers|MonteCarlo@name:test_MC|constant@name:b Samplers|MonteCarlo@name:test_MC|constant@name:a @@ -77,11 +79,6 @@ - - - - - diff --git a/tests/framework/PostProcessors/DataMiningPostProcessor/Clustering/tests b/tests/framework/PostProcessors/DataMiningPostProcessor/Clustering/tests index 3a9d292f5d..496765d26f 100644 --- a/tests/framework/PostProcessors/DataMiningPostProcessor/Clustering/tests +++ b/tests/framework/PostProcessors/DataMiningPostProcessor/Clustering/tests @@ -109,7 +109,7 @@ [./interactive_UI] type = 'RavenFramework' input = 'hierarchical_ui.xml' - skip = 'Requires windowing system' + #skip = 'Requires windowing system' csv = 'Hierarchical/ui_data.csv' output = 'Hierarchical/ui_data.xml' required_libraries = 'AMSC PySide' diff --git a/tests/framework/PostProcessors/TopologicalPostProcessor/tests b/tests/framework/PostProcessors/TopologicalPostProcessor/tests index d8488ef203..72412869bd 100644 --- a/tests/framework/PostProcessors/TopologicalPostProcessor/tests +++ b/tests/framework/PostProcessors/TopologicalPostProcessor/tests @@ -78,7 +78,8 @@ skip = 'Requires windowing system' csv = 'data/interactive.csv' output = 'data/interactive.xml' - required_libraries = 'AMSC PySide' + required_libraries = 'AMSC PySide2' interactive = 'true' + python3_only = true [../] [] diff --git a/tests/framework/Samplers/SparseGrid/test_scgpc_gamma_large_scale.xml b/tests/framework/Samplers/SparseGrid/test_scgpc_gamma_large_scale.xml index acb898e361..1347a5a9ab 100644 --- a/tests/framework/Samplers/SparseGrid/test_scgpc_gamma_large_scale.xml +++ b/tests/framework/Samplers/SparseGrid/test_scgpc_gamma_large_scale.xml @@ -1,3 +1,4 @@ + scgpc diff --git a/tests/framework/gold/GridTest/outGrid_dump.csv b/tests/framework/gold/GridTest/outGrid_dump.csv index 48843056c6..e9208b714d 100644 --- a/tests/framework/gold/GridTest/outGrid_dump.csv +++ b/tests/framework/gold/GridTest/outGrid_dump.csv @@ -1,19 +1,19 @@ VarGauss2,VarGauss1,VarTri1 -0.0,0.02,3.5 -0.0,0.02,4.0 -1.0,0.02,3.5 -1.0,0.02,4.0 -2.0,0.02,3.5 -2.0,0.02,4.0 -0.0,0.5,3.5 -0.0,0.5,4.0 -1.0,0.5,3.5 -1.0,0.5,4.0 -2.0,0.5,3.5 -2.0,0.5,4.0 -0.0,0.6,3.5 -0.0,0.6,4.0 -1.0,0.6,3.5 -1.0,0.6,4.0 -2.0,0.6,3.5 -2.0,0.6,4.0 +0.0,0,3.5 +0.0,0,4.0 +1.0,0,3.5 +1.0,0,4.0 +2.0,0,3.5 +2.0,0,4.0 +0.0,1,3.5 +0.0,1,4.0 +1.0,1,3.5 +1.0,1,4.0 +2.0,1,3.5 +2.0,1,4.0 +0.0,2,3.5 +0.0,2,4.0 +1.0,2,3.5 +1.0,2,4.0 +2.0,2,3.5 +2.0,2,4.0 diff --git a/tests/framework/test_Grid_Sampler.xml b/tests/framework/test_Grid_Sampler.xml index 48b021c0a6..a34dd74b00 100644 --- a/tests/framework/test_Grid_Sampler.xml +++ b/tests/framework/test_Grid_Sampler.xml @@ -19,6 +19,7 @@ Updating test cases to reflect the changes to the user input. added check for pre-existing backup files when validating Adding this test description. + Modified grid to test resolution of issue #1003 R-RE-3 @@ -54,10 +55,10 @@ - - Gauss1 - 0.02 0.5 0.6 - + + Gauss1 + 0 1 2 + Gauss2 0.5 1.0 0.0