Helper functions

UFFFiles.jl provides several helper functions to facilitate interaction with UFF datasets. At the moment, the following helper functions are available:

1 API

connectivity_matrix(dataset::Dataset2412) -> Matrix{Int}

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

using UFFFilesReader

# readuff returns a vector of datasets
data2412 = readuff("path/to/your/file2412.uff")[1]
connectivity = connectivity_matrix(data2412)

2.2 Dataset Types

using UFFFilesReader

# Only one dataset is read
data = readuff("path/to/your/file.uff")[1]
dtype = dataset_types(data)

# Several datasets are read
data_all = readuff("path/to/your/file.uff")
dtypes = dataset_types.(data_all)

2.3 Supported Datasets

using UFFFilesReader

valid_datasets = supported_datasets()