src.functions_io module

src.functions_io.find_available_meshes(paths: dict) dict[source]

Creates the high level organition to read the meshes. This function and the code can be optimized by creating a lazy read of this data. It is possible because if the centroid was previously calculated, there would be no need to import it again.

Parameters:

paths (dict) – dictionary containing all relevant paths

Returns:

dictionary containing the loaded meshes

Return type:

dict

src.functions_io.main(paths: dict) dict[source]

Data import

Parameters:

paths (dict) – dictionary containing all relevant paths

Returns:

dictionary containing the data

Return type:

dict

src.functions_io.read_csv_files_in_folder(path: str) dict[source]

Reads all CSV files from a given directory and stores them in a dictionary.

Parameters:

path (str) – path to the directory containing the CSV files

Returns:

dictionary containing the loaded CSV data

Return type:

dict

src.functions_io.read_mesh_file(filepath: str) dict[str, ndarray | dict[str, ndarray] | None][source]

Imports the mesh from a given filepath.

Parameters:

filepath (str) – filepath to the mesh file

Returns:

dictionary containing the mesh data, including nodes, cells, and boundary conditions

Return type:

MeshData

src.functions_io.setup_directories(project_path, user_options, logger)[source]