Example #1
0
 def __init__(self):
     CodeInterfaceBase.__init__(self)
     self.preCommand = ""  # this is the precommand (bash.exe in case of win)
     self.printTag = 'RAVEN INTERFACE'
     self.outputPrefix = 'out~'
     self.outStreamsNamesAndType = {
     }  # Outstreams names and type {'outStreamName':[DataObjectName,DataObjectType]}
     self.outDatabases = {
     }  # as outStreams, but {name: path/and/file} for databases
     # path to the module that contains the function to modify and convert the sampled vars (optional)
     # 2 methods are going to be inquired (if present and needed):
     # - convertNotScalarSampledVariables
     # - manipulateScalarSampledVariables
     self.extModForVarsManipulationPath = None
     # 'noscalar' = True if convertNotScalarSampledVariables exists in extModForVarsManipulation module
     # 'scalar'   = True if manipulateScalarSampledVariables exists in extModForVarsManipulation module
     self.hasMethods = {'noscalar': False, 'scalar': False}
     # inner workind directory
     self.innerWorkingDir = ''
     # linked DataObjects and Databases
     self.linkedDataObjectOutStreamsNames = None
     self.linkedDatabaseName = None
     # input manipulation module
     self.inputManipulationModule = None
     self.printFailedRuns = False  # whether to print failed runs to the screen
Example #2
0
 def __init__(self):
   """
     Initializes the GenericCode Interface.
     @ In, None
     @ Out, None
   """
   CodeInterfaceBase.__init__(self)
Example #3
0
 def __init__(self):
     """
   Constructor
   @ In, None
   @ Out, None
 """
     CodeInterfaceBase.__init__(self)
     self.inputExtensions = ['i', 'inp']
Example #4
0
 def __init__(self):
   """
     Initializes the GenericCode Interface.
     @ In, None
     @ Out, None
   """
   CodeInterfaceBase.__init__(self)
   self.variablesToLoad = [] # the variables that should be loaded from the mat file (by default, all of them)
  def __init__(self):

    CodeInterfaceBase.__init__(self)
    self.inputExtensions  = []  
    self.outputExtensions = []    
    self.execPrefix       = ''     
    self.execPostfix      = ''      
    self.caseName         = None    
Example #6
0
 def __init__(self):
     """
   Constructor
   @ In, None
   @ Out, None
 """
     CodeInterfaceBase.__init__(self)
     self.MooseInterface = MooseBasedApp()
     self.MooseInterface.addDefaultExtension()
Example #7
0
 def __init__(self):
     """
   Constructor.
   @ In, None
   @ Out, None
 """
     CodeInterfaceBase.__init__(self)
     self.melcorInterface = MelcorApp()
     self.melgenInterface = MelgenApp()
Example #8
0
 def __init__(self):
     """
   Constructor.
   @ In, None
   @ Out, None
 """
     CodeInterfaceBase.__init__(self)
     # CTF creates enormous CSVs that are all floats, so we use numpy to speed up the loading
     self.setCsvLoadUtil('numpy')
Example #9
0
 def __init__(self):
     """
   Constructor.
   @ In, None
   @ Out, None
 """
     CodeInterfaceBase.__init__(self)
     self.outputPrefix = 'out~'
     self.vectorPPFound = None  # Indicates if a MOOSE vector postprocessor is in use
     self.vectorPPDict = None  # Contains information about the postprocessor used
Example #10
0
 def __init__(self):
   """
     Constructor
     @ In, None
     @ Out, None
   """
   CodeInterfaceBase.__init__(self)
   self.sequence = []   # this contains the sequence that needs to be run. For example, ['triton'] or ['origen'] or ['triton','origen']
   self.timeUOM  = 's'  # uom of time (i.e. s, h, m, d, y )
   self.outputRoot = {} # the root of the output sequences
