Пример #1
0
 def test_geometry_keys(self):
     for cc_dimension in [1, 2]:
         geometry = pybamm.Geometryxp0p1DMicro(cc_dimension=cc_dimension)
         for prim_sec_vars in geometry.values():
             for spatial_vars in prim_sec_vars.values():
                 all(
                     self.assertIsInstance(spatial_var, pybamm.SpatialVariable)
                     for spatial_var in spatial_vars.keys()
                 )
Пример #2
0
 def test_init_failure(self):
     with self.assertRaises(pybamm.GeometryError):
         pybamm.Geometryxp0p1DMicro(cc_dimension=3)