Skip to content

Commit

Permalink
good results experiment 1 (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuriyzabegaev committed Sep 8, 2023
1 parent 0386f46 commit 5068df7
Show file tree
Hide file tree
Showing 5 changed files with 316 additions and 61 deletions.
175 changes: 136 additions & 39 deletions examples/1/results_poro.ipynb

Large diffs are not rendered by default.

183 changes: 170 additions & 13 deletions examples/1/results_thermal.ipynb

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions examples/1/run.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ fi
num_repeats=$1

targets=(
# "poro_l0.py"
# "poro_l1.py"
# "poro_ldynamic.py"
# "poro_lrandom.py"
"poro_l0.py"
"poro_l1.py"
"poro_ldynamic.py"
"poro_lrandom.py"
"thermal_dynamic.py"
# "thermal_random.py"
"thermal_random.py"
"thermal_cpr.py"
# "thermal_schur.py"
"thermal_schur.py"
)

for target in ${targets[@]}; do
Expand Down
1 change: 1 addition & 0 deletions src/solver_selector/data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class NonlinearSolverStats:

is_converged: bool
is_diverged: bool
num_nonlinear_iterations: int # about to remove
nonlinear_error: Sequence[float]
iterations: Sequence[NonlinearIterationStats]

Expand Down
6 changes: 3 additions & 3 deletions src/solver_selector/solver_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

@dataclass(kw_only=True, slots=True, frozen=True)
class NumericalParameter:
bounds: tuple[float, float]
default: float
bounds: tuple[number, number]
default: number
scale: Literal["linear", "log10"] = "linear"
dtype: Literal["float", "int"] = "float"
is_optimized: bool = True
Expand Down Expand Up @@ -506,7 +506,7 @@ def __init__(
if isinstance(param, int | float):
param = NumericalParameter(
bounds=(param, param),
default=float(param),
default=param,
is_optimized=False,
)
tmp[param_name] = param
Expand Down

0 comments on commit 5068df7

Please sign in to comment.