<commit_before><?xml version="1.0" encoding="UTF-8" ?>
<testproblem>
  <name>Two-dimensional backward facing step.  Suggested xml from asc, could include a reattachment length comparison.</name>
  <owner userid="jbull"/>
  <tags>flml</tags>
  <problem_definition length="long" nprocs="1">
    <command_line>fluidity -v2 backward_facing_step_2d_kim_kepsilon.flml &gt; kepsilon.log; fluidity -v2 backward_facing_step_2d_kim_reference.flml &gt; reference.log</command_line>
  </problem_definition>
  <variables>
    <variable name="solvers_converged" language="python">
import os
files = os.listdir("./")
solvers_converged = not "matrixdump" in files and not "matrixdump.info" in files
    </variable>
    <variable name="FinalTime" language="python">
import fluidity_tools
FinalTime = fluidity_tools.stat_parser("backward_facing_step_2d_kim_kepsilon.stat")['ElapsedTime']['value'][-1]
    </variable>
    <variable name="MaximumVelocity" language="python">
import fluidity_tools
MaximumVelocity = fluidity_tools.stat_parser("backward_facing_step_2d_kim_kepsilon.stat")['Fluid']['Velocity%magnitude']['max'][-1]
    </variable>
    <variable name="MaximumPressure" language="python">
import fluidity_tools
MaximumPressure = fluidity_tools.stat_parser("backward_facing_step_2d_kim_kepsilon.stat")['Fluid']['Pressure']['max'][-1]
    </variable>
    <variable name="MinimumPressure" language="python">
import fluidity_tools
MinimumPressure = fluidity_tools.stat_parser("backward_facing_step_2d_kim_kepsilon.stat")['Fluid']['Pressure']['min'][-1]
    </variable>
    <variable name="FinalNodeCount" language="python">
import fluidity_tools
FinalNodeCount = fluidity_tools.stat_parser("backward_facing_step_2d_kim_kepsilon.stat")['CoordinateMesh']['nodes'][-1]
    </variable>
  </variables>
  <pass_tests>
    <test name="Solvers converged" language="python">
      assert(solvers_converged)
    </test>
    <test name="Final time greater than 1.0" language="python">
assert FinalTime &gt; 1.0
    </test>
    <test name="Maximum velocity less than 1.1" language="python">
assert MaximumVelocity &lt; 1.1
    </test>
    <test name="Maximum pressure less than 0.25" language="python">
assert MaximumPressure &lt; 0.25
    </test>
    <test name="Minimum pressure greater than -0.25" language="python">
assert MinimumPressure &gt; -0.25
    </test>
    <test name="Check final number of nodes within 100 of the number I had when run with code revision 10100" language="python">
assert abs ( FinalNodeCount - 14200 ) &lt; 1000
    </test>
  </pass_tests>
  <warn_tests>
  </warn_tests>
</testproblem><commit_msg>adding a reattachment length test to example.<commit_after><?xml version="1.0" encoding="UTF-8" ?>
<testproblem>
  <name>Two-dimensional backward facing step.  Suggested xml from asc, could include a reattachment length comparison.</name>
  <owner userid="jbull"/>
  <tags>flml</tags>
  <problem_definition length="long" nprocs="1">
    <command_line>fluidity -v2 backward_facing_step_2d_kim_kepsilon.flml &gt; kepsilon.log; fluidity -v2 backward_facing_step_2d_kim_reference.flml &gt; reference.log</command_line>
  </problem_definition>
  <variables>
    <variable name="solvers_converged" language="python">
import os
files = os.listdir("./")
solvers_converged = not "matrixdump" in files and not "matrixdump.info" in files
    </variable>
    <variable name="FinalTime" language="python">
import fluidity_tools
FinalTime = fluidity_tools.stat_parser("backward_facing_step_2d_kim_kepsilon.stat")['ElapsedTime']['value'][-1]
    </variable>
    <variable name="MaximumVelocity" language="python">
import fluidity_tools
MaximumVelocity = fluidity_tools.stat_parser("backward_facing_step_2d_kim_kepsilon.stat")['Fluid']['Velocity%magnitude']['max'][-1]
    </variable>
    <variable name="MaximumPressure" language="python">
import fluidity_tools
MaximumPressure = fluidity_tools.stat_parser("backward_facing_step_2d_kim_kepsilon.stat")['Fluid']['Pressure']['max'][-1]
    </variable>
    <variable name="MinimumPressure" language="python">
import fluidity_tools
MinimumPressure = fluidity_tools.stat_parser("backward_facing_step_2d_kim_kepsilon.stat")['Fluid']['Pressure']['min'][-1]
    </variable>
    <variable name="FinalNodeCount" language="python">
import fluidity_tools
FinalNodeCount = fluidity_tools.stat_parser("backward_facing_step_2d_kim_kepsilon.stat")['CoordinateMesh']['nodes'][-1]
    </variable>
    <variable name="RL" language="python">
from postprocessor_2d import reattachment_length, get_filelist
import numpy
filelist = get_filelist(sample=5, start=0)
RL = numpy.array(reattachment_length(filelist))
    </variable>
  </variables>
  <pass_tests>
    <test name="Solvers converged" language="python">
      assert(solvers_converged)
    </test>
    <test name="Final time greater than 1.0" language="python">
assert FinalTime &gt; 1.0
    </test>
    <test name="Maximum velocity less than 1.1" language="python">
assert MaximumVelocity &lt; 1.1
    </test>
    <test name="Maximum pressure less than 0.25" language="python">
assert MaximumPressure &lt; 0.25
    </test>
    <test name="Minimum pressure greater than -0.25" language="python">
assert MinimumPressure &gt; -0.25
    </test>
    <test name="Check final number of nodes within 100 of the number I had when run with code revision 10100" language="python">
assert abs ( FinalNodeCount - 14200 ) &lt; 1000
    </test>
    <test name="Reattachment length does not change by more than 10%" language="python">
        print ( ( max(RL[:,0]) - min(RL[:,0]) ) / min(RL[:,0]) )
assert( ( max(RL[:,0]) - min(RL[:,0]) ) / min(RL[:,0]) &lt; 0.1)
    </test>
  </pass_tests>
  <warn_tests>
  </warn_tests>
</testproblem>
{'fraction_non_alphanumeric': 0.140424784974548, 'fraction_numerical': 0.021590310689836755, 'mean_word_length': 5.672131147540983, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 2, '>': 91, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '5561673', 'n_tokens_mistral': 1920, 'n_tokens_neox': 1817, 'n_words': 405}