<commit_before>--
-- Basic tests
--

pond = {
  init = function(x,y) return 1, 0, 0 end,
  out = "pond.out"
}

river = {
  init = function(x,y) return 1, 1, 0 end,
  out = "river.out"
}

dam = {
  init = function(x,y)
    if (x-1)*(x-1) + (y-1)*(y-1) < 0.25 then
      return 1.5, 0, 0
    else
      return 1, 0, 0
    end
  end,
  out = "dam_break.out"
}

wave = {
  init = function(x,y)
    return 1.0 + 0.2 * math.sin(math.pi * x), 1, 0
  end,
  out = "wave.out",
  frames = 100
}

simulate(_G[args[1]])
<commit_msg>Added support for domain size parameter to all tests cases.<commit_after>--
-- Basic tests
--
nx = tonumber(args[2]) or 200

pond = {
  init = function(x,y) return 1, 0, 0 end,
  out = "pond.out",
  nx = nx
}

river = {
  init = function(x,y) return 1, 1, 0 end,
  out = "river.out",
  nx = nx
}

dam = {
  init = function(x,y)
    if (x-1)*(x-1) + (y-1)*(y-1) < 0.25 then
      return 1.5, 0, 0
    else
      return 1, 0, 0
    end
  end,
  out = "dam_break.out",
  nx = nx
}

wave = {
  init = function(x,y)
    return 1.0 + 0.2 * math.sin(math.pi * x), 1, 0
  end,
  out = "wave.out",
  frames = 100,
  nx = nx
}

simulate(_G[args[1]])

{'fraction_non_alphanumeric': 0.1879310344827586, 'fraction_numerical': 0.05517241379310345, 'mean_word_length': 2.207182320441989, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2386593', 'n_tokens_mistral': 574, 'n_tokens_neox': 526, 'n_words': 141}