Input
This packages has utilities for handling the two principal arguments of GEOS: - the XML file that will be used to setup GEOS simulation - the Geos args which are -i input, partitions …
GeosxArgs
GeosxArgs class handles the arguments passed to GEOS to start the simulation.
Todo
If possible, change the name GeosxArgs to GeosArgs when ‘pygeosx’ will be named ‘pygeos’.
- class geos.pygeos_tools.input.GeosxArgs.GeosxAbbrevOption[source]
Bases:
object
Class containing GEOSX command line options abbreviations
- abbrvDict
Dict containing lists of abbreviations for GEOSX command line options
- Type:
dict
- class geos.pygeos_tools.input.GeosxArgs.GeosxArgs(args=['/home/docs/checkouts/readthedocs.org/user_builds/geosx-geospythonpackages/envs/latest/lib/python3.10/site-packages/sphinx/__main__.py', '-T', '-b', 'html', '-d', '_build/doctrees', '-D', 'language=en', '.', '/home/docs/checkouts/readthedocs.org/user_builds/geosx-geospythonpackages/checkouts/latest/_readthedocs//html'])[source]
Bases:
object
Class containing the main argument in command line for GEOSX
- cmdline
List corresponding to a splitted GEOSX submission line
- Type:
list of str
- options
Dict containing GEOSX main options
- Type:
dict
- Parameters:
args (list of str) – List corresponding to a splitted submission line with options
- getCommandLine()[source]
Return the command line specific to GEOSX initialization
- Returns:
cl – List containing all the options requested
- Return type:
list of str
- optionsParser(cmdline=[])[source]
Return a dict with useful geosx options parsed from a list/submission line.
- Parameters:
cmdline (list of str) – List corresponding to a splitted GEOSX submission line
- Returns:
Dict containing GEOSX main options
- Return type:
dict
- updateArg(optionName=None, newValue=None)[source]
Update the GEOSX initialization arguments
- Parameters:
optionName (str) – Name of the option to update
newValue (str) – New value for the argument to be updated.
- Returns:
bool
- Return type:
True if the option has been (found and) updated. False otherwise.
Xml
XML class parses a GEOS xml file and stores all its blocks as arguments. This implies that if you have blocks such as Events, Solvers, NumericalMethods … the class will have ‘events’, ‘solvers’, ‘numericalmethods’ arguments.
This class also provides methods to handle time properties and outputs for a specific GEOS solver.
Warning
This does not handle correctly XML files using coupled solvers.
Todo
If possible, add the capabilities to handle coupled solvers.
- class geos.pygeos_tools.input.Xml.XML(xmlFile)[source]
Bases:
object
- Parameters:
(str) (xmlFile)
- buildCouplingSolvers(*args, **kwargs)
- buildXMLTimes(*args, **kwargs)
- getCellBlocks(*args, **kwargs)
- getConstitutivePhases(*args, **kwargs)
- getMeshName(*args, **kwargs)
- getMeshObject(*args, **kwargs)
- getOutputTargets(*args, **kwargs)
- getPorosityNames(*args, **kwargs)
- getSolverDiscretizations(stype=None)[source]
Get the solver discretizations from the XML
- Parameters:
stype (str that are solver types that can be present in the XML.)
- Returns:
discretization
- Return type:
List(str) and if stype is not None, the number of discretization is equal to 1.
- getSolverNames(stype=None)[source]
Get the solver names from the XML
- Parameters:
stype (str that are solver types that can be present in the XML.)
- Returns:
names
- Return type:
List(str) and if stype is not None, the number of names is equal to 1.
- getSolverTargetRegions(stype=None)[source]
Get the solver target regions from the XML
- Parameters:
stype (str that are solver types that can be present in the XML.)
- Returns:
targetRegions
- Return type:
List(str)
- getSolverTypeDependantParameters(param_name, stype=None)[source]
Get the solver parameter from the XML
- Parameters:
stype (str that are solver types that can be present in the XML.)
- Returns:
parameter_names (List(str) and if stype is not None, the number of parameters is equal to 1.)
Cannot be an empty list.
- getSolverTypes(*args, **kwargs)
- getXMLTimes(*args, **kwargs)
- processIncludes(root)[source]
Process any <Included> elements by merging the referenced XML files into the main XML tree.
- Parameters:
(Element) (root)
- Returns:
Element
- Return type:
root
- updateGeometry(*args, **kwargs)
- updateMesh(*args, **kwargs)
- updateSolvers(*args, **kwargs)