WRApplication
External kratos "application" for multiscale time integration.
|
Classes | |
class | HDF5CoordinateDataItem |
Functions | |
def | TryOpenH5File (name, mode=None, driver=None, **kwds) |
A context manager wrapper for the opened file. More... | |
def | RenumberConnectivitiesForXdmf (filename_or_list_of_filenames, h5path_to_mesh) |
Renumber mesh connectivities for XDMF. More... | |
None | GetListOfSpatialGrids ("list[list[str]]" spatial_grids_list, h5py.Group h5_model_part, str current_path) |
def | CreateXdmfSpatialGrid (h5_model_part) |
Return an XDMF Grid object corresponding to a mesh in an HDF5 file. More... | |
def | Has_dtype (item) |
def | XdmfNodalResults (h5_results) |
Return a list of XDMF Attribute objects for nodal results in an HDF5 file. More... | |
def | XdmfNodalFlags (h5_results) |
Return a list of XDMF Attribute objects for nodal flags in an HDF5 file. More... | |
def | XdmfElementResults (h5_results) |
Return a list of XDMF Attribute objects for element results in an HDF5 file. More... | |
def | XdmfElementFlags (h5_results) |
Return a list of XDMF Attribute objects for element flags in an HDF5 file. More... | |
def | XdmfElementGaussPointValues (h5_results) |
Return a list of XDMF Attribute objects for element integration point values in an HDF5 file. More... | |
def | XdmfConditionResults (h5_results) |
Return a list of XDMF Attribute objects for element results in an HDF5 file. More... | |
def | XdmfConditionFlags (h5_results) |
Return a list of XDMF Attribute objects for element flags in an HDF5 file. More... | |
def | XdmfConditionGaussPointValues (h5_results) |
Return a list of XDMF Attribute objects for element integration point values in an HDF5 file. More... | |
def | XdmfResults (h5py.Group h5_results) |
Return a list of XDMF Attribute objects for results in an HDF5 file. More... | |
def | TimeLabel (file_path) |
Return the time string from the file name. More... | |
def | TimeFromFileName (file_path) |
Return the time value for the file name. More... | |
def | FindMatchingFiles (pattern) |
Return a list of HDF5 files matching the given file name pattern. More... | |
def | GetSortedListOfFiles (pattern) |
Return sorted file list based on the time stamp. More... | |
def | GetStep (value, patterns) |
def | GetMatchingGroupNames (output_dict, value, patterns, pattern_with_wildcards) |
def | WriteMultifileTemporalAnalysisToXdmf (ospath, h5path_to_mesh, h5path_to_results) |
Write XDMF metadata for a temporal analysis from multiple HDF5 files. More... | |
def | CreateXdmfTemporalGridFromSinglefile (h5_file_name, h5path_pattern_to_mesh, h5path_pattern_to_results, bool require_results=False) |
Return an XDMF Grid object for a list of temporal results in a single HDF5 file. More... | |
def | WriteSinglefileTemporalAnalysisToXdmf (h5_file_name, h5path_pattern_to_mesh, h5path_pattern_to_results, bool require_results=False) |
Write XDMF metadata for a temporal analysis from single HDF5 file. More... | |
Variables | |
string | warn_msg = "h5py module was not found!" |
def python_scripts.utilities.xdmf.CreateXdmfSpatialGrid | ( | h5_model_part | ) |
Return an XDMF Grid object corresponding to a mesh in an HDF5 file.
Keyword arguments: h5_model_part -- the HDF5 group containing the model part Expects: - element connectivities in h5_model_part["Xdmf/Elements/<element-name>"]. Each connectivities has attributes "Dimension" and "NumberOfNodes". For example, "Element2D3N" has "Dimension" 2 and "NumberOfNodes" 3. The connectivities differ from the normal mdpa connectivities in that they directly index the array of nodal coordinates. Currently there is no other way to post-process the mesh with Xdmf. See: - core.operations.ModelPartOutput, - core.operations.PartitionedModelPartOutput, - RenumberConnectivitiesForXdmf.
def python_scripts.utilities.xdmf.CreateXdmfTemporalGridFromSinglefile | ( | h5_file_name, | |
h5path_pattern_to_mesh, | |||
h5path_pattern_to_results, | |||
bool | require_results = False |
||
) |
Return an XDMF Grid object for a list of temporal results in a single HDF5 file.
Keyword arguments: h5_file_name -- the HDF5 file to be parsed h5path_pattern_to_mesh -- the internal HDF5 file path pattern to the mesh [ only <step> flag is supported ] h5path_pattern_to_results -- the internal HDF5 file path pattern to the results [ only <step> flag is supported ] Expects: - In prefixes, <step> flag is used maximum of one time only - If single mesh description is found, it is considered as single mesh temporal output
def python_scripts.utilities.xdmf.FindMatchingFiles | ( | pattern | ) |
Return a list of HDF5 files matching the given file name pattern.
For example, "./sim/kratos" matches: - ./sim/kratos.h5 - ./sim/kratos-0.0000.h5 - ./sim/kratos-0.2000.h5 - etc.
None python_scripts.utilities.xdmf.GetListOfSpatialGrids | ( | "list[list[str]]" | spatial_grids_list, |
h5py.Group | h5_model_part, | ||
str | current_path | ||
) |
def python_scripts.utilities.xdmf.GetMatchingGroupNames | ( | output_dict, | |
value, | |||
patterns, | |||
pattern_with_wildcards | |||
) |
def python_scripts.utilities.xdmf.GetSortedListOfFiles | ( | pattern | ) |
Return sorted file list based on the time stamp.
see @FindMatchingFiles
def python_scripts.utilities.xdmf.GetStep | ( | value, | |
patterns | |||
) |
def python_scripts.utilities.xdmf.Has_dtype | ( | item | ) |
def python_scripts.utilities.xdmf.RenumberConnectivitiesForXdmf | ( | filename_or_list_of_filenames, | |
h5path_to_mesh | |||
) |
Renumber mesh connectivities for XDMF.
Keyword arguments: filename_or_list_of_filenames -- the HDF5 file(s) to renumber h5path_to_mesh -- the internal HDF5 file path to the mesh The mesh connectivities must be renumbered for XDMF by the node's array index rather than its ID. The renumbered connectivities are stored in HDF5 and referenced by the XDMF Grid. If a file cannot be opened, it is skipped. See: - XdmfConnectivitiesWriterProcess.
def python_scripts.utilities.xdmf.TimeFromFileName | ( | file_path | ) |
Return the time value for the file name.
If the file name contains no time value, zero time value is assumed.
def python_scripts.utilities.xdmf.TimeLabel | ( | file_path | ) |
Return the time string from the file name.
E.g.: 'kratos-123.h5' -> '123' 'kratos-1.2.h5' -> '1.2' 'kratos-1.2e+00.h5' -> '1.2e+00' Returns empty string if not found.
def python_scripts.utilities.xdmf.TryOpenH5File | ( | name, | |
mode = None , |
|||
driver = None , |
|||
** | kwds | ||
) |
A context manager wrapper for the opened file.
In case the file cannot be opened, yield None rather than raise an exception. This can be the case if the file is already opened.
def python_scripts.utilities.xdmf.WriteMultifileTemporalAnalysisToXdmf | ( | ospath, | |
h5path_to_mesh, | |||
h5path_to_results | |||
) |
Write XDMF metadata for a temporal analysis from multiple HDF5 files.
Keyword arguments: ospath -- path to one of the HDF5 files or the corresponding XDMF output file. h5path_to_mesh -- the internal HDF5 file path to the mesh h5path_to_results -- the internal HDF5 file path to the results
def python_scripts.utilities.xdmf.WriteSinglefileTemporalAnalysisToXdmf | ( | h5_file_name, | |
h5path_pattern_to_mesh, | |||
h5path_pattern_to_results, | |||
bool | require_results = False |
||
) |
Write XDMF metadata for a temporal analysis from single HDF5 file.
Keyword arguments: h5_file_name -- hdf5 filename h5path_pattern_to_mesh -- the internal HDF5 file path pattern to the mesh [ only <step> flag is supported ] h5path_to_results -- the internal HDF5 file path pattern to the results [ only <step> flag is supported ]
def python_scripts.utilities.xdmf.XdmfConditionFlags | ( | h5_results | ) |
Return a list of XDMF Attribute objects for element flags in an HDF5 file.
Keyword arguments: h5_flags -- the HDF5 group containing the flags Checks for flags stored by variable name in: - h5_flags["ConditionFlagValues/<flag-name>"] If no flags are found, returns an empty list. See: - core.operations.ConditionFlagValueOutput.
def python_scripts.utilities.xdmf.XdmfConditionGaussPointValues | ( | h5_results | ) |
Return a list of XDMF Attribute objects for element integration point values in an HDF5 file.
Keyword arguments: h5_results -- the HDF5 group containing the results Checks for results stored by variable name in: - h5_results["ConditionGaussPointValues/<variable>"] If no results are found, returns an empty list. See: - core.operations.ConditionGaussPointOutput.
def python_scripts.utilities.xdmf.XdmfConditionResults | ( | h5_results | ) |
Return a list of XDMF Attribute objects for element results in an HDF5 file.
Keyword arguments: h5_results -- the HDF5 group containing the results Checks for results stored by variable name in: - h5_results["ConditionDataValues/<variable>"] If no results are found, returns an empty list. See: - core.operations.ConditionDataValueOutput.
def python_scripts.utilities.xdmf.XdmfElementFlags | ( | h5_results | ) |
Return a list of XDMF Attribute objects for element flags in an HDF5 file.
Keyword arguments: h5_flags -- the HDF5 group containing the flags Checks for flags stored by variable name in: - h5_flags["ElementFlagValues/<flag-name>"] If no flags are found, returns an empty list. See: - core.operations.ElementFlagValueOutput.
def python_scripts.utilities.xdmf.XdmfElementGaussPointValues | ( | h5_results | ) |
Return a list of XDMF Attribute objects for element integration point values in an HDF5 file.
Keyword arguments: h5_results -- the HDF5 group containing the results Checks for results stored by variable name in: - h5_results["ElementGaussPointValues/<variable>"] If no results are found, returns an empty list. See: - core.operations.ElementGaussPointOutput.
def python_scripts.utilities.xdmf.XdmfElementResults | ( | h5_results | ) |
Return a list of XDMF Attribute objects for element results in an HDF5 file.
Keyword arguments: h5_results -- the HDF5 group containing the results Checks for results stored by variable name in: - h5_results["ElementDataValues/<variable>"] If no results are found, returns an empty list. See: - core.operations.ElementDataValueOutput.
def python_scripts.utilities.xdmf.XdmfNodalFlags | ( | h5_results | ) |
Return a list of XDMF Attribute objects for nodal flags in an HDF5 file.
Keyword arguments: h5_results -- the HDF5 group containing the flags Checks for flags stored in data sets by variable name in: - h5_flags["NodalFlagValues/<flag-name>"] Expects: - each flag variable occurs only once If no flags are found, returns an empty list. See: - core.operations.NodalFlagsValueOutput.
def python_scripts.utilities.xdmf.XdmfNodalResults | ( | h5_results | ) |
Return a list of XDMF Attribute objects for nodal results in an HDF5 file.
Keyword arguments: h5_results -- the HDF5 group containing the results Checks for results stored in data sets by variable name in: - h5_results["NodalSolutionStepData/<variable-name>"] - h5_results["NodalDataValues/<variable-name>"] Expects: - each result variable occurs only once If no results are found, returns an empty list. See: - core.operations.NodalSolutionStepDataOutput, - core.operations.NodalDataValueOutput.
def python_scripts.utilities.xdmf.XdmfResults | ( | h5py.Group | h5_results | ) |
Return a list of XDMF Attribute objects for results in an HDF5 file.
Keyword arguments: h5_results -- the HDF5 group containing the results
string warn_msg = "h5py module was not found!" |