@@ -852,7 +852,8 @@ def test_heat_charge_sources(structures):
852
852
_ = td .HeatSource (structures = ["solid_structure" ], rate = "100" )
853
853
854
854
855
- def test_heat_charge_simulation (simulation_data ):
855
+ @pytest .mark .parametrize ("swap_axes" , [True , False ])
856
+ def test_heat_charge_simulation (swap_axes , simulation_data ):
856
857
"""Tests 'HeatChargeSimulation' and 'ConductionSimulation' objects."""
857
858
heat_sim_data , cond_sim_data , voltage_capacitance_sim_data , current_voltage_simulation_data = (
858
859
simulation_data
@@ -876,6 +877,18 @@ def test_heat_charge_simulation(simulation_data):
876
877
"Current-Voltage simulation should be created successfully."
877
878
)
878
879
880
+ _ = heat_sim .plot_heat_conductivity (x = 0 , swap_axes = swap_axes )
881
+ plt .close ()
882
+ _ = heat_sim .plot_property (x = 0 , property = "heat_conductivity" , swap_axes = swap_axes )
883
+ plt .close ()
884
+ _ = cond_sim .plot_property (x = 0 , property = "electric_conductivity" , swap_axes = swap_axes )
885
+ plt .close ()
886
+ for sim in (heat_sim , cond_sim , voltage_capacitance_sim , current_voltage_sim ):
887
+ _ = sim .plot_boundaries (x = 0 , swap_axes = swap_axes )
888
+ plt .close ()
889
+ _ = sim .plot_sources (x = 0 , swap_axes = swap_axes )
890
+ plt .close ()
891
+
879
892
880
893
def test_sim_data_plotting (simulation_data ):
881
894
"""Tests whether simulation data can be plotted and appropriate errors are raised."""
@@ -1433,7 +1446,8 @@ def test_plotting_functions(simulation_data):
1433
1446
heat_sim_data .plot_field ("test" , invalid_param = 0 )
1434
1447
1435
1448
1436
- def test_bandgap_monitor ():
1449
+ @pytest .mark .parametrize ("swap_axes" , [True , False ])
1450
+ def test_bandgap_monitor (swap_axes ):
1437
1451
"""Test energy bandgap monitor ploting function."""
1438
1452
# create a triangle grid
1439
1453
tri_grid_points = td .PointDataArray (
@@ -1573,8 +1587,8 @@ def test_bandgap_monitor():
1573
1587
1574
1588
# test check for the voltage value in the list of arguments
1575
1589
1576
- tri_single_voltage_data .plot (x = 0.0 )
1577
- tri_multi_voltage_data .plot (x = 0.0 , voltage = 1.0 )
1590
+ tri_single_voltage_data .plot (x = 0.0 , swap_axes = swap_axes )
1591
+ tri_multi_voltage_data .plot (x = 0.0 , voltage = 1.0 , swap_axes = swap_axes )
1578
1592
1579
1593
with pytest .raises (DataError ):
1580
1594
tri_multi_voltage_data .plot (x = 0.0 )
0 commit comments