framat.fileio package

Submodules

framat.fileio.model module

Model import

framat.fileio.model.get_all_values_of_key(dictionary, key)

Yield all values with specified key from a (nested) dictionary

Args:
dictionary:any dictionary
Yields:
values:all values with key
framat.fileio.model.get_duplicates(alist)

Get duplicate values from a list

Args:
alist:any list
Returns:
duplicates:list with duplicate values
framat.fileio.model.load(filename, validate_infile=True)

Load and validate the model input file in JSON format

Args:
filename:filename (path) of file to import
Returns:
model:raw model data

framat.fileio.save module

Save files

framat.fileio.save.save_all(frame, save_results, filestructure)

Wrapper function that saves all results

Args:
frame:frame object
save_results:settings
filestructure:file structure
framat.fileio.save.save_mass_breakdown(frame, filestructure)

Save a mass breakdown of the frame structure to a JSON file

Args:
frame:frame object
filestructure:file structure
framat.fileio.save.save_nodal_deformation(frame, U, filestructure)

Save nodal deformation to a JSON file

Args:
frame:frame object
U:Global deformation vector
filestructure:file structure
framat.fileio.save.save_nodal_reaction_loads(F_react, filestructure)

Save the nodal reaction loads to a JSON file

Args:
F_react:vector containing the nodal reaction loads
filestructure:file structure
framat.fileio.save.save_work_breakdown(frame, filestructure)

Save a work breakdown of the frame structure to a JSON file

Args:
frame:frame object
filestructure:file structure
framat.fileio.save.writejson(filename, output)

Write output to a JSON file with name ‘filename’

Args:
filename:file name as string
output:serializable object

framat.fileio.utils module

File paths

class framat.fileio.utils.FileStructure(infile, make_dirs=True, filecheck=True)

Bases: object

clean()

Remove old result files

make_dirs()

Make project directories

framat.fileio.utils.get_date_str()

Return a date string

framat.fileio.utils.join2abs(*args)

Combine path name components and return the absoulute path name

Takes same arguments as ‘os.path.join()’

framat.fileio.utils.makedir(dirname)

Make a directory and return the absolute path

Module contents