I/O Functions#

Reading SG data#

read(filename, file_format[, model_type, ...])

Read SG data file.

read_fe_model(filename, file_format[, ...])

Read an input file and return the generic FE core model.

read_sg_from_gmsh_bundle(main_msh[, ...])

Assemble one StructureGene from main.msh + sections.json + config.json.

Reading analysis output#

read_output(filename, file_format[, ...])

Read SG analysis output file.

read_output_model(filename, file_format[, ...])

Read SG homogenization output file.

read_output_state(filename, file_format, ...)

Read SG dehomogenization or failure analysis output.

Writing and converting SG data#

write(sg, filename, file_format[, ...])

Write analysis input.

convert(file_name_in, file_name_out, ...[, ...])

Convert the Structure Gene data file format.

Sections, materials, and configuration#

read_sections_from_json(file_path)

Read and deserialize sections.json.

write_sections_to_json(records, file_path, *)

Write sections.json using the Phase 3 organization layer.

read_config_from_json(file_path)

Read config.json.

write_config_to_json(config, file_path, *[, ...])

Write config.json.

read_material_from_json(file_path)

Read a single material from a JSON file and return as a dictionary.

read_materials_from_json(file_path)

Read multiple materials from a JSON file and return as a dictionary.

section_model_to_record(model, *[, kind, ...])

Serialize one section/material model into the sections.json record format.

Section layout and merging#

read_section_layout_csv(csv_file[, ...])

Read a cross-section layout CSV file.

read_load_csv(fn, smdim, model[, load_tags, ...])

Read a CSV file containing load data for a given structure.

merge_sections(layout, section_dir[, ...])

Merge multiple section files according to a blade layout.

merge_sections_from_csv(csv_file, section_dir)

Merge section files using a layout CSV file.

write_merged_sections(merged_mesh, output_file)

Write a merged section mesh.

Mesh data helpers#

add_cell_dict_data_to_mesh(name, dict_data, mesh)

Backward-compatible shim.

add_point_dict_data_to_mesh(name, dict_data, ...)

Backward-compatible shim.

Solver execution#

run(solver, input_name, analysis[, smdim, ...])

Run external solvers (VABS or SwiftComp).