File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -622,12 +622,15 @@ def test_weak_dirichlet_penalty_is_dimensionless(
622622 )
623623
624624
625- def test_custom_quantity_with_immobile_species ():
625+ @pytest .mark .parametrize (
626+ "model_class" , [F .HydrogenTransportProblem , F .HydrogenTransportProblemDiscontinuous ]
627+ )
628+ def test_custom_quantity_with_immobile_species (model_class ):
626629 """
627630 Test that a CustomQuantity can be defined on an immobile species.
628631 See issue #1211
629632 """
630- my_model = F . HydrogenTransportProblem ()
633+ my_model = model_class ()
631634 my_model .mesh = F .Mesh1D ([1 , 2 , 3 ])
632635
633636 mat = F .Material (D_0 = 1.0 , E_D = 0.0 )
@@ -641,8 +644,12 @@ def test_custom_quantity_with_immobile_species():
641644 my_model .subdomains = [vol ]
642645
643646 T = F .Species (name = "T" , mobile = False )
647+ T_mobile = F .Species (name = "T_mobile" , mobile = True )
648+ if isinstance (my_model , F .HydrogenTransportProblemDiscontinuous ):
649+ T .subdomains = [vol ]
650+ T_mobile .subdomains = [vol ]
644651
645- my_model .species = [T ]
652+ my_model .species = [T , T_mobile ]
646653
647654 my_model .temperature = 300
648655
You can’t perform that action at this time.
0 commit comments