src.poem.PoemTemplate¶
Created on April 1, 2024 @author: wangc
This module inherits from base Template class for Input Templates, which use an established input template as an accelerated way to write new RAVEN workflows.
Attributes¶
Classes¶
POEM: Template Class |
Module Contents¶
- class src.poem.PoemTemplate.PoemTemplate[source]¶
Bases:
ravenframework.InputTemplates.TemplateBaseClass.Template
POEM: Template Class
- _validEntities = ['RunInfo', 'Files', 'Models', 'Distributions', 'Samplers', 'Optimizers', 'DataObjects',...[source]¶
- loadTemplate(filename)[source]¶
Loads template file statefully. @ In, filename, str, name of file to load (xml) @ Out, None
- createWorkflow(inputs, miscDict)[source]¶
creates a new RAVEN workflow based on the information in dicitonary “inputs”. @ In, inputs, dict, dictionary that contains xml node info that need to append, i.e. {RavenXMLNodeTag: ListOfNodes} @ In, miscDict, dict, dictionary that contains xml node text info that need to update, i.e. {RavenXMLNodeTag: value} @ Out, xml.etree.ElementTree.Element, modified copy of template ready to run
- writeWorkflow(template, destination, run=False)[source]¶
Writes a template to file. @ In, template, xml.etree.ElementTree.Element, file to write @ In, destination, str, path and filename to write to @ In, run, bool, optional, if True then run the workflow after writing? good idea? @ Out, errors, int, 0 if successfully wrote [and run] and nonzero if there was a problem