Example #11
0
 def __init__(self):
     """
   Constructor.
   @ In, None
   @ Out, None
 """
     CodeInterfaceBase.__init__(self)
     self.PhisicsInterface = Phisics()
     self.PhisicsInterface.addDefaultExtension()
     self.Relap5Interface = Relap5()
     self.Relap5Interface.addDefaultExtension()
Example #12
0
 def __init__(self):
   """
     Initializes the GenericCode Interface.
     @ In, None
     @ Out, None
   """
   CodeInterfaceBase.__init__(self) # The base class doesn't actually implement this, but futureproofing.
   self.inputExtensions  = []       # list of extensions for RAVEN to edit as inputs
   self.outputExtensions = []       # list of extensions for RAVEN to gather data from?
   self.execPrefix       = ''       # executioner command prefix (e.g., 'python ')
   self.execPostfix      = ''       # executioner command postfix (e.g. -zcvf)
   self.caseName         = None     # base label for outgoing files, should default to inputFileName
Example #13
0
 def __init__(self):
   """
     Constructor
     @ In, None
     @ Out, None
   """
   CodeInterfaceBase.__init__(self)
   self.MooseInterface = MooseBasedApp()       #used to perturb MAMMOTH input files
   self.MooseInterface.addDefaultExtension()
   self.BisonInterface = MooseBasedApp()       #used to perturb Bison input files
   self.BisonInterface.addDefaultExtension()
   self.RattlesnakeInterface  = Rattlesnake()  #used to perturb Rattlesnake and Yak input files
   #FIXME Would like to use RELAP7() as interface, but Distributions block appears to be out of date when running Mammoth
   #self.Relap7Interface = RELAP7()             #used to perturb RELAP7 input files
   self.Relap7Interface = MooseBasedApp()
   self.Relap7Interface.addDefaultExtension()
Example #14
0
 def __init__(self):
   CodeInterfaceBase.__init__(self)
   self.printTag  = 'RAVEN INTERFACE'
   self.outputPrefix = 'out~'
   self.outStreamsNamesAndType = {} # Outstreams names and type {'outStreamName':[DataObjectName,DataObjectType]}
   # path to the module that contains the function to modify and convert the sampled vars (optional)
   # 2 methods are going to be inquired (if present and needed):
   # - convertNotScalarSampledVariables
   # - manipulateScalarSampledVariables
   self.extModForVarsManipulationPath = None
   # 'noscalar' = True if convertNotScalarSampledVariables exists in extModForVarsManipulation module
   # 'scalar'   = True if manipulateScalarSampledVariables exists in extModForVarsManipulation module
   self.hasMethods                = {'noscalar':False, 'scalar':False}
   # inner workind directory
   self.innerWorkingDir = ''
   # linked DataObjects
   self.linkedDataObjectOutStreamsNames = None
Example #15
0
 def _readMoreXML(self,xmlNode):
   """
     Function to read the portion of the xml input that belongs to this specialized class and initialize
     some members based on inputs. This can be overloaded in specialize code interface in order to
     read specific flags
     @ In, xmlNode, xml.etree.ElementTree.Element, Xml element node
     @ Out, None.
   """
   CodeInterfaceBase._readMoreXML(self,xmlNode)
   sequence = xmlNode.find("sequence")
   if sequence is None:
     self.sequence = ['triton']
   else:
     self.sequence = [elm.strip() for elm in sequence.text.split(",")]
   if self.sequence.count('triton') > 1 or self.sequence.count('origen') > 1:
     raise IOError("Multiple triton or origen sequences are not supported yet!")
   timeUOM = xmlNode.find("timeUOM")
   if timeUOM is not None:
     self.timeUOM = timeUOM.text.strip()
     if self.timeUOM not in ['s','m','h','d','y']:
       raise IOError("timeUOM not recognized. Supported are:" +','.join(['s','m','h','d','y']))
Example #16
0
 def __init__(self):
   CodeInterfaceBase.__init__(self)
   self.outputPrefix = 'out~'