Writing a VMAP file
The VMAPExport Class
- class pylife.vmap.VMAPExport(file_name)[source]
The interface class to export a vmap file
- Parameters:
file_name (string) – The path to the vmap file to be read
- Raises:
Exception – if the file cannot be read an exception is raised. So far any exception from the
h5py
module is passed through.
- add_element_set(geometry_name, indices, mesh, name=None)[source]
Exports element-type geometry set into given geometry
- Parameters:
geometry_name (string) – The geometry to where we want to export the geometry set
indices (Pandas Index) – List of node indices that we want to export
mesh (Pandas DataFrame) – The Data Frame that holds the data of the mesh to export
name (value of attribute MYSETNAME) –
- Return type:
self
- add_geometry(geometry_name, mesh)[source]
Exports geometry with given name and mesh data
- Parameters:
geometry_name (string) – Name of the geometry to add
mesh (Pandas DataFrame) – The Data Frame that holds the data of the mesh to export
- Return type:
self
- add_integration_types(content)[source]
Creates system dataset IntegrationTypes with the given content
- Parameters:
content (the content of the dataset) –
- Return type:
self
- add_node_set(geometry_name, indices, mesh, name=None)[source]
Exports node-type geometry set into given geometry
- Parameters:
geometry_name (string`) – The geometry to where we want to export the geometry set
indices (Pandas Index) – List of node indices that we want to export
mesh (Pandas DataFrame) – The Data Frame that holds the data of the mesh to export
name (value of attribute MYSETNAME) –
- Return type:
self
- add_variable(state_name, geometry_name, variable_name, mesh, column_names=None, location=None)[source]
Exports variable into given state and geometry
- Parameters:
state_name (string) – State where we want to export the parameter
geometry_name (string) – Geometry where we want to export the parameter
variable_name (string) – The name of the variable to export
mesh (Pandas DataFrame) – The Data Frame that holds the data of the mesh to export
column_names (List, optional) – The columns that the parameter consists of
location (Enum, optional) – The location of the parameter * 2 - node * 3 - element - not supported yet * 6 - element nodal
- Return type:
self
- property file_name
Gets the name of the VMAP file that we are exporting
- set_group_attribute(object_path, key, value)[source]
Sets the ‘MYNAME’ attribute of the VMAP objects
- Parameters:
object_path (string) – The full path to the object that we want to rename
key (string) – The key of the attribute that we want to set
value (np.dtype) – The value that we want to set to the attribute
- Return type: