Replace Python numerical kernels with native C execution
This commit is contained in:
1 parent
48da6be21c
commit
3b38f73fe0
227 files changed
+16801
-75499
No files matched your search
@@ -9,7 +9,6 @@ from app.simulation.components.experimental.storage.cylinder import Cylinder
|
||||
from app.simulation.components.experimental.storage.tank import Tank
|
||||
from app.simulation.core.medium import IdealGasMedium
|
||||
from app.simulation.core.ports import PortVariableDefinition
|
||||
from app.simulation.examples.testmodel.dynamic_pipe import Pipe
|
||||
from app.simulation.registry import COMPONENT_MODEL_REGISTRY
|
||||
|
||||
|
||||
@@ -21,7 +20,6 @@ class ComponentMetadataTests(unittest.TestCase):
|
||||
return (
|
||||
Cylinder("cylinder_1", self.medium),
|
||||
Tank("tank_1", self.medium),
|
||||
Pipe("pipe_dynamic_1", self.medium),
|
||||
ResistivePipe("pipe_1", self.medium),
|
||||
Orifice("orifice_1"),
|
||||
Tee("tee_1"),
|
||||
@@ -86,17 +84,9 @@ class ComponentMetadataTests(unittest.TestCase):
|
||||
def test_result_metadata_exactly_describes_each_exposed_value(self) -> None:
|
||||
for component in self.component_instances():
|
||||
with self.subTest(component=component.name):
|
||||
values = component.result_values()
|
||||
metadata = component.result_variable_metadata()
|
||||
keys = [variable.key for variable in metadata]
|
||||
self.assertEqual(len(keys), len(set(keys)))
|
||||
self.assertEqual(
|
||||
set(values),
|
||||
{
|
||||
variable.key.removeprefix(f"{component.name}.")
|
||||
for variable in metadata
|
||||
},
|
||||
)
|
||||
self.assertTrue(all(variable.label for variable in metadata))
|
||||
self.assertTrue(all(variable.quantity for variable in metadata))
|
||||
|
||||
|
||||
Reference in new issue
Block a user