Skip to content
This repository was archived by the owner on Apr 23, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion simphony/core/cuba.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,3 @@ class CUBA(IntEnum):
SURFACE_TENSION = 186
RELAXATION_TIME = 187
MULTIPHASE_MODEL = 188
MATERIAL_ID = 189
8 changes: 1 addition & 7 deletions simphony/core/keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -1141,11 +1141,5 @@
definition='Multiphase model', # noqa
key='MULTIPHASE_MODEL',
shape=[1],
dtype=None),
'MATERIAL_ID': Keyword(
name='MaterialId',
definition='Material identification number', # noqa
key='MATERIAL_ID',
shape=[1],
dtype=numpy.int32),
dtype=None)
}
15 changes: 7 additions & 8 deletions simphony/io/tests/test_data_container_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@

class CustomData(tables.IsDescription):

name = tables.StringCol(pos=0, itemsize=20)
direction = tables.Float64Col(pos=1, shape=3)
status = tables.Int32Col(pos=2)
label = tables.Int32Col(pos=3)
material_id = tables.Int32Col(pos=4)
chemical_specie = tables.StringCol(pos=5, itemsize=20)
rolling_friction = tables.Float64Col(pos=6)
volume_fraction = tables.Float64Col(pos=7)
name = tables.StringCol(pos=0, itemsize=20)
direction = tables.Float64Col(pos=1, shape=3)
status = tables.Int32Col(pos=2)
label = tables.Int32Col(pos=3)
chemical_specie = tables.StringCol(pos=5, itemsize=20)
rolling_friction = tables.Float64Col(pos=6)
volume_fraction = tables.Float64Col(pos=7)


class CustomRecord(tables.IsDescription):
Expand Down
7 changes: 4 additions & 3 deletions simphony/io/tests/test_h5_cuds.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,14 @@ def test_add_get_dataset_with_cuba_keys_argument(self):

# Add some CUBA data
for node in reference.iter_nodes():
node.data = DataContainer({CUBA.MATERIAL_ID: 1})
node.data = DataContainer({CUBA.NAME: 'test_container'})
expected.update_nodes([node])
node.data = DataContainer({CUBA.MATERIAL_ID: 1, CUBA.DENSITY: 2})
node.data = DataContainer({CUBA.NAME: 'test_container',
CUBA.DENSITY: 2})
reference.update_nodes([node])

# Store reference dataset along with its data
engine.add_dataset(reference, {CUDSItem.NODE: [CUBA.MATERIAL_ID]})
engine.add_dataset(reference, {CUDSItem.NODE: [CUBA.NAME]})

# Closing and reopening the file
engine.close()
Expand Down
6 changes: 2 additions & 4 deletions simphony/io/tests/test_h5_lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@


class CustomRecord(tables.IsDescription):

class data(tables.IsDescription):

material_id = tables.Int32Col(pos=0)
velocity = tables.Float64Col(pos=1, shape=3)
density = tables.Float64Col(pos=2)

Expand Down Expand Up @@ -130,7 +128,7 @@ def container_factory(self, name, primitive_cell, size, origin):
origin, record=CustomRecord)

def supported_cuba(self):
return [CUBA.VELOCITY, CUBA.MATERIAL_ID, CUBA.DENSITY]
return [CUBA.VELOCITY, CUBA.DENSITY]


class TestH5LatticeCustomNodeOperations(
Expand All @@ -154,7 +152,7 @@ def container_factory(self, name, primitive_cell, size, origin):
origin, record=CustomRecord)

def supported_cuba(self):
return [CUBA.VELOCITY, CUBA.MATERIAL_ID, CUBA.DENSITY]
return [CUBA.VELOCITY, CUBA.DENSITY]


class TestH5LatticeVersions(unittest.TestCase):
Expand Down
1 change: 0 additions & 1 deletion simphony/io/tests/test_indexed_data_container_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class CustomData(tables.IsDescription):
direction = tables.Float64Col(pos=1, shape=3)
status = tables.Int32Col(pos=2)
label = tables.Int32Col(pos=3)
material_id = tables.Int32Col(pos=4)
chemical_specie = tables.StringCol(pos=5, itemsize=20)
rolling_friction = tables.Float64Col(pos=6)
volume_fraction = tables.Float64Col(pos=7)
Expand Down