UFFFiles.jl provides several helper functions to facilitate interaction with UFF datasets. At the moment, the following helper functions are available:
connectivity_matrix: Returns the connectivity matrix extracted from Dataset2412.
dataset_types: Returns the list of all dataset types extracted from an UFF file.
supported_datasets: Lists all dataset types that are currently supported for reading.
Returns the connectivity matrix for a Dataset2412 object, where each row corresponds to an element and each column corresponds to a node. Missing values are filled with -1.
Input
dataset::Dataset2412: The Dataset2412 object to extract connectivity from.
Output
Matrix{Int}: A matrix representing the connectivity of elements to nodes.
dataset_types(data::UFFDataset) -> Symbol
Returns the dataset type presents in a UFFDataset object.
Input
data::UFFDataset: The UFFDataset object to extract types from.
Output
Symbol: A vector containing the dataset types.
supported_datasets() -> Vector{Int}
Returns a vector of supported UFF dataset types.
2 Example usage
2.1 Connectivity Matrix
usingUFFFilesReader# readuff returns a vector of datasetsdata2412 =readuff("path/to/your/file2412.uff")[1]connectivity =connectivity_matrix(data2412)
2.2 Dataset Types
usingUFFFilesReader# Only one dataset is readdata =readuff("path/to/your/file.uff")[1]dtype =dataset_types(data)# Several datasets are readdata_all =readuff("path/to/your/file.uff")dtypes =dataset_types.(data_all)