You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Material(object):
"""A class that represents a material.
Class describes a material and its data.
Attributes
----------
description : str
textual description of the material
uid : uuid.UUID
the id of the material.
data : DataContainer
data associated with this material
"""
And the the uid of materials will be used like the following:
material_foo = Material(name="foo")
material.data[CUBA.MASS] = 1.0 # this is a common mass for entities of this material type
p = Particle()
p.data[CUBA.MATERIAL] = material_foo.uid
engine.SD.add_material(material_foo)
dataset = engine.get_dataset("some_name")
dataset.add_particles([p])
This requires:
Adding a new attribute (CUBA.MATERIAL) with type that can represent the UUID
Adding Material class (plus tests and documentation)
Add SD object to contain these materials (i.e. add_material, get_material, delete_material, update_material) (plus tests and documentation)
In relation with #226 (https://publicwiki-01.fraunhofer.de/SimPhoNy-Project/index.php/MaterialRelations_proposal), a
Materialclass has been defined by the SSB as the following:And the the
uidof materials will be used like the following:This requires:
Materialclass (plus tests and documentation)SDobject to contain these materials (i.e.add_material,get_material,delete_material,update_material) (plus tests and documentation)