Skip to content
Snippets Groups Projects
Commit 9b80c0e2 authored by Pierre Augier's avatar Pierre Augier
Browse files

Profile new algo for phaseshift random

parent 72466574
No related branches found
No related tags found
1 merge request!156Topic/default/phaseshift3d
......@@ -68,6 +68,20 @@
"--t_end", help="params.time_stepping.t_end", type=float, default=20.0,
)
parser.add_argument(
"--nb_pairs",
help="params.time_stepping.phaseshift_random.nb_pairs",
type=int,
default=1,
)
parser.add_argument(
"--nb_steps_compute_new_pair",
help="params.time_stepping.phaseshift_random.nb_steps_compute_new_pair",
type=int,
default=None,
)
Re = 1600
V0 = 1.0
......@@ -82,6 +96,12 @@
f"{args.type_time_scheme}_trunc{args.coef_dealiasing:.3f}"
)
if args.nb_pairs != 1:
params.short_name_type_run += f"_nb_pairs{args.nb_pairs}"
if args.nb_steps_compute_new_pair:
params.short_name_type_run += f"_nb_steps{args.nb_steps_compute_new_pair}"
if args.cfl_coef:
params.short_name_type_run += f"_cfl{args.cfl_coef}"
......@@ -95,6 +115,10 @@
params.time_stepping.max_elapsed = args.max_elapsed
params.time_stepping.cfl_coef = args.cfl_coef
params_phaseshift = params.time_stepping.phaseshift_random
params_phaseshift.nb_pairs = args.nb_pairs
params_phaseshift.nb_steps_compute_new_pair = args.nb_steps_compute_new_pair
params.oper.nx = params.oper.ny = params.oper.nz = args.nx
params.oper.Lx = params.oper.Ly = params.oper.Lz = 2 * np.pi * L
params.oper.coef_dealiasing = args.coef_dealiasing
......@@ -158,6 +182,12 @@
if args.cfl_coef:
name_file += f"_cfl{args.cfl_coef}"
if args.nb_pairs != 1:
name_file += f"_nb_pairs{args.nb_pairs}"
if args.nb_steps_compute_new_pair:
name_file += f"_nb_steps{args.nb_steps_compute_new_pair}"
name_file += ".txt"
path_idempotent_file = path_dir / name_file
......
from util_submit import submit_profile
coef_dealiasing = 1
nx = 576
scheme = "RK2_phaseshift_random"
submit_profile(
coef_dealiasing, nx, scheme, t_end=0.5 / 8, nb_pairs=1, nb_steps=None
)
......@@ -58,7 +58,15 @@
pass
def submit_profile(coef_dealiasing, nx, type_time_scheme, t_end, cfl_coef=None):
def submit_profile(
coef_dealiasing,
nx,
type_time_scheme,
t_end,
cfl_coef=None,
nb_pairs=1,
nb_steps=None,
):
if nx < 480:
nb_cores_per_node = 10
......@@ -67,9 +75,10 @@
command = (
f"run_profile.py -cd {coef_dealiasing} -nx {nx} "
f"--type_time_scheme {type_time_scheme} --t_end {t_end}"
f"--type_time_scheme {type_time_scheme} --t_end {t_end} "
f"--nb_pairs {nb_pairs}"
)
if cfl_coef:
command += f" -cfl {cfl_coef}"
......@@ -71,8 +80,11 @@
)
if cfl_coef:
command += f" -cfl {cfl_coef}"
if nb_steps:
command += f" --nb_steps {nb_steps}"
name_run = f"{type_time_scheme}_trunc{coef_dealiasing:.3f}"
if cfl_coef:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment