示例#1
0
 def test_hydrostatic_use_E_r(self, tmpdir):
     with pytest.raises(SolverError):
         solve(
             output_dir=Path(str(tmpdir)), sonic_method="hydrostatic",
             config_file=None, output_file=None, store_internal=True,
             overrides={"use_E_r": "True"},
         )
示例#2
0
def sonic_root_solution_default(tmpdir_factory):
    method = "sonic_root"
    tmpdir = tmpdir_factory.mktemp(method)
    return str(
        solve(
            sonic_method=method,
            output_dir=Path(str(tmpdir)),
            output_file=None,
            config_file=None,
            store_internal=True,
        )[0])
示例#3
0
def mod_hydro_solution_no_internal(tmpdir_factory):
    method = "mod_hydro"
    tmpdir = tmpdir_factory.mktemp(method)
    return str(
        solve(
            sonic_method=method,
            output_dir=Path(str(tmpdir)),
            output_file=None,
            config_file=None,
            store_internal=False,
        )[0])
示例#4
0
def mod_hydro_solution_use_E_r(tmpdir_factory):
    method = "mod_hydro"
    tmpdir = tmpdir_factory.mktemp(method)
    return str(
        solve(
            sonic_method=method,
            output_dir=Path(str(tmpdir)),
            output_file=None,
            config_file=None,
            store_internal=True,
            overrides={"use_E_r": "True"},
        )[0])
示例#5
0
def step_solution_default(tmpdir_factory):
    method = "step"
    tmpdir = tmpdir_factory.mktemp(method)
    return str(
        solve(
            sonic_method=method,
            output_dir=Path(str(tmpdir)),
            output_file=None,
            config_file=None,
            store_internal=True,
            max_search_steps=3,
            num_attempts=5,
        )[0])
示例#6
0
 def test_sonic_root_no_internal(self, tmpdir):
     solve(
         output_dir=Path(str(tmpdir)), sonic_method="sonic_root",
         config_file=None, output_file=None, store_internal=False,
     )
示例#7
0
 def test_mcmc_default(self, tmpdir):
     solve(
         output_dir=Path(str(tmpdir)), sonic_method="mcmc",
         config_file=None, output_file=None, store_internal=True,
     )
示例#8
0
 def test_step_default(self, tmpdir):
     solve(
         output_dir=Path(str(tmpdir)), sonic_method="step",
         config_file=None, output_file=None, store_internal=True,
         max_search_steps=3, num_attempts=5,
     )
示例#9
0
 def test_single_default_use_E_r(self, tmpdir):
     solve(
         output_dir=Path(str(tmpdir)), sonic_method="single",
         config_file=None, output_file=None, store_internal=True,
         overrides={"use_E_r": "True"},
     )
示例#10
0
 def test_single_no_internal_step_sonic(self, tmpdir):
     solve(
         output_dir=Path(str(tmpdir)), sonic_method="single",
         config_file=None, output_file=None, store_internal=False,
         overrides={"use_taylor_jump": "True"},
     )
示例#11
0
 def test_single_default_taylor_solution(self, tmpdir):
     solve(
         output_dir=Path(str(tmpdir)), sonic_method="single",
         config_file=None, output_file=None, store_internal=True,
         overrides={"use_taylor_jump": "False"},
     )
示例#12
0
 def test_fast_crosser_use_E_r(self, tmpdir, log_with_logbook):
     solve(
         output_dir=Path(str(tmpdir)), sonic_method="fast_crosser",
         config_file=None, output_file=None, store_internal=False,
         overrides={"use_E_r": "True"},
     )
示例#13
0
 def test_mod_hydro_use_E_r(self, tmpdir):
     solve(
         output_dir=Path(str(tmpdir)), sonic_method="mod_hydro",
         config_file=None, output_file=None, store_internal=True,
         overrides={"use_E_r": "True"},
     )
示例#14
0
 def test_hydrostatic_no_internal(self, tmpdir):
     solve(
         output_dir=Path(str(tmpdir)), sonic_method="hydrostatic",
         config_file=None, output_file=None, store_internal=False,
     )