<commit_before>""" This module runs the benchmark test suite. """
from .context import phaseflow
import fenics


def test_lid_driven_cavity_benchmark_with_solid_subdomain__ci__():
    
    phaseflow.helpers.run_simulation_with_temporary_output(
        phaseflow.benchmark_phasechange_simulation.LDCBenchmarkPhaseChangeSimulationWithSolidSubdomain())
    
    
def test_heat_driven_cavity_benchmark__ci__():
    
    phaseflow.helpers.run_simulation_with_temporary_output(
        phaseflow.benchmark_phasechange_simulation.HeatDrivenCavityBenchmarkPhaseChangeSimulation())
        
    
def test_stefan_problem_benchmark_with_restart__ci__():
    """ This tests that restarting does not affect time accuracy. """
    sim = phaseflow.benchmark_phasechange_simulation.StefanProblemBenchmarkPhaseChangeSimulation()
    
    sim.end_time = 0.01
    
    sim.prefix_output_dir_with_tempdir = True
    
    sim.run(verify = False)
    
    sim2 = phaseflow.benchmark_phasechange_simulation.StefanProblemBenchmarkPhaseChangeSimulation()
    
    sim2.read_checkpoint(sim.latest_checkpoint_filepath)
    
    assert(sim.state.time == sim2.old_state.time)
    
    assert(all(sim.state.solution.leaf_node().vector() == sim2.old_state.solution.leaf_node().vector()))
    
    sim2.prefix_output_dir_with_tempdir = True
    
    sim2.run(verify = True)
    
    
def test_stefan_problem_benchmark_bdf2__ci__():

    phaseflow.helpers.run_simulation_with_temporary_output(
        phaseflow.benchmark_phasechange_simulation.StefanProblemBenchmarkPhaseChangeSimulation_BDF2().run())
    
    
class RegressionTestSimulation( \
        phaseflow.benchmark_phasechange_simulation.ConvectionCoupledMeltingOctadecanePCMBenchmarkPCSimulation):<commit_msg>Fixed bug in BDF2 test<commit_after>""" This module runs the benchmark test suite. """
from .context import phaseflow
import fenics


def test_lid_driven_cavity_benchmark_with_solid_subdomain__ci__():
    
    phaseflow.helpers.run_simulation_with_temporary_output(
        phaseflow.benchmark_phasechange_simulation.LDCBenchmarkPhaseChangeSimulationWithSolidSubdomain())
    
    
def test_heat_driven_cavity_benchmark__ci__():
    
    phaseflow.helpers.run_simulation_with_temporary_output(
        phaseflow.benchmark_phasechange_simulation.HeatDrivenCavityBenchmarkPhaseChangeSimulation())
        
    
def test_stefan_problem_benchmark_with_restart__ci__():
    """ This tests that restarting does not affect time accuracy. """
    sim = phaseflow.benchmark_phasechange_simulation.StefanProblemBenchmarkPhaseChangeSimulation()
    
    sim.end_time = 0.01
    
    sim.prefix_output_dir_with_tempdir = True
    
    sim.run(verify = False)
    
    sim2 = phaseflow.benchmark_phasechange_simulation.StefanProblemBenchmarkPhaseChangeSimulation()
    
    sim2.read_checkpoint(sim.latest_checkpoint_filepath)
    
    assert(sim.state.time == sim2.old_state.time)
    
    assert(all(sim.state.solution.leaf_node().vector() == sim2.old_state.solution.leaf_node().vector()))
    
    sim2.prefix_output_dir_with_tempdir = True
    
    sim2.run(verify = True)
    
    
def test_stefan_problem_benchmark_bdf2__ci__():

    phaseflow.helpers.run_simulation_with_temporary_output(
        phaseflow.benchmark_phasechange_simulation.StefanProblemBenchmarkPhaseChangeSimulation_BDF2())
    
    
class RegressionTestSimulation( \
        phaseflow.benchmark_phasechange_simulation.ConvectionCoupledMeltingOctadecanePCMBenchmarkPCSimulation):
{'fraction_non_alphanumeric': 0.06927277953434895, 'fraction_numerical': 0.006611095142282265, 'mean_word_length': 4.686274509803922, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3825175', 'n_tokens_mistral': 1129, 'n_tokens_neox': 1104, 'n_words': 121}