def 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. """ results_path = "ConditionGaussPointValues" results = [] try: grp = h5_results[results_path] except KeyError: return results for variable, data in filter(Has_dtype, grp.items()): r = ElementData(variable, HDF5UniformDataItem(data)) results.append(r) return results
def 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. """ results_path = "ElementFlagValues" results = [] try: grp = h5_results[results_path] except KeyError: return results for variable, data in filter(Has_dtype, grp.items()): r = ElementData(variable, HDF5UniformDataItem(data)) results.append(r) return results