def test_properties_dict(self): world = World() world.add(Fluid(Domain([16, 16])), physics=IncompressibleFlow()) world.add(Inflow(Sphere((8, 8), radius=4))) # world.add(ConstantDensity(box[0:2, 6:10], 1.0)) world.add(Fan(Sphere((10, 8), 5), [-1, 0])) struct.properties_dict(world.state)
def _update_scene_properties(self): if self.uses_existing_scene: return app_name = os.path.basename(inspect.getfile(self.__class__)) app_path = inspect.getabsfile(self.__class__) properties = { 'instigator': 'App', 'traits': self.traits, 'app': str(app_name), 'app_path': str(app_path), 'name': self.name, 'description': self.subtitle, 'all_fields': self.fieldnames, 'actions': [action.name for action in self.actions], 'controls': [{ control.name: control.value } for control in self.controls], 'summary': self.scene_summary(), 'time_of_writing': self.steps, 'world': struct.properties_dict(self.world.state) } properties.update(self.custom_properties()) self.scene.properties = properties
def test_properties_dict(self): world = World() world.add(Fluid(Domain(x=16, y=16)), physics=IncompressibleFlow()) world.add(Inflow(Sphere((8, 8), radius=4))) world.add(Fan(Sphere((10, 8), 5), [-1, 0])) struct.properties_dict(world.state)