|
flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| _box (cls) | |
| _fluid (cls, **bc) | |
| _scalar (cls) | |
| _vof (cls) | |
| _vof_open (cls) | |
| _phase_change (cls) | |
| _blocks (cls) | |
| _staggered_only (match) | |
| test_bad_value_raises_value_error_naming_the_parameter (cls, case, call, value, param) | |
| test_valid_value_is_accepted (cls, case, call, value, outcome) | |
| test_message_states_range_unit_and_value () | |
| test_refused_value_leaves_the_setting_unchanged (cls) | |
| test_existing_cell_count_check_is_unchanged () | |
Variables | |
| NAN | |
| INF | |
| int | N = 8 |
| list | CLASSES = [flow.Solver, flow.SolverColocated] |
| tuple | _NO_SCENE = (RuntimeError, "set_scene first") |
| tuple | _NO_WALL = (RuntimeError, "wetting wall") |
| list | CASES |
| list | _BAD = [(cls, c[0], c[1], b, c[4]) for cls in CLASSES for c in CASES for b in c[2]] |
| list | _GOOD = [(cls, c[0], c[1], c[3], c[5]) for cls in CLASSES for c in CASES if c[3] is not None] |
Contract: the public setters refuse a NaN/Inf or physically inadmissible value with ValueError. Validation lives in the binding (src/flow_bindings_checks.hpp, used from src/flow_bindings.cpp); the message names the setter, the parameter, the admissible range with its dimension and the offending value. Each validated argument is covered on both solvers twice: every bad value raises ValueError naming the parameter, and one valid value is accepted (where a call needs a fixture this file does not build -- a scene, a wetting wall -- the valid value is shown to pass validation by the call reaching the C++ check behind it, which raises RuntimeError instead). Where a sign or a 0 is a switch the check is "finite" only (set_velocity_residual_tolerance: < 0 follows the pressure rtol; set_contact_angle_dynamic sigma: <= 0 takes set_surface_tension's; set_vof_block_assign every: 0 never re-assigns; set_mass_flux_uniform: the sign is the direction). Run: PYTHONPATH=<build> python -m pytest -q tests/python/test_input_validation.py
|
protected |
Definition at line 29 of file test_input_validation.py.
Referenced by _fluid(), test_message_states_range_unit_and_value(), and test_refused_value_leaves_the_setting_unchanged().
|
protected |
A physical all-fluid box with properties and a geometry (what add_scalar / VoF need).
Definition at line 33 of file test_input_validation.py.
References _box().
Referenced by _scalar(), _vof(), and _vof_open().
|
protected |
Definition at line 45 of file test_input_validation.py.
References _fluid().
|
protected |
Definition at line 51 of file test_input_validation.py.
References _fluid().
Referenced by _blocks(), and _phase_change().
|
protected |
VoF with an inflow -x face and an outflow +x face.
Definition at line 57 of file test_input_validation.py.
References _fluid().
|
protected |
Phase change is staggered-only: SolverColocated gets VoF alone (its setter then refuses).
Definition at line 64 of file test_input_validation.py.
References _vof().
|
protected |
Definition at line 72 of file test_input_validation.py.
References _vof().
|
protected |
Accepted on Solver; on SolverColocated past validation into the solver's refusal.
Definition at line 78 of file test_input_validation.py.
| test_input_validation.test_bad_value_raises_value_error_naming_the_parameter | ( | cls, | |
| case, | |||
| call, | |||
| value, | |||
| param ) |
Definition at line 187 of file test_input_validation.py.
| test_input_validation.test_valid_value_is_accepted | ( | cls, | |
| case, | |||
| call, | |||
| value, | |||
| outcome ) |
Definition at line 197 of file test_input_validation.py.
| test_input_validation.test_message_states_range_unit_and_value | ( | ) |
Definition at line 208 of file test_input_validation.py.
References _box().
| test_input_validation.test_refused_value_leaves_the_setting_unchanged | ( | cls | ) |
Definition at line 225 of file test_input_validation.py.
References _box().
| test_input_validation.test_existing_cell_count_check_is_unchanged | ( | ) |
The cells check predates this file: RuntimeError, message unchanged.
Definition at line 237 of file test_input_validation.py.
| test_input_validation.NAN |
Definition at line 24 of file test_input_validation.py.
| test_input_validation.INF |
Definition at line 24 of file test_input_validation.py.
| int test_input_validation.N = 8 |
Definition at line 25 of file test_input_validation.py.
| list test_input_validation.CLASSES = [flow.Solver, flow.SolverColocated] |
Definition at line 26 of file test_input_validation.py.
|
protected |
Definition at line 83 of file test_input_validation.py.
|
protected |
Definition at line 84 of file test_input_validation.py.
| list test_input_validation.CASES |
Definition at line 89 of file test_input_validation.py.
|
protected |
Definition at line 181 of file test_input_validation.py.
|
protected |
Definition at line 182 of file test_input_validation.py.