|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
Data Structures | |
| class | _LazyNumpyProxy |
Module-like proxy that preserves picurv.np without eager import. More... | |
| class | CommandExecutionError |
| Raised when an external command exits unsuccessfully. More... | |
| class | PlotDependencyError |
| Raised when plot.gen reports a missing optional dependency. More... | |
Functions | |
| _prune_incompatible_python_site_paths (paths) | |
| Remove site-package paths for a different Python major/minor version. | |
| _drop_imported_package (str package_name) | |
| Remove a failed/partial import package tree from sys.modules. | |
| require_numpy () | |
| Import NumPy only for commands that need numeric reductions. | |
| optional_matplotlib_pyplot () | |
| Import matplotlib.pyplot lazily for study plot generation. | |
| int | parse_slurm_time_limit_to_seconds (str time_text) |
| Parse a Slurm time-limit string into total seconds. | |
| "dict | None" | resolve_walltime_guard_policy ("dict | None" cluster_cfg) |
| Resolve the effective Slurm walltime-guard policy for generated solver jobs. | |
| dict | build_walltime_guard_exports ("dict | None" cluster_cfg) |
| Build shell-evaluated environment exports for the runtime walltime guard. | |
| str | resolve_runtime_executable (str executable_name) |
| Resolve solver/post executable path, preferring local sibling binaries. | |
| str | _sanitize_error_field (value) |
| Normalize error fields into a single-line string. | |
| emit_structured_error (str code, str key="-", str file_path="-", str message="", str hint=None, stream=None) | |
| Emit one standardized error line for tooling and users. | |
| fail_cli_usage (str message, str hint=None) | |
| Emit a structured CLI usage error and exit with code 2. | |
| _split_error_file_and_message (str raw_error) | |
| Split '<file>: <message>' style validation strings when possible. | |
| str | _extract_key_path (str message) |
| Best-effort key-path extraction from free-form validation messages. | |
| str | _classify_error_code (str message) |
| Map existing validation/error messages to the standardized code set. | |
| dict | read_yaml_file (str filepath) |
| Safely reads a YAML file and returns its content. | |
| write_yaml_file (str filepath, dict data) | |
| Write YAML with stable ordering for generated study artifacts. | |
| write_json_file (str filepath, dict payload) | |
| Write JSON metadata/manifests with a stable, readable format. | |
| str | write_runtime_execution_file (str filepath, str template_source_path=None) |
| Write a default runtime execution config, copying a source template when available. | |
| bool | _launcher_arg_contains_whitespace (token) |
| Return True when a launcher arg token contains embedded whitespace and should be split. | |
| "str | None" | resolve_runtime_execution_seed_source (str source_project_root) |
| Prefer repo-local ignored runtime config, then tracked example, then built-in defaults. | |
| dict | ensure_case_runtime_execution_config (str case_dir, str source_project_root, bool overwrite=False) |
| Create case-local runtime execution config if missing, seeded from repo-local config when available. | |
| bool | is_project_root (str candidate) |
| Return True when a directory looks like the PICurv source repository root. | |
| _iter_parent_dirs (str start_path) | |
| Yield a path and all of its parents up to filesystem root. | |
| find_project_root_upwards (str start_path) | |
| Search upward from an anchor and return the first matching project root. | |
| discover_local_project_root (*extra_anchors) | |
| Best-effort source repo discovery from runtime anchors. | |
| find_case_origin_metadata_file (str case_dir_hint=None) | |
| Find the nearest case-origin metadata file from known runtime anchors. | |
| load_case_origin_metadata (str case_dir_hint=None) | |
| Load case-origin metadata if present, returning (case_dir, metadata_path, payload). | |
| find_runtime_execution_config_file (*anchors) | |
| Find the nearest optional execution config from runtime/case anchors. | |
| dict | _normalize_execution_override_section (dict payload, str section_name, str config_path, str config_label) |
| Validate one execution override section while preserving missing-vs-empty semantics. | |
| load_runtime_execution_config (str config_search_anchor=None, extra_search_anchors=None) | |
| Load optional shared execution launcher config from the nearest runtime config file. | |
| dict | merge_execution_overrides ("dict | None" base, "dict | None" override) |
| Merge execution overrides, letting explicit override values win key-by-key. | |
| dict | resolve_runtime_execution_context (dict runtime_execution_cfg, str context) |
| Resolve default plus context-specific execution overrides. | |
| str | get_git_commit (str repo_root=None) |
| Best-effort git commit lookup for run/study manifests and case metadata. | |
| write_case_origin_metadata (str case_dir, str source_project_root, str template_name=None, dict existing=None, template_managed_files=None) | |
| Create or refresh case-origin metadata for repo-aware case maintenance commands. | |
| bool | make_args_include_explicit_goal ("list[str]" make_args) |
| Return True when make args contain an explicit target rather than only options/assignments. | |
| resolve_case_origin_context (str case_dir_hint=None, str source_root_override=None, str template_name_override=None) | |
| Resolve case directory, source repo root, and optional template metadata. | |
| require_project_root (str candidate, str purpose) | |
| Validate that a source repo root was resolved and is structurally valid. | |
| require_existing_case_dir (str case_dir, str purpose, str source_project_root=None) | |
| Validate that a target case directory exists and is not the source repo root. | |
| resolve_template_directory (str source_project_root, str template_name) | |
| Resolve an example template directory inside the source repository. | |
| list_template_relative_files (str template_dir, excluded_rel_paths=None) | |
| List all files in a template directory as case-relative paths. | |
| list_source_binaries (str source_project_root) | |
| List binary artifacts currently available in the source repo bin directory. | |
| sync_case_binaries (str case_dir, str source_project_root) | |
| Copy current source-repo binaries into a case directory for version-pinning. | |
| sync_case_template_files (str case_dir, str template_dir, bool overwrite=False, bool prune=False, managed_rel_paths=None) | |
| Sync template files into a case directory, preserving modified files unless overwrite is requested. | |
| compute_case_source_status (str case_dir, str source_project_root, str template_name=None, dict metadata=None) | |
| Compute source/case drift across commits, binaries, and template-managed files. | |
| print_case_source_status (dict status) | |
| Render human-readable source/case drift details. | |
| status_source_command (args) | |
| Report source/case drift for an initialized case directory. | |
| str | resolve_path (str anchor_file, str candidate) |
| Resolve a potentially relative path against a source YAML file path. | |
| _mapping_value_with_aliases (dict mapping, *keys, default=None) | |
| Return the first defined value from a mapping across alias keys. | |
| get_post_run_control_value (dict post_cfg, str canonical_key, default=None) | |
| Resolve post run_control values with backwards-compatible legacy aliases. | |
| None | warn_on_grid_generator_hyphen_keys (dict generator, str case_path, list warnings) |
| Warn when grid.generator uses unsupported hyphenated wrapper keys. | |
| get_post_source_data (dict post_cfg) | |
| Return source_data as a mapping when valid, else an empty mapping. | |
| str | get_post_source_directory_template (dict post_cfg, str default="<solver_output_dir>") |
| Resolve the source directory template from source_data with a safe default. | |
| get_post_input_extensions (dict post_cfg) | |
| Return post input_extensions, preferring io. | |
| get_post_statistics_task_tokens (dict post_cfg) | |
| Return normalized statistics pipeline tokens that will be written into post.run. | |
| str | get_monitor_output_directory (dict monitor_cfg, str default="output") |
| Resolve the solver output root from monitor.yml, preserving the default layout. | |
| str | get_post_statistics_output_prefix (dict post_cfg, str default="Stats") |
| Resolve the statistics CSV prefix, preserving legacy top-level override support. | |
| str | resolve_post_statistics_output_prefix (dict post_cfg, monitor_cfg=None, str default="Stats") |
| Resolve the runtime statistics prefix, routing bare basenames under the monitor output root. | |
| get_post_statistics_output_artifacts (dict post_cfg, str run_dir, monitor_cfg=None) | |
| Predict statistics CSV output paths relative to the postprocessor runtime cwd. | |
| dict | build_post_recipe_config (dict post_cfg, monitor_cfg=None) |
| Build the flat key=value mapping consumed by the C post-processor. | |
| dict | normalize_post_recipe_signature (dict recipe_cfg) |
| Normalize post recipe settings into a stable signature mapping. | |
| "tuple[dict, str]" | compute_post_recipe_fingerprint (dict recipe_cfg) |
| Return normalized recipe signature plus SHA-256 fingerprint. | |
| parse_post_recipe_file (str post_recipe_path) | |
| Parse an existing generated post.run file into a key/value mapping. | |
| str | get_post_resume_state_path (str run_dir) |
| Return the JSON resume metadata path for a run directory. | |
| dict | get_post_lock_paths (str run_dir) |
| Return lock-wrapper related paths for a run directory. | |
| str | _post_output_directory_abs (str run_dir, dict post_cfg) |
| Resolve the absolute post output directory for the current recipe. | |
| bool | _post_requests_eulerian_output (dict post_cfg) |
| Return whether the current post recipe expects Eulerian VTK output artifacts. | |
| bool | _post_requests_particle_output (dict post_cfg) |
| Return whether the current post recipe expects particle VTP output artifacts. | |
| bool | _post_requests_statistics (dict post_cfg) |
| Return whether the current post recipe expects statistics CSV artifacts. | |
| bool | _post_needs_particle_source (dict post_cfg) |
| Return whether the current post recipe requires particle source files to be present. | |
| _iter_post_steps (int start_step, int end_step, int step_interval) | |
| Yield configured post-processing steps inclusively. | |
| "tuple[int, int, int]" | resolve_post_requested_window (dict post_cfg, dict case_cfg=None) |
| Resolve post requested start/end/interval, expanding end=-1 via case.yml when available. | |
| dict | prepare_effective_post_config (dict post_cfg, str resolved_source_dir, int start_step=None, int end_step=None) |
| Return a copy of post_cfg with resolved source dir and optional effective bounds. | |
| "set[int]" | _scan_post_vtk_steps (str prefix_path, str extension) |
| Scan VTK output files matching '<prefix>_<step>. | |
| "set[int]" | _scan_post_statistics_csv_steps (str csv_path) |
| Scan step ids from the first CSV column of a statistics artifact. | |
| "list[set[int]]" | collect_post_completion_families (str run_dir, dict post_cfg, monitor_cfg=None) |
| Collect per-family completed-step sets for the current post recipe. | |
| dict | detect_post_completed_frontier (str run_dir, dict post_cfg, monitor_cfg, int start_step, int end_step, int step_interval) |
| Detect the highest contiguous fully completed post step for the current recipe. | |
| _nearest_step ("set[int]" steps, int target) | |
| Return the complete source step nearest to a target step. | |
| str | _format_optional_step (step) |
| Format an optional step number for user-facing diagnostics. | |
| "tuple[set[int], dict]" | _scan_complete_source_steps (str source_dir, dict monitor_cfg, dict post_cfg) |
| Scan source artifacts and return steps with every file required by the recipe. | |
| "list[str]" | _expected_source_paths_for_step (int step, dict source_scan, dict post_cfg) |
| Build required source file paths for a single post-processing step. | |
| dict | detect_post_source_frontier (str source_dir, dict monitor_cfg, dict post_cfg, int start_step, int end_step, int step_interval) |
| Detect the highest contiguous fully available source step for live post-processing. | |
| persist_post_resume_state (str run_dir, dict plan, last_successful_requested_end_step=None) | |
| Persist post resume lineage metadata for future –continue runs. | |
| str | _build_post_lock_wrapper_source () |
| Return the Python wrapper used to hold an exclusive post-stage lock. | |
| str | ensure_post_lock_wrapper (str run_dir) |
| Ensure the lock wrapper exists for a run directory and return its path. | |
| "tuple[list, dict]" | build_post_locked_command (str run_dir, str recipe_fingerprint, list wrapped_command, bool create_wrapper=True) |
| Wrap a postprocessor command behind the run-dir-scoped lock wrapper. | |
| dict | build_post_execution_plan (str run_dir, str run_id, dict case_cfg, dict monitor_cfg, dict post_cfg, bool continue_requested=False, bool allow_source_frontier_scan=True) |
| Resolve post resume/source-availability behavior into one execution plan. | |
| bool | needs_restart_source (dict case_cfg, dict solver_cfg) |
| Return True when the solver requires restart data from disk. | |
| str | resolve_run_output_dir (str run_dir, dict monitor_cfg) |
| Resolve the output data directory within a run directory. | |
| str | resolve_run_restart_dir (str run_dir, dict monitor_cfg) |
| Resolve the restart staging directory within a run directory. | |
| populate_restart_directory (str source_output, str target_restart, int start_step, dict monitor_cfg) | |
| Copy checkpoint files for a specific step from source output to target restart. | |
| detect_last_checkpoint_step (str output_dir, str euler_subdir="eulerian", str particle_subdir="particles") | |
| Scan output directory for the highest step number available. | |
| dict | detect_case_completion_status (str run_dir, dict monitor_cfg, int target_final_step) |
| Determine whether a study case is complete, partially complete, or empty. | |
| validate_load_mode_step_range (str source_output, int start_step, int total_steps, dict monitor_cfg) | |
| Validate that all required eulerian step files exist for "load" mode. | |
| validate_particle_checkpoint (str source_dir, int start_step, dict monitor_cfg) | |
| Validate that particle checkpoint files exist for the given step. | |
| dict | read_monitor_from_run (str run_dir) |
| Read the monitor.yml from a run directory's config/ subdirectory. | |
| resolve_restart_source (args, dict case_cfg, dict solver_cfg, dict monitor_cfg, str run_dir) | |
| Resolve the restart source directory based on –restart-from or –continue CLI flags. | |
| absolutize_case_external_paths (dict case_cfg, str case_anchor_path) | |
| Convert external grid/generator paths in case config to absolute paths. | |
| prepare_case_for_continuation (str run_dir, str case_id, int last_step, int target_final_step, dict cluster_cfg) | |
| Set up a partially-completed study case for continuation in-place. | |
| bool | is_valid_email (str email) |
| Lightweight email validation for scheduler notifications. | |
| str | normalize_statistics_task (str task_name) |
| Normalizes user-facing statistics task names to C pipeline keywords. | |
| _iter_nonempty_noncomment_lines (file_obj) | |
| Yield (lineno, stripped_line) for non-empty, non-comment lines. | |
| dict | validate_and_nondimensionalize_picgrid (str source_grid, str dest_grid, float L_ref, int expected_nblk=None) |
| Validates PICGRID payload and writes a non-dimensionalized copy. | |
| list | read_picgrid_header_dimensions (str source_grid, int expected_nblk=None) |
| Read only the canonical PICGRID header dimensions. | |
| dict | validate_and_nondimensionalize_picslice (str source_slice, str dest_slice, float U_ref, tuple expected_dims=None) |
| Validate a canonical PICSLICE payload and write a solver-scale copy. | |
| str | _face_artifact_token (str face) |
| Convert a BC face token into a filesystem-friendly artifact token. | |
| str | _resolve_run_artifact_path (str run_dir, str configured_path, str default_path, bool default_to_config_dir=False) |
| Resolve a run artifact path with run-dir-relative defaults. | |
| str | _resolve_generator_script (str configured_script, str case_path, str default_name) |
| Resolve an optional generator script override or repository default. | |
| dict | _normalize_square_duct_poiseuille_params (params, str field_name) |
| Validate square-duct Poiseuille generator parameters. | |
| dict | _normalize_field_slice_source (source, str field_name) |
| Validate a prescribed_flow field_slice source block. | |
| dict | _normalize_field_slice_selector (slice_cfg, str field_name) |
| Validate the field_slice slice selector. | |
| dict | generate_square_duct_poiseuille_picslice (str output_path, tuple dims, dict params, str target_grid=None, int target_block=0, str target_face=None, str script=None, str case_path=None) |
| Generate a dimensional canonical PICSLICE for square-duct Poiseuille flow. | |
| dict | generate_field_slice_picslice (str output_path, tuple expected_dims, dict source, str target_grid, str target_face, int target_block, str case_path) |
| Invoke profile.gen to extract a field_slice PICSLICE artifact. | |
| str | _resolve_case_relative_path (str path_value, str case_dir) |
| Resolve a path relative to the current case directory. | |
| float | _resolve_field_slice_velocity_scale (dict source, str case_dir) |
| Resolve field_slice dimensional velocity scale. | |
| str | resolve_target_grid_for_field_slice (dict case_cfg, str case_path, str run_dir) |
| Resolve the target canonical PICGRID path needed for field_slice normals. | |
| str | resolve_target_grid_for_generated_profile (dict case_cfg, str case_path, str run_dir) |
| Resolve an optional target canonical PICGRID for generated profile sampling. | |
| str | write_profile_info (str config_dir, list summaries) |
| Write a profile.info summary for generated inlet profiles. | |
| str | run_grid_generator (str case_path, str run_dir, dict grid_cfg) |
| Runs generators/grid.gen to produce a PICGRID file for this run. | |
| str | convert_legacy_grid_with_gridgen (str case_path, str run_dir, dict grid_cfg, str source_grid) |
| Optionally convert a legacy file-grid payload to canonical PICGRID using grid.gen. | |
| dict | _normalize_prescribed_flow_source (source, str field_name) |
| Validate the structured source block for prescribed_flow BCs. | |
| tuple | _bc_profile_expected_dims (str face, tuple block_dims) |
| Return expected PICSLICE dimensions for a face and block node dimensions. | |
| list | resolve_grid_block_dimensions_for_profiles (dict case_cfg, str case_path, str run_dir=None) |
| Resolve per-block node dimensions for prescribed inlet profile validation. | |
| list | materialize_generated_prescribed_flow_profiles (str run_dir, dict case_cfg, str case_path, list profile_grid_dims=None) |
| Generate dimensional PICSLICE artifacts for generated/field_slice prescribed_flow sources. | |
| float | _to_float (value, str field_name) |
| Convert a YAML scalar to float with a clear error message. | |
| bool | _to_bool (value, str field_name) |
| Convert a YAML scalar/string to bool with a clear error message. | |
| normalize_boundary_conditions_layout (all_blocks_bcs, int num_blocks) | |
| Normalize boundary_conditions to list-of-lists form and validate block count. | |
| validate_and_prepare_boundary_conditions (dict case_cfg) | |
| Validate BC entries against currently supported C-side handlers/types and. | |
| str | _schema_path_text (tuple path) |
| Render an internal schema path tuple as a user-facing YAML path. | |
| _lookup_allowed_schema_keys (dict schema, tuple path) | |
| Return allowed keys for a path, honoring '*' dynamic mapping entries. | |
| str | _schema_key_hint (dict schema, tuple path, str key, set allowed) |
| Build a concise typo or hierarchy hint for an unsupported YAML key. | |
| None | _validate_yaml_schema_keys (cfg, dict schema, str file_path, list errors, tuple path=()) |
| Reject unsupported YAML keys before they can be silently ignored by staging. | |
| validate_solver_configs (dict case_cfg, dict solver_cfg, dict monitor_cfg, str case_path, str solver_path, str monitor_path) | |
| Validates all solver input configs before any work is done. | |
| validate_post_config (dict post_cfg, str post_path) | |
| Validates the post-processing config before running the post-processor. | |
| validate_cluster_config (dict cluster_cfg, str cluster_path) | |
| Validate Slurm scheduler configuration from cluster.yml. | |
| validate_study_config (dict study_cfg, str study_path, bool skip_base_file_check=False) | |
| Validate sweep/study specification from study.yml. | |
| _deep_set (dict container, str dotted_path, value) | |
| Set nested dictionary value, creating intermediate maps when needed. | |
| list | expand_parameter_matrix (dict parameters) |
| Expand study parameter lists into cartesian-product combinations. | |
| list | expand_study_parameter_combinations (dict study_cfg) |
| Expand either cartesian-study parameters or explicit parameter sets. | |
| list | get_study_parameter_keys (dict study_cfg) |
| Collect ordered parameter keys from either cross-product parameter expansions or explicit parameter sets. | |
| int | get_cluster_total_tasks (dict cluster_cfg) |
| Return cluster total tasks. | |
| str | normalize_extension (str ext) |
| Normalize extension. | |
| render_slurm_script (str script_path, str job_name, dict cluster_cfg, list command, str workdir, str stdout_path, str stderr_path=None, dict env_vars=None, dict shell_env_vars=None, str array_spec=None) | |
| Render a Slurm batch script for a single command. | |
| "tuple[str | None, list[str]]" | split_launcher_tokens ("str | None" launcher, "list | None" launcher_args=None, str label="launcher") |
| Canonicalize launcher config into executable token plus argv-style flags. | |
| "tuple[str | None, list[str]]" | normalize_cluster_launcher (dict execution) |
| Canonicalize cluster launcher config into executable token plus argv-style flags. | |
| "list[str]" | strip_launcher_size_flags (str launcher_name, "list[str]" launcher_args) |
| Remove explicit MPI task-count flags from known launchers. | |
| dict | build_serial_post_cluster_config (dict cluster_cfg, int num_procs=1) |
| Clone cluster config and force a single-node post stage task layout. | |
| list | build_local_launch_command (str executable, list executable_args, int num_procs, str config_search_anchor=None, bool allow_single_rank_launcher_override=False, "int | None" force_num_procs=None) |
| Build local launcher command, allowing env or shared config overrides for login-node MPI quirks. | |
| dict | resolve_cluster_execution (dict cluster_cfg, str config_search_anchor=None, extra_search_anchors=None) |
| Resolve cluster execution launcher settings from shared runtime config plus cluster.yml overrides. | |
| list | build_cluster_launch_command (dict cluster_cfg, str executable, list executable_args, str config_search_anchor=None, extra_search_anchors=None, "int | None" force_num_procs=None) |
| Build scheduler launcher command from cluster config plus optional shared execution defaults. | |
| str | parse_slurm_job_id (str sbatch_output) |
| Extract numeric job id from standard sbatch output. | |
| dict | submit_sbatch (str script_path, str dependency=None, str dependency_type="afterok") |
| Submit sbatch script and return submission metadata. | |
| _print_validation_errors (list errors) | |
| Prints validation errors and exits. | |
| str | generate_header (str run_id, dict source_files) |
| Creates a standard header block for all generated files. | |
| str | generate_simple_list_file (str run_dir, str run_id, dict cfg, str section, str key, str filename, dict header_sources) |
| Generic function to create a file containing a simple list of strings. | |
| bool | has_explicit_monitor_whitelist (dict monitor_cfg) |
| Return True when logging.enabled_functions contains at least one entry. | |
| dict | resolve_profiling_config (dict monitor_cfg) |
| Resolve profiling reporting config from monitor.yml. | |
| _diagnostic_bool_or_path (value, str key) | |
| Validate a diagnostics value that can be false, true, or a path/viewer string. | |
| bool | _diagnostic_bool (value, str key) |
| Validate a diagnostics boolean value. | |
| _diagnostic_bool_or_all (value, str key) | |
| Validate a diagnostics value that can be false, true, or "all". | |
| str | _diagnostic_default_file (str run_dir, str filename) |
| Return an absolute run-local diagnostics file path. | |
| _diagnostic_resolve_path_or_default (value, str run_dir, str default_filename) | |
| Resolve true/string diagnostics values to a concrete file path. | |
| dict | resolve_diagnostics_config (dict monitor_cfg, "str | None" run_dir=None, str stage_label="Solver") |
| Resolve monitor diagnostics config and default run-local log paths. | |
| list | build_petsc_diagnostics_args (dict monitor_cfg, str run_dir, str stage_label) |
| Build PETSc diagnostics command-line arguments for a run stage. | |
| dict | prepare_monitor_files (str run_dir, str run_id, dict monitor_cfg, dict source_files) |
| Generate monitor sidecar files and resolve profiling reporting behavior. | |
| list | generate_multi_block_bcs (str run_dir, str run_id, dict case_cfg, dict source_files) |
| Parses multi-block BCs from YAML, generates a .run file for each block, and returns a list of their absolute paths. | |
| format_flag_value (value) | |
| Converts Python types to C-style command-line flag values. | |
| dict | translate_programmatic_grid_settings (dict grid_settings) |
| Return programmatic-grid settings translated to the C node-count contract. | |
| dict | generate_picgrid_from_programmatic_settings (dict raw_settings, str dest_path, float L_ref) |
| Generate a canonical PICGRID file from programmatic Cartesian grid settings. | |
| dict | resolve_grid_da_processor_layout (dict grid_cfg) |
| Resolve optional global DMDA layout, preferring grid-level keys over legacy nested keys. | |
| None | append_grid_da_processor_layout (list control_lines, dict grid_cfg, int num_procs) |
| Append optional global DMDA layout flags for any grid mode. | |
| str | normalize_momentum_solver_type (str value) |
| Maps canonical user-facing momentum solver names to C-enum CLI values. | |
| str | normalize_solution_convergence_mode (str value) |
| Normalizes the solution-convergence mode selector to the C-side canonical string. | |
| int | normalize_field_init_mode (str value) |
| Maps canonical field init mode names to C enum/int codes (-finit). | |
| "tuple[str, int]" | normalize_initial_condition_field (str value) |
| Normalize a file IC field selector to its staged basename and C enum value. | |
| dict | resolve_initial_condition_config (dict ic, prepared_blocks, float U_ref) |
| Resolve legacy and structured initial-condition YAML into one launcher contract. | |
| dict | validate_petsc_vec_binary (str path) |
| Validate the basic PETSc binary VecView envelope used by ReadFieldData. | |
| str | run_initial_condition_generator (str case_path, str run_dir, dict resolved_ic) |
| Run the repository IC generator. | |
| dict | stage_initial_condition_file (str run_dir, str case_path, dict resolved_ic) |
| Materialize and stage one file-backed IC in ReadFieldData's expected layout. | |
| int | normalize_flow_direction_token (str value) |
| Maps a face-token flow direction string to the C FlowDirection enum integer. | |
| bool | _ic_has_inlet (prepared_blocks) |
| Return True if any prepared BC block contains an INLET face. | |
| dict | resolve_ic_cli_params (dict ic, int finit_code, prepared_blocks, float U_ref) |
| Resolve all IC parameters and return a dict of PETSc option values. | |
| str | normalize_eulerian_field_source (str value) |
| Normalizes the Eulerian field source selector to the C-side canonical string. | |
| str | normalize_analytical_type (str value) |
| Normalizes the analytical solution selector to the C-side canonical string. | |
| "tuple[float, float, float]" | parse_initial_velocity_components (dict initial_conditions, int finit_code, *bool require_explicit) |
| Parse initial-condition velocity components with mode-aware defaults. | |
| "str | None" | infer_unique_inlet_axis_from_prepared_bcs (list prepared_blocks) |
| Infer the unique inlet axis across all blocks using C-side "primary inlet" ordering. | |
| int | normalize_particle_init_mode (str value) |
| Maps canonical particle init mode names to C enum/int codes (-pinit). | |
| int | normalize_interpolation_method (str value) |
| Maps interpolation method names to C enum/int codes (-interpolation_method). | |
| int | normalize_les_model (value) |
| Maps LES model selectors to C enum/int codes (-les). | |
| int | normalize_les_test_filter (value) |
| Maps LES test-filter names to the C -testfilter_ik flag. | |
| int | normalize_rans_model (value) |
| Maps RANS model selectors to the current C -rans switch. | |
| str | normalize_wall_function_model (value) |
| Validates wall-function model selectors exposed in YAML. | |
| bool | resolve_enabled_flag (dict cfg, str path, bool default=True) |
Resolves a structured enabled flag and rejects non-boolean values. | |
| append_turbulence_flags (dict models, list control_lines) | |
| Appends turbulence model flags from legacy or structured case.yml blocks. | |
| append_passthrough_flags (list control_lines, dict options) | |
| Appends raw CLI flags to the control list from a {flag: value} dict. | |
| dict | resolve_solver_monitoring_flags (dict monitor_cfg) |
| Resolve human-readable solver monitoring YAML to raw control flags. | |
| "int | None" | resolve_particle_console_output_frequency (dict io_cfg) |
| Return the effective particle-console snapshot cadence from monitor.yml. | |
| parse_and_add_model_flags (dict case_cfg, list control_lines) | |
| Parses the 'models' section of case.yml and adds corresponding C-solver flags. | |
| dict | parse_solver_config (dict solver_cfg) |
| Parses the structured solver.yml into a flat dictionary of {flag: value}. | |
| generate_solver_control_file (run_dir, run_id, configs, num_procs, monitor_files, restart_source_dir=None, continue_mode=False) | |
| Generates the main .control file for the C-solver. | |
| str | generate_post_recipe_file (str run_dir, str run_id, dict post_cfg, dict source_files, monitor_cfg=None) |
| Generates a key=value config file (post.run) for the C post-processor. | |
| execute_command (list command, str run_dir, str log_filename, dict monitor_cfg=None) | |
| Executes a command, streaming its output to the console and a log file. | |
| str | format_command_for_display (list command) |
| Render a shell-safe command string for console and log output. | |
| str | resolve_command_log_path (str run_dir, str log_filename) |
| Resolve a command log filename relative to the run directory. | |
| subprocess.CompletedProcess | _run_captured_command (list command, str run_dir) |
| Run a command and capture combined stdout/stderr details for later inspection. | |
| _require_successful_command (list command, subprocess.CompletedProcess result) | |
Raise CommandExecutionError when a captured command failed. | |
| str | _capture_command_stdout (list command, str run_dir) |
| Run a command, require success, and return stripped stdout text. | |
| _stream_command_to_console_and_log (list command, str run_dir, log_file) | |
| Stream command output to stdout and an already-open log file. | |
| dict | _get_git_head_state (str run_dir) |
| Capture the current git HEAD branch name and commit hash. | |
| "list[tuple[str, str | None]]" | _get_local_branches_with_upstreams (str run_dir) |
| Return local branch names plus their configured upstreams. | |
| bool | _working_tree_has_tracked_changes (str run_dir) |
Return True when the repository has staged or unstaged tracked changes. | |
| _attempt_pull_cleanup (str run_dir, bool rebase, log_file) | |
Best-effort cleanup after a failed git pull so the original branch can be restored. | |
| _restore_git_head (str run_dir, dict original_head, log_file) | |
| Restore the repository back to the branch or detached commit it started on. | |
| pull_all_source_branches (str run_dir, str log_filename, bool rebase=True) | |
| Refresh every local tracking branch in the source repository, then restore the starting branch. | |
| auto_identify_run_inputs (str config_dir) | |
| Auto-detect case.yml, monitor.yml, and *.control in a run config directory. | |
| str | resolve_post_source_directory (str run_dir, dict monitor_cfg, dict post_cfg, bool strict=True) |
| Resolve post source directory token and optionally enforce existence. | |
| render_slurm_array_stage_script (str script_path, str job_name, dict cluster_cfg, str array_spec, str case_index_tsv, str stage, str solver_exe, str post_exe, str stdout_path, str stderr_path) | |
| Render array script that maps SLURM_ARRAY_TASK_ID to per-case run artifacts. | |
| render_metrics_aggregate_script (str script_path, str job_name, dict cluster_cfg, str study_dir, str picurv_path) | |
| Generate a single-node sbatch script that runs metrics aggregation. | |
| reduce_metric_values (values, str reduction) | |
| Reduce a metric series to one scalar according to the requested reducer. | |
| extract_metric_from_csv (str case_dir, dict spec) | |
| Extract a scalar metric from a CSV source. | |
| extract_metric_from_log (str case_dir, dict spec) | |
| Extract a scalar metric from a log file using regex. | |
| normalize_metric_spec (metric) | |
| Normalize study metric definitions to a common dictionary form. | |
| str | aggregate_study_metrics (dict study_cfg, list cases, str results_dir) |
| Collect metric values from generated case directories into one CSV. | |
| infer_plot_x_axis (dict study_cfg, list rows) | |
| Infer x-axis key/values for study plots. | |
| generate_study_plots (dict study_cfg, str metrics_csv, str plots_dir) | |
| Generate metric-vs-parameter plots for completed studies. | |
| str | _command_to_string (list command_tokens) |
| Render a command list as a shell-safe display string. | |
| str | _resolve_post_source_directory_preview (str run_dir, dict monitor_cfg, dict post_cfg) |
| Resolve post source directory without side effects or stdout/stderr output. | |
| dict | build_run_dry_plan (args) |
Build a no-write execution plan for run --dry-run. | |
| None | add_planned_grid_artifacts (dict plan, dict case_cfg, str run_dir) |
| Add grid-mode-specific staged artifacts to a dry-run plan. | |
| None | add_planned_profile_artifacts (dict plan, dict case_cfg, str run_dir) |
| Add generated prescribed-flow profile artifacts to a dry-run plan. | |
| None | add_planned_initial_condition_artifacts (dict plan, dict case_cfg, dict solver_cfg, str run_dir) |
| Add authoritative file-backed initial-condition artifacts to a dry-run plan. | |
| render_run_dry_plan (dict plan, str output_format="text") | |
| Render dry-run plan in human or JSON format. | |
| validate_workflow (args) | |
Implements picurv validate without launching solver/post workflows. | |
| precompute_workflow (args) | |
| Generate deterministic case artifacts without launching solver/post stages. | |
| run_workflow (args) | |
| Main orchestrator for the 'run' command (local and Slurm modes). | |
| list | parse_case_index_tsv (str tsv_path) |
| Parse a case_index.tsv file back into a list of case entry dicts. | |
| sweep_workflow (args) | |
| Study/sweep orchestration using Slurm job arrays. | |
| sweep_continue_workflow (args) | |
| Continue a partially-completed Slurm parameter sweep study. | |
| sweep_reaggregate_workflow (args) | |
| Re-run metrics aggregation and plot generation for an existing study. | |
| _read_yaml_if_exists (str filepath) | |
| Read YAML when present, otherwise return None. | |
| _read_json_if_exists (str filepath) | |
| Read JSON when present, otherwise return None. | |
| _parse_int_loose (value) | |
| Best-effort integer parsing for summary extraction. | |
| _parse_float_loose (value) | |
| Best-effort float parsing for summary extraction. | |
| _extract_numeric_tuple (str text) | |
| Extract a numeric tuple from a string like '(1, 2, 3)'. | |
| dict | _build_summary_context (str run_dir) |
| Resolve run-local config and artifact paths for summarize. | |
| dict | _require_summary_config (dict context, str name) |
| Return one explicitly requested copied config or fail with a structured error. | |
| dict | _build_run_overview (dict context) |
| Build timestep-independent run metadata for summarize. | |
| dict | _summarize_turbulence (dict turbulence_cfg) |
| Build compact turbulence and wall-model selections. | |
| dict | _build_case_overview (dict context) |
| Build a curated case.yml summary with useful derived quantities. | |
| dict | _build_solver_overview (dict context) |
| Build a curated solver.yml summary with normalized selections. | |
| dict | _build_monitor_overview (dict context) |
| Build a curated monitor.yml summary with resolved defaults. | |
| "tuple[dict, list[int]]" | _parse_continuity_metrics_log (str filepath) |
| Parse Continuity_Metrics.log into latest rows by step plus observed order. | |
| "tuple[dict, list[int]]" | _parse_particle_metrics_log (str filepath) |
| Parse Particle_Metrics.log into latest rows by step plus observed order. | |
| "tuple[dict, dict, list[int]]" | _parse_momentum_convergence_logs (str log_dir) |
| Parse per-block momentum convergence logs. | |
| "tuple[dict, dict, list[int]]" | _parse_poisson_convergence_logs (str log_dir) |
| Parse per-block Poisson convergence logs. | |
| "tuple[dict, list[int]]" | _parse_profiling_timestep_csv (str filepath) |
| Parse profiling timestep CSV into latest rows by step plus observed order. | |
| "tuple[dict, list[int], dict]" | _parse_runtime_memory_log (str filepath) |
| Parse Runtime_Memory.log into latest rows by step and final status. | |
| "tuple[dict, list[int]]" | _parse_solution_convergence_log (str filepath) |
| Parse solution_convergence.log into latest rows by step plus observed order. | |
| "list[str]" | _find_solver_stream_log_candidates (str run_dir, str log_dir) |
| Return plausible solver stream logs for local and Slurm runs. | |
| dict | _parse_particle_snapshot_file (str filepath) |
| Parse sampled particle snapshots from a solver stream log. | |
| "int | None" | _find_previous_snapshot_step ("list[int]" snapshot_steps, int step) |
| Return the nearest earlier snapshot step when available. | |
| dict | _compute_particle_snapshot_delta ("list[dict]" current_rows, "list[dict]" previous_rows) |
| Compute sampled deltas between two particle snapshot samples. | |
| dict | _build_particle_snapshot_summary (str source, int step, "list[dict]" rows, int preview_rows, particle_console_output_freq, particle_log_interval, "int | None" previous_step=None, "list[dict] | None" previous_rows=None) |
| Build sampled diagnostics for one particle console snapshot. | |
| dict | _find_particle_snapshot_for_step (str run_dir, str log_dir, int step, int preview_rows, particle_console_output_freq, particle_log_interval) |
| Locate and summarize a particle console snapshot for one step. | |
| _resolve_summary_step (requested_step, continuity_rows, particle_rows, momentum_rows, poisson_rows, profiling_rows, memory_rows=None, convergence_rows=None, step_orders=None, str selection_mode="latest") | |
| Select a step to summarize from available metric artifacts. | |
| str | _format_summary_float (value, str spec=".6e", str missing="n/a") |
| Format optional numeric values for summary text output. | |
| float | _summary_source_mtime (paths) |
| Return the newest modification time among one or more summary sources. | |
| "list[list[int]]" | _order_summary_step_orders ("list[tuple[list[int], object]]" sources) |
| Order observed step sequences by the recency of their source files. | |
| dict | build_run_summary_payload (str run_dir, "int | None" step=None, int snapshot_rows=5, str selection_mode="latest") |
| Build a read-only run-step summary from existing PICurv artifacts. | |
| render_run_summary (dict payload, str output_format="text") | |
| Render a run-step summary in human or JSON form. | |
| str | _summary_display_value (value) |
| Format one configuration-summary value for compact text output. | |
| _print_config_header (str title, "str | None" subtitle=None) | |
| Print a strong dashboard-style configuration summary header. | |
| _print_config_group (str title, list rows) | |
| Print an aligned configuration-summary field group. | |
| list | _flatten_summary_mapping (dict mapping, str prefix="") |
| Flatten nested summary mappings into readable dotted field rows. | |
| _render_run_overview_text (dict summary) | |
| Render run metadata as a compact dashboard. | |
| _render_case_summary_text (dict summary) | |
| Render the case summary as a glanceable simulation dashboard. | |
| _render_solver_summary_text (dict summary) | |
| Render the solver summary as a glanceable numerical-method dashboard. | |
| _render_monitor_summary_text (dict summary) | |
| Render the monitor summary as a glanceable observability dashboard. | |
| render_selected_summary (dict payload, str output_format="text") | |
| Render selected timestep-independent config views and optional health. | |
| _append_summary_plot_record (list records, str source, step, str line, dict values, str source_path, int segment=0) | |
| Append one numeric append-ordered record for summarize plotting. | |
| bool | _is_summary_plot_continuation_marker (str line) |
| Return whether a log line starts a new continuation segment. | |
| list | _collect_summary_plot_records (dict context) |
| Collect append-ordered numeric records from summarize-supported scalar logs. | |
| list | _build_summary_plot_catalog (list records) |
| Build available qualified-series metadata from plot records. | |
| dict | _build_summary_plot_request (dict context, list records, str series, "int | None" last_n, bool linear_y, "str | None" output_path) |
| Build one normalized plot.gen request from collected summarize records. | |
| _render_summary_plot_catalog (list catalog, str output_format) | |
| Render available summarize plot-series metadata. | |
| _invoke_plot_gen (dict request) | |
| Invoke standalone plot.gen with one normalized request over stdin. | |
| summarize_workflow (args) | |
| Build and render a read-only health summary for a run step. | |
| dict | _resolve_submission_target (str run_dir=None, str study_dir=None) |
| Resolve a run/study submission target from explicit directory flags. | |
| dict | _get_submission_stage_metadata (dict target_context, str stage_name) |
| Return stored metadata for one staged submission target. | |
| list | _get_recorded_submission_stages (dict target_context) |
| Return stage names explicitly recorded in scheduler submission metadata. | |
| str | _format_stage_list (list stage_names) |
| Format a human-readable stage list for submit diagnostics. | |
| str | _build_submit_missing_stage_hint (dict target_context, str requested_stage, list selected_stages) |
| Build an actionable hint for requested submit stages missing from metadata. | |
| _set_submission_stage_metadata (dict target_context, str stage_name, dict stage_meta) | |
| Persist one stage's metadata back into the submission payload. | |
| _write_submission_target_metadata (dict target_context) | |
| Write updated submission metadata back to disk. | |
| submit_staged_jobs (args) | |
| Submit previously staged Slurm artifacts from an existing run/study directory. | |
| submit_staged_local_run (args, dict target_context, list selected_stages) | |
| Execute previously staged local run commands from scheduler/submission.json. | |
| cancel_run_jobs (args) | |
| Cancel Slurm-submitted jobs for an existing run directory. | |
| init_case (args) | |
| Implements the 'init' command. | |
| sync_case_binaries_command (args) | |
| Refresh case-local executables from the source repository bin directory. | |
| sync_case_config_command (args) | |
| Refresh template-managed config/docs files in a case directory. | |
| pull_source_repo (args) | |
| Refresh source branches in the repository resolved from a case directory. | |
| build_project (args) | |
| Implements the 'build' command. | |
|
protected |
Remove site-package paths for a different Python major/minor version.
| [in] | paths | Candidate sys.path entries. |
Definition at line 58 of file core.py.
|
protected |
Remove a failed/partial import package tree from sys.modules.
| [in] | package_name | Top-level package name. |
Definition at line 78 of file core.py.
| picurv_cli.core.require_numpy | ( | ) |
Import NumPy only for commands that need numeric reductions.
Definition at line 89 of file core.py.
| picurv_cli.core.optional_matplotlib_pyplot | ( | ) |
Import matplotlib.pyplot lazily for study plot generation.
Definition at line 119 of file core.py.
| int picurv_cli.core.parse_slurm_time_limit_to_seconds | ( | str | time_text | ) |
Parse a Slurm time-limit string into total seconds.
| [in] | time_text | Argument passed to parse_slurm_time_limit_to_seconds(). |
parse_slurm_time_limit_to_seconds(). Definition at line 214 of file core.py.
| "dict | None" picurv_cli.core.resolve_walltime_guard_policy | ( | "dict | None" | cluster_cfg | ) |
Resolve the effective Slurm walltime-guard policy for generated solver jobs.
| [in] | cluster_cfg | Argument passed to resolve_walltime_guard_policy(). |
resolve_walltime_guard_policy(). Definition at line 271 of file core.py.
| dict picurv_cli.core.build_walltime_guard_exports | ( | "dict | None" | cluster_cfg | ) |
Build shell-evaluated environment exports for the runtime walltime guard.
| [in] | cluster_cfg | Argument passed to build_walltime_guard_exports(). |
build_walltime_guard_exports(). Definition at line 301 of file core.py.
| str picurv_cli.core.resolve_runtime_executable | ( | str | executable_name | ) |
Resolve solver/post executable path, preferring local sibling binaries.
| [in] | executable_name | Argument passed to resolve_runtime_executable(). |
resolve_runtime_executable(). Definition at line 316 of file core.py.
|
protected |
Normalize error fields into a single-line string.
| [in] | value | Argument passed to _sanitize_error_field(). |
_sanitize_error_field(). Definition at line 351 of file core.py.
| picurv_cli.core.emit_structured_error | ( | str | code, |
| str | key = "-", |
||
| str | file_path = "-", |
||
| str | message = "", |
||
| str | hint = None, |
||
stream = None |
|||
| ) |
Emit one standardized error line for tooling and users.
| [in] | code | Argument passed to emit_structured_error(). |
| [in] | key | Argument passed to emit_structured_error(). |
| [in] | file_path | Argument passed to emit_structured_error(). |
| [in] | message | Argument passed to emit_structured_error(). |
| [in] | hint | Argument passed to emit_structured_error(). |
| [in] | stream | Argument passed to emit_structured_error(). |
Definition at line 365 of file core.py.
| picurv_cli.core.fail_cli_usage | ( | str | message, |
| str | hint = None |
||
| ) |
Emit a structured CLI usage error and exit with code 2.
| [in] | message | Argument passed to fail_cli_usage(). |
| [in] | hint | Argument passed to fail_cli_usage(). |
Definition at line 389 of file core.py.
|
protected |
Split '<file>: <message>' style validation strings when possible.
| [in] | raw_error | Argument passed to _split_error_file_and_message(). |
_split_error_file_and_message(). Definition at line 405 of file core.py.
|
protected |
Best-effort key-path extraction from free-form validation messages.
| [in] | message | Argument passed to _extract_key_path(). |
_extract_key_path(). Definition at line 423 of file core.py.
|
protected |
Map existing validation/error messages to the standardized code set.
| [in] | message | Argument passed to _classify_error_code(). |
_classify_error_code(). Definition at line 444 of file core.py.
| dict picurv_cli.core.read_yaml_file | ( | str | filepath | ) |
Safely reads a YAML file and returns its content.
| [in] | filepath | Path to the YAML file. |
| SystemExit | if the file is not found or cannot be parsed. |
Definition at line 483 of file core.py.
| picurv_cli.core.write_yaml_file | ( | str | filepath, |
| dict | data | ||
| ) |
Write YAML with stable ordering for generated study artifacts.
| [in] | filepath | Argument passed to write_yaml_file(). |
| [in] | data | Argument passed to write_yaml_file(). |
Definition at line 511 of file core.py.
| picurv_cli.core.write_json_file | ( | str | filepath, |
| dict | payload | ||
| ) |
Write JSON metadata/manifests with a stable, readable format.
| [in] | filepath | Argument passed to write_json_file(). |
| [in] | payload | Argument passed to write_json_file(). |
Definition at line 521 of file core.py.
| str picurv_cli.core.write_runtime_execution_file | ( | str | filepath, |
| str | template_source_path = None |
||
| ) |
Write a default runtime execution config, copying a source template when available.
| [in] | filepath | Argument passed to write_runtime_execution_file(). |
| [in] | template_source_path | Argument passed to write_runtime_execution_file(). |
write_runtime_execution_file(). Definition at line 533 of file core.py.
|
protected |
Return True when a launcher arg token contains embedded whitespace and should be split.
| [in] | token | Argument passed to _launcher_arg_contains_whitespace(). |
_launcher_arg_contains_whitespace(). Definition at line 551 of file core.py.
| "str | None" picurv_cli.core.resolve_runtime_execution_seed_source | ( | str | source_project_root | ) |
Prefer repo-local ignored runtime config, then tracked example, then built-in defaults.
| [in] | source_project_root | Argument passed to resolve_runtime_execution_seed_source(). |
resolve_runtime_execution_seed_source(). Definition at line 560 of file core.py.
| dict picurv_cli.core.ensure_case_runtime_execution_config | ( | str | case_dir, |
| str | source_project_root, | ||
| bool | overwrite = False |
||
| ) |
Create case-local runtime execution config if missing, seeded from repo-local config when available.
| [in] | case_dir | Argument passed to ensure_case_runtime_execution_config(). |
| [in] | source_project_root | Argument passed to ensure_case_runtime_execution_config(). |
| [in] | overwrite | Argument passed to ensure_case_runtime_execution_config(). |
ensure_case_runtime_execution_config(). Definition at line 582 of file core.py.
| bool picurv_cli.core.is_project_root | ( | str | candidate | ) |
Return True when a directory looks like the PICurv source repository root.
| [in] | candidate | Argument passed to is_project_root(). |
is_project_root(). Definition at line 608 of file core.py.
|
protected |
Yield a path and all of its parents up to filesystem root.
| [in] | start_path | Argument passed to _iter_parent_dirs(). |
Definition at line 625 of file core.py.
| picurv_cli.core.find_project_root_upwards | ( | str | start_path | ) |
Search upward from an anchor and return the first matching project root.
| [in] | start_path | Argument passed to find_project_root_upwards(). |
find_project_root_upwards(). Definition at line 641 of file core.py.
| picurv_cli.core.discover_local_project_root | ( | * | extra_anchors | ) |
Best-effort source repo discovery from runtime anchors.
| [in] | extra_anchors | Argument passed to discover_local_project_root(). |
discover_local_project_root(). Definition at line 655 of file core.py.
| picurv_cli.core.find_case_origin_metadata_file | ( | str | case_dir_hint = None | ) |
Find the nearest case-origin metadata file from known runtime anchors.
| [in] | case_dir_hint | Argument passed to find_case_origin_metadata_file(). |
find_case_origin_metadata_file(). Definition at line 676 of file core.py.
| picurv_cli.core.load_case_origin_metadata | ( | str | case_dir_hint = None | ) |
Load case-origin metadata if present, returning (case_dir, metadata_path, payload).
| [in] | case_dir_hint | Argument passed to load_case_origin_metadata(). |
load_case_origin_metadata(). Definition at line 698 of file core.py.
| picurv_cli.core.find_runtime_execution_config_file | ( | * | anchors | ) |
Find the nearest optional execution config from runtime/case anchors.
| [in] | anchors | Argument passed to find_runtime_execution_config_file(). |
find_runtime_execution_config_file(). Definition at line 717 of file core.py.
|
protected |
Validate one execution override section while preserving missing-vs-empty semantics.
| [in] | payload | Argument passed to _normalize_execution_override_section(). |
| [in] | section_name | Argument passed to _normalize_execution_override_section(). |
| [in] | config_path | Argument passed to _normalize_execution_override_section(). |
| [in] | config_label | Argument passed to _normalize_execution_override_section(). |
_normalize_execution_override_section(). Definition at line 749 of file core.py.
| picurv_cli.core.load_runtime_execution_config | ( | str | config_search_anchor = None, |
extra_search_anchors = None |
|||
| ) |
Load optional shared execution launcher config from the nearest runtime config file.
| [in] | config_search_anchor | Argument passed to load_runtime_execution_config(). |
| [in] | extra_search_anchors | Argument passed to load_runtime_execution_config(). |
load_runtime_execution_config(). Definition at line 794 of file core.py.
| dict picurv_cli.core.merge_execution_overrides | ( | "dict | None" | base, |
| "dict | None" | override | ||
| ) |
Merge execution overrides, letting explicit override values win key-by-key.
| [in] | base | Argument passed to merge_execution_overrides(). |
| [in] | override | Argument passed to merge_execution_overrides(). |
merge_execution_overrides(). Definition at line 842 of file core.py.
| dict picurv_cli.core.resolve_runtime_execution_context | ( | dict | runtime_execution_cfg, |
| str | context | ||
| ) |
Resolve default plus context-specific execution overrides.
| [in] | runtime_execution_cfg | Argument passed to resolve_runtime_execution_context(). |
| [in] | context | Argument passed to resolve_runtime_execution_context(). |
resolve_runtime_execution_context(). Definition at line 866 of file core.py.
| str picurv_cli.core.get_git_commit | ( | str | repo_root = None | ) |
Best-effort git commit lookup for run/study manifests and case metadata.
| [in] | repo_root | Argument passed to get_git_commit(). |
get_git_commit(). Definition at line 881 of file core.py.
| picurv_cli.core.write_case_origin_metadata | ( | str | case_dir, |
| str | source_project_root, | ||
| str | template_name = None, |
||
| dict | existing = None, |
||
template_managed_files = None |
|||
| ) |
Create or refresh case-origin metadata for repo-aware case maintenance commands.
| [in] | case_dir | Argument passed to write_case_origin_metadata(). |
| [in] | source_project_root | Argument passed to write_case_origin_metadata(). |
| [in] | template_name | Argument passed to write_case_origin_metadata(). |
| [in] | existing | Argument passed to write_case_origin_metadata(). |
| [in] | template_managed_files | Argument passed to write_case_origin_metadata(). |
write_case_origin_metadata(). Definition at line 903 of file core.py.
| bool picurv_cli.core.make_args_include_explicit_goal | ( | "list[str]" | make_args | ) |
Return True when make args contain an explicit target rather than only options/assignments.
| [in] | make_args | Argument passed to make_args_include_explicit_goal(). |
make_args_include_explicit_goal(). Definition at line 928 of file core.py.
| picurv_cli.core.resolve_case_origin_context | ( | str | case_dir_hint = None, |
| str | source_root_override = None, |
||
| str | template_name_override = None |
||
| ) |
Resolve case directory, source repo root, and optional template metadata.
| [in] | case_dir_hint | Argument passed to resolve_case_origin_context(). |
| [in] | source_root_override | Argument passed to resolve_case_origin_context(). |
| [in] | template_name_override | Argument passed to resolve_case_origin_context(). |
resolve_case_origin_context(). Definition at line 961 of file core.py.
| picurv_cli.core.require_project_root | ( | str | candidate, |
| str | purpose | ||
| ) |
Validate that a source repo root was resolved and is structurally valid.
| [in] | candidate | Argument passed to require_project_root(). |
| [in] | purpose | Argument passed to require_project_root(). |
require_project_root(). Definition at line 997 of file core.py.
| picurv_cli.core.require_existing_case_dir | ( | str | case_dir, |
| str | purpose, | ||
| str | source_project_root = None |
||
| ) |
Validate that a target case directory exists and is not the source repo root.
| [in] | case_dir | Argument passed to require_existing_case_dir(). |
| [in] | purpose | Argument passed to require_existing_case_dir(). |
| [in] | source_project_root | Argument passed to require_existing_case_dir(). |
require_existing_case_dir(). Definition at line 1017 of file core.py.
| picurv_cli.core.resolve_template_directory | ( | str | source_project_root, |
| str | template_name | ||
| ) |
Resolve an example template directory inside the source repository.
| [in] | source_project_root | Argument passed to resolve_template_directory(). |
| [in] | template_name | Argument passed to resolve_template_directory(). |
resolve_template_directory(). Definition at line 1037 of file core.py.
| picurv_cli.core.list_template_relative_files | ( | str | template_dir, |
excluded_rel_paths = None |
|||
| ) |
List all files in a template directory as case-relative paths.
| [in] | template_dir | Argument passed to list_template_relative_files(). |
| [in] | excluded_rel_paths | Argument passed to list_template_relative_files(). |
list_template_relative_files(). Definition at line 1054 of file core.py.
| picurv_cli.core.list_source_binaries | ( | str | source_project_root | ) |
List binary artifacts currently available in the source repo bin directory.
| [in] | source_project_root | Argument passed to list_source_binaries(). |
list_source_binaries(). Definition at line 1076 of file core.py.
| picurv_cli.core.sync_case_binaries | ( | str | case_dir, |
| str | source_project_root | ||
| ) |
Copy current source-repo binaries into a case directory for version-pinning.
| [in] | case_dir | Argument passed to sync_case_binaries(). |
| [in] | source_project_root | Argument passed to sync_case_binaries(). |
sync_case_binaries(). Definition at line 1094 of file core.py.
| picurv_cli.core.sync_case_template_files | ( | str | case_dir, |
| str | template_dir, | ||
| bool | overwrite = False, |
||
| bool | prune = False, |
||
managed_rel_paths = None |
|||
| ) |
Sync template files into a case directory, preserving modified files unless overwrite is requested.
| [in] | case_dir | Argument passed to sync_case_template_files(). |
| [in] | template_dir | Argument passed to sync_case_template_files(). |
| [in] | overwrite | Argument passed to sync_case_template_files(). |
| [in] | prune | Argument passed to sync_case_template_files(). |
| [in] | managed_rel_paths | Argument passed to sync_case_template_files(). |
sync_case_template_files(). Definition at line 1113 of file core.py.
| picurv_cli.core.compute_case_source_status | ( | str | case_dir, |
| str | source_project_root, | ||
| str | template_name = None, |
||
| dict | metadata = None |
||
| ) |
Compute source/case drift across commits, binaries, and template-managed files.
| [in] | case_dir | Argument passed to compute_case_source_status(). |
| [in] | source_project_root | Argument passed to compute_case_source_status(). |
| [in] | template_name | Argument passed to compute_case_source_status(). |
| [in] | metadata | Argument passed to compute_case_source_status(). |
compute_case_source_status(). Definition at line 1183 of file core.py.
| picurv_cli.core.print_case_source_status | ( | dict | status | ) |
Render human-readable source/case drift details.
| [in] | status | Argument passed to print_case_source_status(). |
Definition at line 1283 of file core.py.
| picurv_cli.core.status_source_command | ( | args | ) |
Report source/case drift for an initialized case directory.
| [in] | args | Command-line style argument list supplied to the function. |
Definition at line 1327 of file core.py.
| str picurv_cli.core.resolve_path | ( | str | anchor_file, |
| str | candidate | ||
| ) |
Resolve a potentially relative path against a source YAML file path.
| [in] | anchor_file | Argument passed to resolve_path(). |
| [in] | candidate | Argument passed to resolve_path(). |
resolve_path(). Definition at line 1355 of file core.py.
|
protected |
Return the first defined value from a mapping across alias keys.
| [in] | mapping | Argument passed to _mapping_value_with_aliases(). |
| [in] | default | Argument passed to _mapping_value_with_aliases(). |
| [in] | keys | Argument passed to _mapping_value_with_aliases(). |
_mapping_value_with_aliases(). Definition at line 1386 of file core.py.
| picurv_cli.core.get_post_run_control_value | ( | dict | post_cfg, |
| str | canonical_key, | ||
default = None |
|||
| ) |
Resolve post run_control values with backwards-compatible legacy aliases.
| [in] | post_cfg | Argument passed to get_post_run_control_value(). |
| [in] | canonical_key | Argument passed to get_post_run_control_value(). |
| [in] | default | Argument passed to get_post_run_control_value(). |
get_post_run_control_value(). Definition at line 1402 of file core.py.
| None picurv_cli.core.warn_on_grid_generator_hyphen_keys | ( | dict | generator, |
| str | case_path, | ||
| list | warnings | ||
| ) |
Warn when grid.generator uses unsupported hyphenated wrapper keys.
| [in] | generator | grid.generator mapping from case.yml. |
| [in] | case_path | Case file path for diagnostics. |
| [in,out] | warnings | Warning list to append to. |
Definition at line 1415 of file core.py.
| picurv_cli.core.get_post_source_data | ( | dict | post_cfg | ) |
Return source_data as a mapping when valid, else an empty mapping.
| [in] | post_cfg | Argument passed to get_post_source_data(). |
get_post_source_data(). Definition at line 1431 of file core.py.
| str picurv_cli.core.get_post_source_directory_template | ( | dict | post_cfg, |
| str | default = "<solver_output_dir>" |
||
| ) |
Resolve the source directory template from source_data with a safe default.
| [in] | post_cfg | Argument passed to get_post_source_directory_template(). |
| [in] | default | Argument passed to get_post_source_directory_template(). |
get_post_source_directory_template(). Definition at line 1443 of file core.py.
| picurv_cli.core.get_post_input_extensions | ( | dict | post_cfg | ) |
Return post input_extensions, preferring io.
| [in] | post_cfg | Argument passed to get_post_input_extensions(). |
get_post_input_extensions(). Definition at line 1453 of file core.py.
| picurv_cli.core.get_post_statistics_task_tokens | ( | dict | post_cfg | ) |
Return normalized statistics pipeline tokens that will be written into post.run.
| [in] | post_cfg | Argument passed to get_post_statistics_task_tokens(). |
get_post_statistics_task_tokens(). Definition at line 1471 of file core.py.
| str picurv_cli.core.get_monitor_output_directory | ( | dict | monitor_cfg, |
| str | default = "output" |
||
| ) |
Resolve the solver output root from monitor.yml, preserving the default layout.
| [in] | monitor_cfg | Argument passed to get_monitor_output_directory(). |
| [in] | default | Argument passed to get_monitor_output_directory(). |
get_monitor_output_directory(). Definition at line 1499 of file core.py.
| str picurv_cli.core.get_post_statistics_output_prefix | ( | dict | post_cfg, |
| str | default = "Stats" |
||
| ) |
Resolve the statistics CSV prefix, preserving legacy top-level override support.
| [in] | post_cfg | Argument passed to get_post_statistics_output_prefix(). |
| [in] | default | Argument passed to get_post_statistics_output_prefix(). |
get_post_statistics_output_prefix(). Definition at line 1517 of file core.py.
| str picurv_cli.core.resolve_post_statistics_output_prefix | ( | dict | post_cfg, |
monitor_cfg = None, |
|||
| str | default = "Stats" |
||
| ) |
Resolve the runtime statistics prefix, routing bare basenames under the monitor output root.
| [in] | post_cfg | Argument passed to resolve_post_statistics_output_prefix(). |
| [in] | monitor_cfg | Optional monitor configuration used to anchor the default statistics home. |
| [in] | default | Argument passed to resolve_post_statistics_output_prefix(). |
resolve_post_statistics_output_prefix(). Definition at line 1537 of file core.py.
| picurv_cli.core.get_post_statistics_output_artifacts | ( | dict | post_cfg, |
| str | run_dir, | ||
monitor_cfg = None |
|||
| ) |
Predict statistics CSV output paths relative to the postprocessor runtime cwd.
| [in] | post_cfg | Argument passed to get_post_statistics_output_artifacts(). |
| [in] | run_dir | Argument passed to get_post_statistics_output_artifacts(). |
| [in] | monitor_cfg | Optional monitor configuration used to anchor the default statistics home. |
get_post_statistics_output_artifacts(). Definition at line 1556 of file core.py.
| dict picurv_cli.core.build_post_recipe_config | ( | dict | post_cfg, |
monitor_cfg = None |
|||
| ) |
Build the flat key=value mapping consumed by the C post-processor.
| [in] | post_cfg | Argument passed to build_post_recipe_config(). |
| [in] | monitor_cfg | Optional parsed monitor YAML configuration dictionary. |
build_post_recipe_config(). Definition at line 1582 of file core.py.
| dict picurv_cli.core.normalize_post_recipe_signature | ( | dict | recipe_cfg | ) |
Normalize post recipe settings into a stable signature mapping.
| [in] | recipe_cfg | Argument passed to normalize_post_recipe_signature(). |
normalize_post_recipe_signature(). Definition at line 1668 of file core.py.
| "tuple[dict, str]" picurv_cli.core.compute_post_recipe_fingerprint | ( | dict | recipe_cfg | ) |
Return normalized recipe signature plus SHA-256 fingerprint.
| [in] | recipe_cfg | Argument passed to compute_post_recipe_fingerprint(). |
compute_post_recipe_fingerprint(). Definition at line 1689 of file core.py.
| picurv_cli.core.parse_post_recipe_file | ( | str | post_recipe_path | ) |
Parse an existing generated post.run file into a key/value mapping.
| [in] | post_recipe_path | Argument passed to parse_post_recipe_file(). |
parse_post_recipe_file(). Definition at line 1700 of file core.py.
| str picurv_cli.core.get_post_resume_state_path | ( | str | run_dir | ) |
Return the JSON resume metadata path for a run directory.
| [in] | run_dir | Argument passed to get_post_resume_state_path(). |
get_post_resume_state_path(). Definition at line 1719 of file core.py.
| dict picurv_cli.core.get_post_lock_paths | ( | str | run_dir | ) |
Return lock-wrapper related paths for a run directory.
| [in] | run_dir | Argument passed to get_post_lock_paths(). |
get_post_lock_paths(). Definition at line 1728 of file core.py.
|
protected |
Resolve the absolute post output directory for the current recipe.
| [in] | run_dir | Argument passed to _post_output_directory_abs(). |
| [in] | post_cfg | Argument passed to _post_output_directory_abs(). |
_post_output_directory_abs(). Definition at line 1742 of file core.py.
|
protected |
Return whether the current post recipe expects Eulerian VTK output artifacts.
| [in] | post_cfg | Argument passed to _post_requests_eulerian_output(). |
_post_requests_eulerian_output(). Definition at line 1753 of file core.py.
|
protected |
Return whether the current post recipe expects particle VTP output artifacts.
| [in] | post_cfg | Argument passed to _post_requests_particle_output(). |
_post_requests_particle_output(). Definition at line 1763 of file core.py.
|
protected |
Return whether the current post recipe expects statistics CSV artifacts.
| [in] | post_cfg | Argument passed to _post_requests_statistics(). |
_post_requests_statistics(). Definition at line 1773 of file core.py.
|
protected |
Return whether the current post recipe requires particle source files to be present.
| [in] | post_cfg | Argument passed to _post_needs_particle_source(). |
_post_needs_particle_source(). Definition at line 1782 of file core.py.
|
protected |
Yield configured post-processing steps inclusively.
| [in] | start_step | Argument passed to _iter_post_steps(). |
| [in] | end_step | Argument passed to _iter_post_steps(). |
| [in] | step_interval | Argument passed to _iter_post_steps(). |
Definition at line 1792 of file core.py.
| "tuple[int, int, int]" picurv_cli.core.resolve_post_requested_window | ( | dict | post_cfg, |
| dict | case_cfg = None |
||
| ) |
Resolve post requested start/end/interval, expanding end=-1 via case.yml when available.
| [in] | post_cfg | Argument passed to resolve_post_requested_window(). |
| [in] | case_cfg | Optional case configuration for end-step expansion. |
resolve_post_requested_window(). Definition at line 1807 of file core.py.
| dict picurv_cli.core.prepare_effective_post_config | ( | dict | post_cfg, |
| str | resolved_source_dir, | ||
| int | start_step = None, |
||
| int | end_step = None |
||
| ) |
Return a copy of post_cfg with resolved source dir and optional effective bounds.
| [in] | post_cfg | Argument passed to prepare_effective_post_config(). |
| [in] | resolved_source_dir | Argument passed to prepare_effective_post_config(). |
| [in] | start_step | Argument passed to prepare_effective_post_config(). |
| [in] | end_step | Argument passed to prepare_effective_post_config(). |
prepare_effective_post_config(). Definition at line 1825 of file core.py.
|
protected |
Scan VTK output files matching '<prefix>_<step>.
<extension>'.
| [in] | prefix_path | Argument passed to _scan_post_vtk_steps(). |
| [in] | extension | Argument passed to _scan_post_vtk_steps(). |
_scan_post_vtk_steps(). Definition at line 1846 of file core.py.
|
protected |
Scan step ids from the first CSV column of a statistics artifact.
| [in] | csv_path | Argument passed to _scan_post_statistics_csv_steps(). |
_scan_post_statistics_csv_steps(). Definition at line 1866 of file core.py.
| "list[set[int]]" picurv_cli.core.collect_post_completion_families | ( | str | run_dir, |
| dict | post_cfg, | ||
monitor_cfg = None |
|||
| ) |
Collect per-family completed-step sets for the current post recipe.
| [in] | run_dir | Argument passed to collect_post_completion_families(). |
| [in] | post_cfg | Argument passed to collect_post_completion_families(). |
| [in] | monitor_cfg | Optional parsed monitor YAML configuration dictionary. |
collect_post_completion_families(). Definition at line 1889 of file core.py.
| dict picurv_cli.core.detect_post_completed_frontier | ( | str | run_dir, |
| dict | post_cfg, | ||
| monitor_cfg, | |||
| int | start_step, | ||
| int | end_step, | ||
| int | step_interval | ||
| ) |
Detect the highest contiguous fully completed post step for the current recipe.
| [in] | run_dir | Argument passed to detect_post_completed_frontier(). |
| [in] | post_cfg | Argument passed to detect_post_completed_frontier(). |
| [in] | monitor_cfg | Argument passed to detect_post_completed_frontier(). |
| [in] | start_step | Argument passed to detect_post_completed_frontier(). |
| [in] | end_step | Argument passed to detect_post_completed_frontier(). |
| [in] | step_interval | Argument passed to detect_post_completed_frontier(). |
detect_post_completed_frontier(). Definition at line 1915 of file core.py.
|
protected |
Return the complete source step nearest to a target step.
| [in] | steps | Candidate step numbers. |
| [in] | target | Target step number. |
Definition at line 1940 of file core.py.
|
protected |
Format an optional step number for user-facing diagnostics.
| [in] | step | Step number or None. |
Definition at line 1952 of file core.py.
|
protected |
Scan source artifacts and return steps with every file required by the recipe.
| [in] | source_dir | Source output root directory. |
| [in] | monitor_cfg | Parsed monitor configuration. |
| [in] | post_cfg | Parsed post-processing configuration. |
Definition at line 1961 of file core.py.
|
protected |
Build required source file paths for a single post-processing step.
| [in] | step | Requested step number. |
| [in] | source_scan | Metadata returned by _scan_complete_source_steps(). |
| [in] | post_cfg | Parsed post-processing configuration. |
Definition at line 2009 of file core.py.
| dict picurv_cli.core.detect_post_source_frontier | ( | str | source_dir, |
| dict | monitor_cfg, | ||
| dict | post_cfg, | ||
| int | start_step, | ||
| int | end_step, | ||
| int | step_interval | ||
| ) |
Detect the highest contiguous fully available source step for live post-processing.
| [in] | source_dir | Argument passed to detect_post_source_frontier(). |
| [in] | monitor_cfg | Argument passed to detect_post_source_frontier(). |
| [in] | post_cfg | Argument passed to detect_post_source_frontier(). |
| [in] | start_step | Argument passed to detect_post_source_frontier(). |
| [in] | end_step | Argument passed to detect_post_source_frontier(). |
| [in] | step_interval | Argument passed to detect_post_source_frontier(). |
detect_post_source_frontier(). Definition at line 2026 of file core.py.
| picurv_cli.core.persist_post_resume_state | ( | str | run_dir, |
| dict | plan, | ||
last_successful_requested_end_step = None |
|||
| ) |
Persist post resume lineage metadata for future –continue runs.
| [in] | run_dir | Argument passed to persist_post_resume_state(). |
| [in] | plan | Argument passed to persist_post_resume_state(). |
| [in] | last_successful_requested_end_step | Argument passed to persist_post_resume_state(). |
persist_post_resume_state(). Definition at line 2070 of file core.py.
|
protected |
Return the Python wrapper used to hold an exclusive post-stage lock.
_build_post_lock_wrapper_source(). Definition at line 2096 of file core.py.
| str picurv_cli.core.ensure_post_lock_wrapper | ( | str | run_dir | ) |
Ensure the lock wrapper exists for a run directory and return its path.
| [in] | run_dir | Argument passed to ensure_post_lock_wrapper(). |
ensure_post_lock_wrapper(). Definition at line 2175 of file core.py.
| "tuple[list, dict]" picurv_cli.core.build_post_locked_command | ( | str | run_dir, |
| str | recipe_fingerprint, | ||
| list | wrapped_command, | ||
| bool | create_wrapper = True |
||
| ) |
Wrap a postprocessor command behind the run-dir-scoped lock wrapper.
| [in] | run_dir | Argument passed to build_post_locked_command(). |
| [in] | recipe_fingerprint | Argument passed to build_post_locked_command(). |
| [in] | wrapped_command | Argument passed to build_post_locked_command(). |
| [in] | create_wrapper | Argument passed to build_post_locked_command(). |
build_post_locked_command(). Definition at line 2196 of file core.py.
| dict picurv_cli.core.build_post_execution_plan | ( | str | run_dir, |
| str | run_id, | ||
| dict | case_cfg, | ||
| dict | monitor_cfg, | ||
| dict | post_cfg, | ||
| bool | continue_requested = False, |
||
| bool | allow_source_frontier_scan = True |
||
| ) |
Resolve post resume/source-availability behavior into one execution plan.
| [in] | run_dir | Argument passed to build_post_execution_plan(). |
| [in] | run_id | Argument passed to build_post_execution_plan(). |
| [in] | case_cfg | Argument passed to build_post_execution_plan(). |
| [in] | monitor_cfg | Argument passed to build_post_execution_plan(). |
| [in] | post_cfg | Argument passed to build_post_execution_plan(). |
| [in] | continue_requested | Argument passed to build_post_execution_plan(). |
| [in] | allow_source_frontier_scan | Argument passed to build_post_execution_plan(). |
build_post_execution_plan(). Definition at line 2218 of file core.py.
| bool picurv_cli.core.needs_restart_source | ( | dict | case_cfg, |
| dict | solver_cfg | ||
| ) |
Return True when the solver requires restart data from disk.
Correctly identifies that analytical + init + start_step > 0 does NOT need a restart source (C code never reads from restart_dir in that case).
| [in] | case_cfg | Parsed case YAML dictionary. |
| [in] | solver_cfg | Parsed solver YAML dictionary. |
Definition at line 2348 of file core.py.
| str picurv_cli.core.resolve_run_output_dir | ( | str | run_dir, |
| dict | monitor_cfg | ||
| ) |
Resolve the output data directory within a run directory.
| [in] | run_dir | Path to the run directory. |
| [in] | monitor_cfg | Parsed monitor YAML dictionary. |
Definition at line 2372 of file core.py.
| str picurv_cli.core.resolve_run_restart_dir | ( | str | run_dir, |
| dict | monitor_cfg | ||
| ) |
Resolve the restart staging directory within a run directory.
| [in] | run_dir | Path to the run directory. |
| [in] | monitor_cfg | Parsed monitor YAML dictionary. |
Definition at line 2384 of file core.py.
| picurv_cli.core.populate_restart_directory | ( | str | source_output, |
| str | target_restart, | ||
| int | start_step, | ||
| dict | monitor_cfg | ||
| ) |
Copy checkpoint files for a specific step from source output to target restart.
| [in] | source_output | Path to the source output directory containing checkpoint data. |
| [in] | target_restart | Path to the target restart directory to populate. |
| [in] | start_step | The step number whose checkpoint files should be copied. |
| [in] | monitor_cfg | Parsed monitor YAML dictionary (for subdirectory names). |
Definition at line 2396 of file core.py.
| picurv_cli.core.detect_last_checkpoint_step | ( | str | output_dir, |
| str | euler_subdir = "eulerian", |
||
| str | particle_subdir = "particles" |
||
| ) |
Scan output directory for the highest step number available.
Checks eulerian files first (ufield), then falls back to particle files (position) for analytical-mode cases that have no eulerian output.
| [in] | output_dir | Path to the output directory. |
| [in] | euler_subdir | Name of the eulerian subdirectory. |
| [in] | particle_subdir | Name of the particle subdirectory. |
Definition at line 2428 of file core.py.
| dict picurv_cli.core.detect_case_completion_status | ( | str | run_dir, |
| dict | monitor_cfg, | ||
| int | target_final_step | ||
| ) |
Determine whether a study case is complete, partially complete, or empty.
| [in] | run_dir | Path to the case run directory. |
| [in] | monitor_cfg | Parsed monitor YAML dictionary. |
| [in] | target_final_step | The step number the case should reach for completion. |
Definition at line 2462 of file core.py.
| picurv_cli.core.validate_load_mode_step_range | ( | str | source_output, |
| int | start_step, | ||
| int | total_steps, | ||
| dict | monitor_cfg | ||
| ) |
Validate that all required eulerian step files exist for "load" mode.
Checks that ufield files exist for every step from start_step through start_step + total_steps (inclusive). Reports missing steps clearly.
| [in] | source_output | Path to the output directory containing eulerian data. |
| [in] | start_step | First step that will be loaded. |
| [in] | total_steps | Number of steps to run. |
| [in] | monitor_cfg | Parsed monitor YAML dictionary (for subdirectory names). |
Definition at line 2485 of file core.py.
| picurv_cli.core.validate_particle_checkpoint | ( | str | source_dir, |
| int | start_step, | ||
| dict | monitor_cfg | ||
| ) |
Validate that particle checkpoint files exist for the given step.
Checks that at least a position file exists at the expected step in the particle subdirectory.
| [in] | source_dir | Path to the directory containing the particle subdirectory. |
| [in] | start_step | The step number whose particle checkpoint is expected. |
| [in] | monitor_cfg | Parsed monitor YAML dictionary (for subdirectory names). |
Definition at line 2513 of file core.py.
| dict picurv_cli.core.read_monitor_from_run | ( | str | run_dir | ) |
Read the monitor.yml from a run directory's config/ subdirectory.
| [in] | run_dir | Path to the run directory. |
Definition at line 2532 of file core.py.
| picurv_cli.core.resolve_restart_source | ( | args, | |
| dict | case_cfg, | ||
| dict | solver_cfg, | ||
| dict | monitor_cfg, | ||
| str | run_dir | ||
| ) |
Resolve the restart source directory based on –restart-from or –continue CLI flags.
Implements the full restart resolution logic including smart resolution for –continue (checks restart/ first for user-curated data, falls back to output/) and direct reference for eulerian "load" mode.
| [in] | args | Parsed CLI arguments (must have restart_from, continue_run, run_dir attrs). |
| [in] | case_cfg | Parsed case YAML dictionary. |
| [in] | solver_cfg | Parsed solver YAML dictionary. |
| [in] | monitor_cfg | Parsed monitor YAML dictionary. |
| [in] | run_dir | Path to the current run directory. |
Definition at line 2544 of file core.py.
| picurv_cli.core.absolutize_case_external_paths | ( | dict | case_cfg, |
| str | case_anchor_path | ||
| ) |
Convert external grid/generator paths in case config to absolute paths.
| [in] | case_cfg | Argument passed to absolutize_case_external_paths(). |
| [in] | case_anchor_path | Argument passed to absolutize_case_external_paths(). |
Definition at line 2714 of file core.py.
| picurv_cli.core.prepare_case_for_continuation | ( | str | run_dir, |
| str | case_id, | ||
| int | last_step, | ||
| int | target_final_step, | ||
| dict | cluster_cfg | ||
| ) |
Set up a partially-completed study case for continuation in-place.
Updates the case config with new start_step/total_steps, sets particle restart_mode to 'load' if checkpoint exists, populates the restart directory, and regenerates the solver control file with continue_mode. Delegates all restart resolution to resolve_restart_source().
| [in] | run_dir | Path to the case run directory. |
| [in] | case_id | The case identifier (e.g. 'case_0002'). |
| [in] | last_step | The last checkpoint step found in the output directory. |
| [in] | target_final_step | The step number the case should reach for completion. |
| [in] | cluster_cfg | Parsed cluster YAML dictionary (for num_procs, walltime guard). |
Definition at line 2779 of file core.py.
| bool picurv_cli.core.is_valid_email | ( | str | ) |
Lightweight email validation for scheduler notifications.
| [in] | Argument passed to is_valid_email(). |
is_valid_email(). Definition at line 2843 of file core.py.
| str picurv_cli.core.normalize_statistics_task | ( | str | task_name | ) |
Normalizes user-facing statistics task names to C pipeline keywords.
| [in] | task_name | Task name from YAML. |
| ValueError | if task is unsupported. |
Definition at line 2854 of file core.py.
|
protected |
Yield (lineno, stripped_line) for non-empty, non-comment lines.
| [in] | file_obj | Argument passed to _iter_nonempty_noncomment_lines(). |
Definition at line 2869 of file core.py.
| dict picurv_cli.core.validate_and_nondimensionalize_picgrid | ( | str | source_grid, |
| str | dest_grid, | ||
| float | L_ref, | ||
| int | expected_nblk = None |
||
| ) |
Validates PICGRID payload and writes a non-dimensionalized copy.
Requires canonical PICGRID input with leading "PICGRID" token. Output is always written in canonical PICGRID format with header and per-block dims.
| [in] | source_grid | Input grid file path. |
| [in] | dest_grid | Output grid file path. |
| [in] | L_ref | Reference length for non-dimensionalization. |
| [in] | expected_nblk | Optional expected block count. |
| ValueError | on malformed grid. |
Definition at line 2880 of file core.py.
| list picurv_cli.core.read_picgrid_header_dimensions | ( | str | source_grid, |
| int | expected_nblk = None |
||
| ) |
Read only the canonical PICGRID header dimensions.
| [in] | source_grid | Input grid file path. |
| [in] | expected_nblk | Optional expected block count. |
| ValueError | on malformed header. |
Definition at line 2984 of file core.py.
| dict picurv_cli.core.validate_and_nondimensionalize_picslice | ( | str | source_slice, |
| str | dest_slice, | ||
| float | U_ref, | ||
| tuple | expected_dims = None |
||
| ) |
Validate a canonical PICSLICE payload and write a solver-scale copy.
| [in] | source_slice | Input PICSLICE path. |
| [in] | dest_slice | Output staged PICSLICE path. |
| [in] | U_ref | Reference velocity for non-dimensionalization. |
| [in] | expected_dims | Optional expected (n1, n2) slice dimensions. |
| ValueError | on malformed slice. |
Definition at line 3041 of file core.py.
|
protected |
Convert a BC face token into a filesystem-friendly artifact token.
| [in] | face | Canonical face token such as -Zeta. |
Definition at line 3139 of file core.py.
|
protected |
Resolve a run artifact path with run-dir-relative defaults.
| [in] | run_dir | Run/precompute directory root. |
| [in] | configured_path | Optional user-provided artifact path. |
| [in] | default_path | Default path relative to run_dir. |
| [in] | default_to_config_dir | If true, bare relative names are placed under config/. |
Definition at line 3147 of file core.py.
|
protected |
Resolve an optional generator script override or repository default.
| [in] | configured_script | Optional absolute or case-relative script path. |
| [in] | case_path | Current case.yml path used to anchor relative overrides. |
| [in] | default_name | Repository generator filename under GENERATORS_PATH. |
Definition at line 3167 of file core.py.
|
protected |
Validate square-duct Poiseuille generator parameters.
| [in] | params | Generator params mapping. |
| [in] | field_name | Human-readable YAML field name for diagnostics. |
Definition at line 3185 of file core.py.
|
protected |
Validate a prescribed_flow field_slice source block.
| [in] | source | Source mapping from case.yml. |
| [in] | field_name | Human-readable YAML path for diagnostics. |
Definition at line 3212 of file core.py.
|
protected |
Validate the field_slice slice selector.
| [in] | slice_cfg | Slice selector mapping. |
| [in] | field_name | Human-readable YAML path for diagnostics. |
Definition at line 3278 of file core.py.
| dict picurv_cli.core.generate_square_duct_poiseuille_picslice | ( | str | output_path, |
| tuple | dims, | ||
| dict | params, | ||
| str | target_grid = None, |
||
| int | target_block = 0, |
||
| str | target_face = None, |
||
| str | script = None, |
||
| str | case_path = None |
||
| ) |
Generate a dimensional canonical PICSLICE for square-duct Poiseuille flow.
| [in] | output_path | Path to write. |
| [in] | dims | PICSLICE dimensions in face storage order (n1, n2). |
| [in] | params | Normalized generator params. |
| [in] | target_grid | Optional canonical target PICGRID for grid-aware sampling. |
| [in] | target_block | Target block index when target_grid is provided. |
| [in] | target_face | Target inlet face when target_grid is provided. |
| [in] | script | Optional profile.gen-compatible script override. |
| [in] | case_path | Current case.yml path used to anchor relative script overrides. |
Definition at line 3344 of file core.py.
| dict picurv_cli.core.generate_field_slice_picslice | ( | str | output_path, |
| tuple | expected_dims, | ||
| dict | source, | ||
| str | target_grid, | ||
| str | target_face, | ||
| int | target_block, | ||
| str | case_path | ||
| ) |
Invoke profile.gen to extract a field_slice PICSLICE artifact.
| [in] | output_path | Path to write. |
| [in] | expected_dims | Expected PICSLICE dimensions. |
| [in] | source | Normalized field_slice source mapping. |
| [in] | target_grid | Target canonical PICGRID path. |
| [in] | target_face | Target inlet face token. |
| [in] | target_block | Target block index. |
| [in] | case_path | Path to current case.yml for relative source resolution. |
Definition at line 3397 of file core.py.
|
protected |
Resolve a path relative to the current case directory.
| [in] | path_value | Path from case.yml. |
| [in] | case_dir | Current case directory. |
Definition at line 3468 of file core.py.
|
protected |
Resolve field_slice dimensional velocity scale.
| [in] | source | Normalized field_slice source mapping. |
| [in] | case_dir | Current case directory. |
Definition at line 3481 of file core.py.
| str picurv_cli.core.resolve_target_grid_for_field_slice | ( | dict | case_cfg, |
| str | case_path, | ||
| str | run_dir | ||
| ) |
Resolve the target canonical PICGRID path needed for field_slice normals.
| [in] | case_cfg | Parsed current case config. |
| [in] | case_path | Current case.yml path. |
| [in] | run_dir | Current run/precompute directory. |
Definition at line 3503 of file core.py.
| str picurv_cli.core.resolve_target_grid_for_generated_profile | ( | dict | case_cfg, |
| str | case_path, | ||
| str | run_dir | ||
| ) |
Resolve an optional target canonical PICGRID for generated profile sampling.
| [in] | case_cfg | Parsed current case config. |
| [in] | case_path | Current case.yml path. |
| [in] | run_dir | Current run/precompute directory. |
Definition at line 3536 of file core.py.
| str picurv_cli.core.write_profile_info | ( | str | config_dir, |
| list | summaries | ||
| ) |
Write a profile.info summary for generated inlet profiles.
| [in] | config_dir | Run/precompute config directory. |
| [in] | summaries | Generated profile summaries. |
Definition at line 3549 of file core.py.
| str picurv_cli.core.run_grid_generator | ( | str | case_path, |
| str | run_dir, | ||
| dict | grid_cfg | ||
| ) |
Runs generators/grid.gen to produce a PICGRID file for this run.
| [in] | case_path | Path to case.yml (used for relative path resolution). |
| [in] | run_dir | Run directory path. |
| [in] | grid_cfg | The grid config section from case.yml. |
| ValueError | on invalid config or generator failure. |
Definition at line 3606 of file core.py.
| str picurv_cli.core.convert_legacy_grid_with_gridgen | ( | str | case_path, |
| str | run_dir, | ||
| dict | grid_cfg, | ||
| str | source_grid | ||
| ) |
Optionally convert a legacy file-grid payload to canonical PICGRID using grid.gen.
Activated only when grid.legacy_conversion.enabled is true in case.yml. The converted output remains dimensional; standard nondimensionalization still occurs via validate_and_nondimensionalize_picgrid().
| [in] | case_path | Path to case.yml (for relative path resolution). |
| [in] | run_dir | Current run directory. |
| [in] | grid_cfg | Grid section from case.yml. |
| [in] | source_grid | Absolute or relative path to the original grid file. |
| ValueError | on invalid converter settings or failed conversion. |
Definition at line 3686 of file core.py.
|
protected |
Validate the structured source block for prescribed_flow BCs.
| [in] | source | Source mapping from case.yml. |
| [in] | field_name | Human-readable YAML path for diagnostics. |
| ValueError | on invalid source contract. |
Definition at line 3857 of file core.py.
|
protected |
Return expected PICSLICE dimensions for a face and block node dimensions.
| [in] | face | Canonical BC face token. |
| [in] | block_dims | (IM, JM, KM) node counts. |
Definition at line 3912 of file core.py.
| list picurv_cli.core.resolve_grid_block_dimensions_for_profiles | ( | dict | case_cfg, |
| str | case_path, | ||
| str | run_dir = None |
||
| ) |
Resolve per-block node dimensions for prescribed inlet profile validation.
| [in] | case_cfg | Parsed case.yml configuration. |
| [in] | case_path | Path to case.yml for relative path resolution. |
| [in] | run_dir | Current run directory, used for optional generated grid outputs. |
| ValueError | when dimensions cannot be resolved. |
Definition at line 3932 of file core.py.
| list picurv_cli.core.materialize_generated_prescribed_flow_profiles | ( | str | run_dir, |
| dict | case_cfg, | ||
| str | case_path, | ||
| list | profile_grid_dims = None |
||
| ) |
Generate dimensional PICSLICE artifacts for generated/field_slice prescribed_flow sources.
| [in] | run_dir | Run/precompute directory root. |
| [in] | case_cfg | Parsed case.yml. |
| [in] | case_path | Path to case.yml for relative grid/source resolution. |
| [in] | profile_grid_dims | Optional pre-resolved block node dimensions. |
Definition at line 3997 of file core.py.
|
protected |
Convert a YAML scalar to float with a clear error message.
| [in] | value | Argument passed to _to_float(). |
| [in] | field_name | Argument passed to _to_float(). |
_to_float(). Definition at line 4080 of file core.py.
|
protected |
Convert a YAML scalar/string to bool with a clear error message.
| [in] | value | Argument passed to _to_bool(). |
| [in] | field_name | Argument passed to _to_bool(). |
_to_bool(). Definition at line 4092 of file core.py.
| picurv_cli.core.normalize_boundary_conditions_layout | ( | all_blocks_bcs, | |
| int | num_blocks | ||
| ) |
Normalize boundary_conditions to list-of-lists form and validate block count.
| [in] | all_blocks_bcs | Argument passed to normalize_boundary_conditions_layout(). |
| [in] | num_blocks | Argument passed to normalize_boundary_conditions_layout(). |
normalize_boundary_conditions_layout(). Definition at line 4109 of file core.py.
| picurv_cli.core.validate_and_prepare_boundary_conditions | ( | dict | case_cfg | ) |
Validate BC entries against currently supported C-side handlers/types and.
return normalized entries ready for bcs.run generation.
| [in] | case_cfg | Argument passed to validate_and_prepare_boundary_conditions(). |
validate_and_prepare_boundary_conditions(). Definition at line 4134 of file core.py.
|
protected |
Render an internal schema path tuple as a user-facing YAML path.
| [in] | path | Internal path tuple. |
Definition at line 4292 of file core.py.
|
protected |
Return allowed keys for a path, honoring '*' dynamic mapping entries.
| [in] | schema | Role schema mapping. |
| [in] | path | Internal path tuple. |
Definition at line 4301 of file core.py.
|
protected |
Build a concise typo or hierarchy hint for an unsupported YAML key.
| [in] | schema | Role schema mapping. |
| [in] | path | Current internal YAML path tuple. |
| [in] | key | Unsupported YAML key. |
| [in] | allowed | Allowed keys at the current path. |
Definition at line 4319 of file core.py.
|
protected |
Reject unsupported YAML keys before they can be silently ignored by staging.
| [in] | cfg | Parsed YAML node. |
| [in] | schema | Role schema mapping. |
| [in] | file_path | Source file path for diagnostics. |
| [in,out] | errors | Validation error accumulator. |
| [in] | path | Current internal YAML path tuple. |
Definition at line 4347 of file core.py.
| picurv_cli.core.validate_solver_configs | ( | dict | case_cfg, |
| dict | solver_cfg, | ||
| dict | monitor_cfg, | ||
| str | case_path, | ||
| str | solver_path, | ||
| str | monitor_path | ||
| ) |
Validates all solver input configs before any work is done.
Checks for required sections, required keys, and physical sanity. Exits with a clear error message on the first problem found.
| [in] | case_cfg | Parsed case YAML dictionary. |
| [in] | solver_cfg | Parsed solver YAML dictionary. |
| [in] | monitor_cfg | Parsed monitor YAML dictionary. |
| [in] | case_path | Path to case file (for error messages). |
| [in] | solver_path | Path to solver file (for error messages). |
| [in] | monitor_path | Path to monitor file (for error messages). |
| SystemExit | on validation failure. |
Definition at line 4576 of file core.py.
| picurv_cli.core.validate_post_config | ( | dict | post_cfg, |
| str | post_path | ||
| ) |
Validates the post-processing config before running the post-processor.
| [in] | post_cfg | Parsed post-processing YAML dictionary. |
| [in] | post_path | Path to post file (for error messages). |
| SystemExit | on validation failure. |
Definition at line 5313 of file core.py.
| picurv_cli.core.validate_cluster_config | ( | dict | cluster_cfg, |
| str | cluster_path | ||
| ) |
Validate Slurm scheduler configuration from cluster.yml.
| [in] | cluster_cfg | Argument passed to validate_cluster_config(). |
| [in] | cluster_path | Argument passed to validate_cluster_config(). |
Definition at line 5526 of file core.py.
| picurv_cli.core.validate_study_config | ( | dict | study_cfg, |
| str | study_path, | ||
| bool | skip_base_file_check = False |
||
| ) |
Validate sweep/study specification from study.yml.
| [in] | study_cfg | Argument passed to validate_study_config(). |
| [in] | study_path | Argument passed to validate_study_config(). |
| [in] | skip_base_file_check | When True, skip file-existence check for base_configs paths. |
Definition at line 5681 of file core.py.
|
protected |
Set nested dictionary value, creating intermediate maps when needed.
| [in] | container | Argument passed to _deep_set(). |
| [in] | dotted_path | Argument passed to _deep_set(). |
| [in] | value | Argument passed to _deep_set(). |
Definition at line 5803 of file core.py.
| list picurv_cli.core.expand_parameter_matrix | ( | dict | parameters | ) |
Expand study parameter lists into cartesian-product combinations.
| [in] | parameters | Argument passed to expand_parameter_matrix(). |
expand_parameter_matrix(). Definition at line 5818 of file core.py.
| list picurv_cli.core.expand_study_parameter_combinations | ( | dict | study_cfg | ) |
Expand either cartesian-study parameters or explicit parameter sets.
| [in] | study_cfg | Argument passed to expand_study_parameter_combinations(). |
expand_study_parameter_combinations(). Definition at line 5832 of file core.py.
| list picurv_cli.core.get_study_parameter_keys | ( | dict | study_cfg | ) |
Collect ordered parameter keys from either cross-product parameter expansions or explicit parameter sets.
| [in] | study_cfg | Argument passed to get_study_parameter_keys(). |
get_study_parameter_keys(). Definition at line 5844 of file core.py.
| int picurv_cli.core.get_cluster_total_tasks | ( | dict | cluster_cfg | ) |
Return cluster total tasks.
| [in] | cluster_cfg | Argument passed to get_cluster_total_tasks(). |
get_cluster_total_tasks(). Definition at line 5865 of file core.py.
| str picurv_cli.core.normalize_extension | ( | str | ext | ) |
Normalize extension.
| [in] | ext | Argument passed to normalize_extension(). |
normalize_extension(). Definition at line 5874 of file core.py.
| picurv_cli.core.render_slurm_script | ( | str | script_path, |
| str | job_name, | ||
| dict | cluster_cfg, | ||
| list | command, | ||
| str | workdir, | ||
| str | stdout_path, | ||
| str | stderr_path = None, |
||
| dict | env_vars = None, |
||
| dict | shell_env_vars = None, |
||
| str | array_spec = None |
||
| ) |
Render a Slurm batch script for a single command.
| [in] | script_path | Argument passed to render_slurm_script(). |
| [in] | job_name | Argument passed to render_slurm_script(). |
| [in] | cluster_cfg | Argument passed to render_slurm_script(). |
| [in] | command | Argument passed to render_slurm_script(). |
| [in] | workdir | Argument passed to render_slurm_script(). |
| [in] | stdout_path | Argument passed to render_slurm_script(). |
| [in] | stderr_path | Argument passed to render_slurm_script(). |
| [in] | env_vars | Argument passed to render_slurm_script(). |
| [in] | shell_env_vars | Argument passed to render_slurm_script(). |
| [in] | array_spec | Argument passed to render_slurm_script(). |
Definition at line 5884 of file core.py.
| "tuple[str | None, list[str]]" picurv_cli.core.split_launcher_tokens | ( | "str | None" | launcher, |
| "list | None" | launcher_args = None, |
||
| str | label = "launcher" |
||
| ) |
Canonicalize launcher config into executable token plus argv-style flags.
| [in] | launcher | Argument passed to split_launcher_tokens(). |
| [in] | launcher_args | Argument passed to split_launcher_tokens(). |
| [in] | label | Argument passed to split_launcher_tokens(). |
split_launcher_tokens(). Definition at line 5985 of file core.py.
| "tuple[str | None, list[str]]" picurv_cli.core.normalize_cluster_launcher | ( | dict | execution | ) |
Canonicalize cluster launcher config into executable token plus argv-style flags.
| [in] | execution | Argument passed to normalize_cluster_launcher(). |
normalize_cluster_launcher(). Definition at line 6013 of file core.py.
| "list[str]" picurv_cli.core.strip_launcher_size_flags | ( | str | launcher_name, |
| "list[str]" | launcher_args | ||
| ) |
Remove explicit MPI task-count flags from known launchers.
| [in] | launcher_name | Basename-normalized launcher executable. |
| [in] | launcher_args | Launcher argument list. |
Definition at line 6026 of file core.py.
| dict picurv_cli.core.build_serial_post_cluster_config | ( | dict | cluster_cfg, |
| int | num_procs = 1 |
||
| ) |
Clone cluster config and force a single-node post stage task layout.
| [in] | cluster_cfg | Base cluster configuration. |
| [in] | num_procs | Number of post tasks to request. |
Definition at line 6059 of file core.py.
| list picurv_cli.core.build_local_launch_command | ( | str | executable, |
| list | executable_args, | ||
| int | num_procs, | ||
| str | config_search_anchor = None, |
||
| bool | allow_single_rank_launcher_override = False, |
||
| "int | None" | force_num_procs = None |
||
| ) |
Build local launcher command, allowing env or shared config overrides for login-node MPI quirks.
| [in] | executable | Argument passed to build_local_launch_command(). |
| [in] | executable_args | Argument passed to build_local_launch_command(). |
| [in] | num_procs | Argument passed to build_local_launch_command(). |
| [in] | config_search_anchor | Argument passed to build_local_launch_command(). |
| [in] | allow_single_rank_launcher_override | When true, explicit launcher overrides also apply to 1-rank commands. |
| [in] | force_num_procs | Optional explicit MPI rank count override applied after stripping conflicting launcher size flags. |
build_local_launch_command(). Definition at line 6073 of file core.py.
| dict picurv_cli.core.resolve_cluster_execution | ( | dict | cluster_cfg, |
| str | config_search_anchor = None, |
||
extra_search_anchors = None |
|||
| ) |
Resolve cluster execution launcher settings from shared runtime config plus cluster.yml overrides.
| [in] | cluster_cfg | Argument passed to resolve_cluster_execution(). |
| [in] | config_search_anchor | Argument passed to resolve_cluster_execution(). |
| [in] | extra_search_anchors | Argument passed to resolve_cluster_execution(). |
resolve_cluster_execution(). Definition at line 6143 of file core.py.
| list picurv_cli.core.build_cluster_launch_command | ( | dict | cluster_cfg, |
| str | executable, | ||
| list | executable_args, | ||
| str | config_search_anchor = None, |
||
extra_search_anchors = None, |
|||
| "int | None" | force_num_procs = None |
||
| ) |
Build scheduler launcher command from cluster config plus optional shared execution defaults.
| [in] | cluster_cfg | Argument passed to build_cluster_launch_command(). |
| [in] | executable | Argument passed to build_cluster_launch_command(). |
| [in] | executable_args | Argument passed to build_cluster_launch_command(). |
| [in] | config_search_anchor | Argument passed to build_cluster_launch_command(). |
| [in] | extra_search_anchors | Argument passed to build_cluster_launch_command(). |
| [in] | force_num_procs | Optional explicit MPI rank count override applied after stripping conflicting launcher size flags. |
build_cluster_launch_command(). Definition at line 6161 of file core.py.
| str picurv_cli.core.parse_slurm_job_id | ( | str | sbatch_output | ) |
Extract numeric job id from standard sbatch output.
| [in] | sbatch_output | Argument passed to parse_slurm_job_id(). |
parse_slurm_job_id(). Definition at line 6228 of file core.py.
| dict picurv_cli.core.submit_sbatch | ( | str | script_path, |
| str | dependency = None, |
||
| str | dependency_type = "afterok" |
||
| ) |
Submit sbatch script and return submission metadata.
| [in] | script_path | Argument passed to submit_sbatch(). |
| [in] | dependency | Argument passed to submit_sbatch(). |
| [in] | dependency_type | Slurm dependency type (default: afterok). Common values: afterok, afterany. |
submit_sbatch(). Definition at line 6237 of file core.py.
|
protected |
Prints validation errors and exits.
| [in] | errors | List of error message strings. |
Definition at line 6270 of file core.py.
| str picurv_cli.core.generate_header | ( | str | run_id, |
| dict | source_files | ||
| ) |
Creates a standard header block for all generated files.
| [in] | run_id | The unique identifier for the current simulation run. |
| [in] | source_files | A dictionary of source profile files used. |
Definition at line 6289 of file core.py.
| str picurv_cli.core.generate_simple_list_file | ( | str | run_dir, |
| str | run_id, | ||
| dict | cfg, | ||
| str | section, | ||
| str | key, | ||
| str | filename, | ||
| dict | header_sources | ||
| ) |
Generic function to create a file containing a simple list of strings.
| [in] | run_dir | The path to the main run directory. |
| [in] | run_id | The unique identifier for the run. |
| [in] | cfg | The dictionary containing the configuration data. |
| [in] | section | The top-level key in the cfg dictionary. |
| [in] | key | The second-level key whose value is the list of strings. |
| [in] | filename | The name of the file to generate (e.g., 'whitelist.run'). |
| [in] | header_sources | A dictionary of source files for the header. |
Definition at line 6314 of file core.py.
| bool picurv_cli.core.has_explicit_monitor_whitelist | ( | dict | monitor_cfg | ) |
Return True when logging.enabled_functions contains at least one entry.
| [in] | monitor_cfg | Argument passed to has_explicit_monitor_whitelist(). |
has_explicit_monitor_whitelist(). Definition at line 6339 of file core.py.
| dict picurv_cli.core.resolve_profiling_config | ( | dict | monitor_cfg | ) |
Resolve profiling reporting config from monitor.yml.
| [in] | monitor_cfg | Argument passed to resolve_profiling_config(). |
resolve_profiling_config(). Definition at line 6349 of file core.py.
|
protected |
Validate a diagnostics value that can be false, true, or a path/viewer string.
| [in] | value | Candidate value. |
| [in] | key | Diagnostics key used in error messages. |
Definition at line 6416 of file core.py.
|
protected |
Validate a diagnostics boolean value.
| [in] | value | Candidate value. |
| [in] | key | Diagnostics key used in error messages. |
Definition at line 6430 of file core.py.
|
protected |
Validate a diagnostics value that can be false, true, or "all".
| [in] | value | Candidate value. |
| [in] | key | Diagnostics key used in error messages. |
Definition at line 6442 of file core.py.
|
protected |
Return an absolute run-local diagnostics file path.
| [in] | run_dir | Run directory. |
| [in] | filename | Diagnostics filename. |
Definition at line 6456 of file core.py.
|
protected |
Resolve true/string diagnostics values to a concrete file path.
| [in] | value | Boolean/string diagnostics value. |
| [in] | run_dir | Run directory. |
| [in] | default_filename | Default file name when value is true. |
Definition at line 6466 of file core.py.
| dict picurv_cli.core.resolve_diagnostics_config | ( | dict | monitor_cfg, |
| "str | None" | run_dir = None, |
||
| str | stage_label = "Solver" |
||
| ) |
Resolve monitor diagnostics config and default run-local log paths.
| [in] | monitor_cfg | Parsed monitor.yml mapping. |
| [in] | run_dir | Optional run directory for default artifact paths. |
| [in] | stage_label | Solver/PostProcessor suffix used for PETSc output defaults. |
Definition at line 6483 of file core.py.
| list picurv_cli.core.build_petsc_diagnostics_args | ( | dict | monitor_cfg, |
| str | run_dir, | ||
| str | stage_label | ||
| ) |
Build PETSc diagnostics command-line arguments for a run stage.
| [in] | monitor_cfg | Parsed monitor.yml mapping. |
| [in] | run_dir | Run directory used to resolve default diagnostics files. |
| [in] | stage_label | Stage label for default output names. |
Definition at line 6562 of file core.py.
| dict picurv_cli.core.prepare_monitor_files | ( | str | run_dir, |
| str | run_id, | ||
| dict | monitor_cfg, | ||
| dict | source_files | ||
| ) |
Generate monitor sidecar files and resolve profiling reporting behavior.
| [in] | run_dir | Argument passed to prepare_monitor_files(). |
| [in] | run_id | Argument passed to prepare_monitor_files(). |
| [in] | monitor_cfg | Argument passed to prepare_monitor_files(). |
| [in] | source_files | Argument passed to prepare_monitor_files(). |
prepare_monitor_files(). Definition at line 6601 of file core.py.
| list picurv_cli.core.generate_multi_block_bcs | ( | str | run_dir, |
| str | run_id, | ||
| dict | case_cfg, | ||
| dict | source_files | ||
| ) |
Parses multi-block BCs from YAML, generates a .run file for each block, and returns a list of their absolute paths.
Handles both simple list format (for single-block cases) and a list-of-lists (for multi-block cases) for boundary conditions.
| [in] | run_dir | The path to the main run directory. |
| [in] | run_id | The unique identifier for the run. |
| [in] | case_cfg | The parsed case.yml configuration dictionary. |
| [in] | source_files | A dictionary of source files for the header. |
| ValueError | if the number of BC definitions does not match the number of blocks. |
Definition at line 6638 of file core.py.
| picurv_cli.core.format_flag_value | ( | value | ) |
Converts Python types to C-style command-line flag values.
| [in] | value | The Python object to convert (bool, list, or other). |
Definition at line 6777 of file core.py.
| dict picurv_cli.core.translate_programmatic_grid_settings | ( | dict | grid_settings | ) |
Return programmatic-grid settings translated to the C node-count contract.
| [in] | grid_settings | Argument passed to translate_programmatic_grid_settings(). |
translate_programmatic_grid_settings(). Definition at line 6789 of file core.py.
| dict picurv_cli.core.generate_picgrid_from_programmatic_settings | ( | dict | raw_settings, |
| str | dest_path, | ||
| float | L_ref | ||
| ) |
Generate a canonical PICGRID file from programmatic Cartesian grid settings.
Implements the same coordinate formula as ComputeStretchedCoord in src/grid.c. im/jm/km in raw_settings are cell counts; node counts are im+1, jm+1, km+1.
| [in] | raw_settings | programmatic_settings dict from case.yml. |
| [in] | dest_path | Destination PICGRID file path. |
| [in] | L_ref | Reference length for nondimensionalization (must be non-zero). |
Definition at line 6808 of file core.py.
| dict picurv_cli.core.resolve_grid_da_processor_layout | ( | dict | grid_cfg | ) |
Resolve optional global DMDA layout, preferring grid-level keys over legacy nested keys.
| [in] | grid_cfg | Argument passed to resolve_grid_da_processor_layout(). |
resolve_grid_da_processor_layout(). Definition at line 6871 of file core.py.
| None picurv_cli.core.append_grid_da_processor_layout | ( | list | control_lines, |
| dict | grid_cfg, | ||
| int | num_procs | ||
| ) |
Append optional global DMDA layout flags for any grid mode.
| [in] | control_lines | Argument passed to append_grid_da_processor_layout(). |
| [in] | grid_cfg | Argument passed to append_grid_da_processor_layout(). |
| [in] | num_procs | Argument passed to append_grid_da_processor_layout(). |
Definition at line 6925 of file core.py.
| str picurv_cli.core.normalize_momentum_solver_type | ( | str | value | ) |
Maps canonical user-facing momentum solver names to C-enum CLI values.
| [in] | value | Canonical momentum solver string from YAML. |
| ValueError | if the input cannot be mapped. |
Definition at line 6958 of file core.py.
| str picurv_cli.core.normalize_solution_convergence_mode | ( | str | value | ) |
Normalizes the solution-convergence mode selector to the C-side canonical string.
| [in] | value | Human-readable solution-convergence mode selector. |
-solution_convergence_mode. | ValueError | if the input cannot be mapped. |
Definition at line 6982 of file core.py.
| int picurv_cli.core.normalize_field_init_mode | ( | str | value | ) |
Maps canonical field init mode names to C enum/int codes (-finit).
| [in] | value | Canonical field initialization mode. |
| ValueError | if the input cannot be mapped. |
Definition at line 7007 of file core.py.
| "tuple[str, int]" picurv_cli.core.normalize_initial_condition_field | ( | str | value | ) |
Normalize a file IC field selector to its staged basename and C enum value.
| [in] | value | User-facing Ucat or Ucont selector. |
Definition at line 7029 of file core.py.
| dict picurv_cli.core.resolve_initial_condition_config | ( | dict | ic, |
| prepared_blocks, | |||
| float | U_ref | ||
| ) |
Resolve legacy and structured initial-condition YAML into one launcher contract.
| [in] | ic | Initial-condition YAML mapping. |
| [in] | prepared_blocks | Normalized boundary-condition blocks. |
| [in] | U_ref | Physical reference velocity. |
Definition at line 7042 of file core.py.
| dict picurv_cli.core.validate_petsc_vec_binary | ( | str | path | ) |
Validate the basic PETSc binary VecView envelope used by ReadFieldData.
| [in] | path | PETSc binary vector path. |
Definition at line 7128 of file core.py.
| str picurv_cli.core.run_initial_condition_generator | ( | str | case_path, |
| str | run_dir, | ||
| dict | resolved_ic | ||
| ) |
Run the repository IC generator.
| [in] | case_path | Source case YAML path. |
| [in] | run_dir | Run or precompute output directory. |
| [in] | resolved_ic | Normalized external-generator contract. |
Definition at line 7149 of file core.py.
| dict picurv_cli.core.stage_initial_condition_file | ( | str | run_dir, |
| str | case_path, | ||
| dict | resolved_ic | ||
| ) |
Materialize and stage one file-backed IC in ReadFieldData's expected layout.
| [in] | run_dir | Run or precompute output directory. |
| [in] | case_path | Source case YAML path. |
| [in] | resolved_ic | Normalized file-backed IC contract. |
Definition at line 7184 of file core.py.
| int picurv_cli.core.normalize_flow_direction_token | ( | str | value | ) |
Maps a face-token flow direction string to the C FlowDirection enum integer.
| [in] | value | One of '+Xi', '-Xi', '+Eta', '-Eta', '+Zeta', '-Zeta'. |
| ValueError | on unknown value. |
Definition at line 7208 of file core.py.
|
protected |
Return True if any prepared BC block contains an INLET face.
| [in] | prepared_blocks | List of prepared BC lists (one per domain block). |
Definition at line 7227 of file core.py.
| dict picurv_cli.core.resolve_ic_cli_params | ( | dict | ic, |
| int | finit_code, | ||
| prepared_blocks, | |||
| float | U_ref | ||
| ) |
Resolve all IC parameters and return a dict of PETSc option values.
| [in] | ic | The properties.initial_conditions mapping. |
| [in] | finit_code | Normalized -finit integer code. |
| [in] | prepared_blocks | Normalized BC blocks (may be None). |
| [in] | U_ref | Reference velocity for non-dimensionalization. |
| KeyError | if a required key is absent. |
| ValueError | on invalid combinations or values. |
Definition at line 7241 of file core.py.
| str picurv_cli.core.normalize_eulerian_field_source | ( | str | value | ) |
Normalizes the Eulerian field source selector to the C-side canonical string.
| [in] | value | Human-readable or enum-like Eulerian field source. |
-euler_field_source. | ValueError | if the input cannot be mapped. |
Definition at line 7342 of file core.py.
| str picurv_cli.core.normalize_analytical_type | ( | str | value | ) |
Normalizes the analytical solution selector to the C-side canonical string.
| [in] | value | Human-readable analytical solution selector. |
-analytical_type. | ValueError | if the input cannot be mapped. |
Definition at line 7366 of file core.py.
| "tuple[float, float, float]" picurv_cli.core.parse_initial_velocity_components | ( | dict | initial_conditions, |
| int | finit_code, | ||
| *bool | require_explicit | ||
| ) |
Parse initial-condition velocity components with mode-aware defaults.
| [in] | initial_conditions | The properties.initial_conditions mapping from case.yml. |
| [in] | finit_code | Normalized -finit integer code. |
| [in] | require_explicit | If True, all three component keys must be present. |
(u, v, w) in physical units. | KeyError | if a required component key is missing. |
| ValueError | if a component cannot be converted to float. |
Definition at line 7385 of file core.py.
| "str | None" picurv_cli.core.infer_unique_inlet_axis_from_prepared_bcs | ( | list | prepared_blocks | ) |
Infer the unique inlet axis across all blocks using C-side "primary inlet" ordering.
| [in] | prepared_blocks | Normalized BC blocks from validate_and_prepare_boundary_conditions. |
"x", "y", "z" if unique, None if no inlet exists. | ValueError | if different blocks imply different inlet axes. |
Definition at line 7412 of file core.py.
| int picurv_cli.core.normalize_particle_init_mode | ( | str | value | ) |
Maps canonical particle init mode names to C enum/int codes (-pinit).
| [in] | value | Canonical particle initialization mode. |
| ValueError | if the input cannot be mapped. |
Definition at line 7444 of file core.py.
| int picurv_cli.core.normalize_interpolation_method | ( | str | value | ) |
Maps interpolation method names to C enum/int codes (-interpolation_method).
| [in] | value | Canonical interpolation method name. |
| ValueError | if the input cannot be mapped. |
Definition at line 7468 of file core.py.
| int picurv_cli.core.normalize_les_model | ( | value | ) |
Maps LES model selectors to C enum/int codes (-les).
| [in] | value | LES selector name or legacy integer/bool value. |
| ValueError | if the input cannot be mapped. |
Definition at line 7489 of file core.py.
| int picurv_cli.core.normalize_les_test_filter | ( | value | ) |
Maps LES test-filter names to the C -testfilter_ik flag.
| [in] | value | Test-filter selector name or legacy integer/bool value. |
| ValueError | if the input cannot be mapped. |
Definition at line 7524 of file core.py.
| int picurv_cli.core.normalize_rans_model | ( | value | ) |
Maps RANS model selectors to the current C -rans switch.
| [in] | value | RANS selector name or legacy integer/bool value. |
| ValueError | if the input cannot be mapped. |
Definition at line 7556 of file core.py.
| str picurv_cli.core.normalize_wall_function_model | ( | value | ) |
Validates wall-function model selectors exposed in YAML.
| [in] | value | Wall-function selector name. |
| ValueError | if the input cannot be mapped. |
Definition at line 7584 of file core.py.
| bool picurv_cli.core.resolve_enabled_flag | ( | dict | cfg, |
| str | path, | ||
| bool | default = True |
||
| ) |
Resolves a structured enabled flag and rejects non-boolean values.
| [in] | cfg | Mapping that may contain enabled. |
| [in] | path | Human-readable config path for diagnostics. |
| [in] | default | Value used when enabled is omitted. |
| ValueError | if enabled is not a YAML boolean. |
Definition at line 7598 of file core.py.
| picurv_cli.core.append_turbulence_flags | ( | dict | models, |
| list | control_lines | ||
| ) |
Appends turbulence model flags from legacy or structured case.yml blocks.
| [in] | models | Parsed case.yml models mapping. |
| [out] | control_lines | A list of strings to which C-flags will be appended. |
Definition at line 7613 of file core.py.
| picurv_cli.core.append_passthrough_flags | ( | list | control_lines, |
| dict | options | ||
| ) |
Appends raw CLI flags to the control list from a {flag: value} dict.
Boolean true is emitted as a switch with no value. Boolean false is skipped. All other values are emitted as "<flag> <value>".
| [out] | control_lines | The destination list of control-file lines. |
| [in] | options | Mapping of raw CLI flags to values. |
Definition at line 7669 of file core.py.
| dict picurv_cli.core.resolve_solver_monitoring_flags | ( | dict | monitor_cfg | ) |
Resolve human-readable solver monitoring YAML to raw control flags.
| [in] | monitor_cfg | Parsed monitor.yml mapping. |
Definition at line 7695 of file core.py.
| "int | None" picurv_cli.core.resolve_particle_console_output_frequency | ( | dict | io_cfg | ) |
Return the effective particle-console snapshot cadence from monitor.yml.
| [in] | io_cfg | Argument passed to resolve_particle_console_output_frequency(). |
resolve_particle_console_output_frequency(). Definition at line 7749 of file core.py.
| picurv_cli.core.parse_and_add_model_flags | ( | dict | case_cfg, |
| list | control_lines | ||
| ) |
Parses the 'models' section of case.yml and adds corresponding C-solver flags.
| [in] | case_cfg | The parsed case.yml configuration dictionary. |
| [out] | control_lines | A list of strings to which C-flags will be appended. |
Definition at line 7759 of file core.py.
| dict picurv_cli.core.parse_solver_config | ( | dict | solver_cfg | ) |
Parses the structured solver.yml into a flat dictionary of {flag: value}.
| [in] | solver_cfg | The parsed solver.yml configuration dictionary. |
Definition at line 7814 of file core.py.
| picurv_cli.core.generate_solver_control_file | ( | run_dir, | |
| run_id, | |||
| configs, | |||
| num_procs, | |||
| monitor_files, | |||
restart_source_dir = None, |
|||
continue_mode = False |
|||
| ) |
Generates the main .control file for the C-solver.
Orchestrates the conversion of all YAML configurations (case, solver, monitor) into a single, machine-readable file of command-line flags.
| [in] | run_dir | Argument passed to generate_solver_control_file(). |
| [in] | run_id | Argument passed to generate_solver_control_file(). |
| [in] | configs | Argument passed to generate_solver_control_file(). |
| [in] | num_procs | Argument passed to generate_solver_control_file(). |
| [in] | monitor_files | Argument passed to generate_solver_control_file(). |
| [in] | restart_source_dir | Argument passed to generate_solver_control_file(). |
| [in] | continue_mode | If True, appends -continue_mode flag for the C solver. |
generate_solver_control_file(). Definition at line 8174 of file core.py.
| str picurv_cli.core.generate_post_recipe_file | ( | str | run_dir, |
| str | run_id, | ||
| dict | post_cfg, | ||
| dict | source_files, | ||
monitor_cfg = None |
|||
| ) |
Generates a key=value config file (post.run) for the C post-processor.
Translates the structured post-processing YAML into the specific flat key-value format required by the C executable, including complex, semicolon-separated pipeline strings.
| [in] | run_dir | The path to the main run directory. |
| [in] | run_id | The unique identifier for the run. |
| [in] | post_cfg | The parsed post-profile YAML configuration dictionary. |
| [in] | source_files | A dictionary of source files for the header. |
| [in] | monitor_cfg | Optional parsed monitor YAML configuration dictionary. |
Definition at line 8417 of file core.py.
| picurv_cli.core.execute_command | ( | list | command, |
| str | run_dir, | ||
| str | log_filename, | ||
| dict | monitor_cfg = None |
||
| ) |
Executes a command, streaming its output to the console and a log file.
... If None, the process inherits the parent's environment directly.
| [in] | command | Argument passed to execute_command(). |
| [in] | run_dir | Argument passed to execute_command(). |
| [in] | log_filename | Argument passed to execute_command(). |
| [in] | monitor_cfg | Argument passed to execute_command(). |
Definition at line 8446 of file core.py.
| str picurv_cli.core.format_command_for_display | ( | list | command | ) |
Render a shell-safe command string for console and log output.
| [in] | command | Argument passed to format_command_for_display(). |
format_command_for_display(). Definition at line 8506 of file core.py.
| str picurv_cli.core.resolve_command_log_path | ( | str | run_dir, |
| str | log_filename | ||
| ) |
Resolve a command log filename relative to the run directory.
| [in] | run_dir | Argument passed to resolve_command_log_path(). |
| [in] | log_filename | Argument passed to resolve_command_log_path(). |
resolve_command_log_path(). Definition at line 8515 of file core.py.
|
protected |
Run a command and capture combined stdout/stderr details for later inspection.
| [in] | command | Argument passed to _run_captured_command(). |
| [in] | run_dir | Argument passed to _run_captured_command(). |
_run_captured_command(). Definition at line 8554 of file core.py.
|
protected |
Raise CommandExecutionError when a captured command failed.
| [in] | command | Argument passed to _require_successful_command(). |
| [in] | result | Argument passed to _require_successful_command(). |
Definition at line 8575 of file core.py.
|
protected |
Run a command, require success, and return stripped stdout text.
| [in] | command | Argument passed to _capture_command_stdout(). |
| [in] | run_dir | Argument passed to _capture_command_stdout(). |
_capture_command_stdout(). Definition at line 8587 of file core.py.
|
protected |
Stream command output to stdout and an already-open log file.
| [in] | command | Argument passed to _stream_command_to_console_and_log(). |
| [in] | run_dir | Argument passed to _stream_command_to_console_and_log(). |
| [in] | log_file | Argument passed to _stream_command_to_console_and_log(). |
Definition at line 8599 of file core.py.
|
protected |
Capture the current git HEAD branch name and commit hash.
| [in] | run_dir | Argument passed to _get_git_head_state(). |
_get_git_head_state(). Definition at line 8637 of file core.py.
|
protected |
Return local branch names plus their configured upstreams.
| [in] | run_dir | Argument passed to _get_local_branches_with_upstreams(). |
_get_local_branches_with_upstreams(). Definition at line 8649 of file core.py.
|
protected |
Return True when the repository has staged or unstaged tracked changes.
| [in] | run_dir | Argument passed to _working_tree_has_tracked_changes(). |
_working_tree_has_tracked_changes(). Definition at line 8668 of file core.py.
|
protected |
Best-effort cleanup after a failed git pull so the original branch can be restored.
| [in] | run_dir | Argument passed to _attempt_pull_cleanup(). |
| [in] | rebase | Argument passed to _attempt_pull_cleanup(). |
| [in] | log_file | Argument passed to _attempt_pull_cleanup(). |
Definition at line 8680 of file core.py.
|
protected |
Restore the repository back to the branch or detached commit it started on.
| [in] | run_dir | Argument passed to _restore_git_head(). |
| [in] | original_head | Argument passed to _restore_git_head(). |
| [in] | log_file | Argument passed to _restore_git_head(). |
Definition at line 8712 of file core.py.
| picurv_cli.core.pull_all_source_branches | ( | str | run_dir, |
| str | log_filename, | ||
| bool | rebase = True |
||
| ) |
Refresh every local tracking branch in the source repository, then restore the starting branch.
| [in] | run_dir | Argument passed to pull_all_source_branches(). |
| [in] | log_filename | Argument passed to pull_all_source_branches(). |
| [in] | rebase | Argument passed to pull_all_source_branches(). |
Definition at line 8731 of file core.py.
| picurv_cli.core.auto_identify_run_inputs | ( | str | config_dir | ) |
Auto-detect case.yml, monitor.yml, and *.control in a run config directory.
| [in] | config_dir | Argument passed to auto_identify_run_inputs(). |
auto_identify_run_inputs(). Definition at line 8839 of file core.py.
| str picurv_cli.core.resolve_post_source_directory | ( | str | run_dir, |
| dict | monitor_cfg, | ||
| dict | post_cfg, | ||
| bool | strict = True |
||
| ) |
Resolve post source directory token and optionally enforce existence.
| [in] | run_dir | Argument passed to resolve_post_source_directory(). |
| [in] | monitor_cfg | Argument passed to resolve_post_source_directory(). |
| [in] | post_cfg | Argument passed to resolve_post_source_directory(). |
| [in] | strict | Argument passed to resolve_post_source_directory(). |
resolve_post_source_directory(). Definition at line 8864 of file core.py.
| picurv_cli.core.render_slurm_array_stage_script | ( | str | script_path, |
| str | job_name, | ||
| dict | cluster_cfg, | ||
| str | array_spec, | ||
| str | case_index_tsv, | ||
| str | stage, | ||
| str | solver_exe, | ||
| str | post_exe, | ||
| str | stdout_path, | ||
| str | stderr_path | ||
| ) |
Render array script that maps SLURM_ARRAY_TASK_ID to per-case run artifacts.
| [in] | script_path | Argument passed to render_slurm_array_stage_script(). |
| [in] | job_name | Argument passed to render_slurm_array_stage_script(). |
| [in] | cluster_cfg | Argument passed to render_slurm_array_stage_script(). |
| [in] | array_spec | Argument passed to render_slurm_array_stage_script(). |
| [in] | case_index_tsv | Argument passed to render_slurm_array_stage_script(). |
| [in] | stage | Argument passed to render_slurm_array_stage_script(). |
| [in] | solver_exe | Argument passed to render_slurm_array_stage_script(). |
| [in] | post_exe | Argument passed to render_slurm_array_stage_script(). |
| [in] | stdout_path | Argument passed to render_slurm_array_stage_script(). |
| [in] | stderr_path | Argument passed to render_slurm_array_stage_script(). |
render_slurm_array_stage_script(). Definition at line 8893 of file core.py.
| picurv_cli.core.render_metrics_aggregate_script | ( | str | script_path, |
| str | job_name, | ||
| dict | cluster_cfg, | ||
| str | study_dir, | ||
| str | picurv_path | ||
| ) |
Generate a single-node sbatch script that runs metrics aggregation.
| [in] | script_path | Path to write the sbatch script. |
| [in] | job_name | Slurm job name. |
| [in] | cluster_cfg | Parsed cluster YAML dictionary. |
| [in] | study_dir | Absolute path to the study directory. |
| [in] | picurv_path | Absolute path to the picurv script. |
Definition at line 9026 of file core.py.
| picurv_cli.core.reduce_metric_values | ( | values, | |
| str | reduction | ||
| ) |
Reduce a metric series to one scalar according to the requested reducer.
| [in] | values | Sequence of numeric values. |
| [in] | reduction | Reduction keyword. |
reduce_metric_values(). Definition at line 9088 of file core.py.
| picurv_cli.core.extract_metric_from_csv | ( | str | case_dir, |
| dict | spec | ||
| ) |
Extract a scalar metric from a CSV source.
| [in] | case_dir | Argument passed to extract_metric_from_csv(). |
| [in] | spec | Argument passed to extract_metric_from_csv(). |
extract_metric_from_csv(). Definition at line 9110 of file core.py.
| picurv_cli.core.extract_metric_from_log | ( | str | case_dir, |
| dict | spec | ||
| ) |
Extract a scalar metric from a log file using regex.
| [in] | case_dir | Argument passed to extract_metric_from_log(). |
| [in] | spec | Argument passed to extract_metric_from_log(). |
extract_metric_from_log(). Definition at line 9160 of file core.py.
| picurv_cli.core.normalize_metric_spec | ( | metric | ) |
Normalize study metric definitions to a common dictionary form.
| [in] | metric | Argument passed to normalize_metric_spec(). |
normalize_metric_spec(). Definition at line 9191 of file core.py.
| str picurv_cli.core.aggregate_study_metrics | ( | dict | study_cfg, |
| list | cases, | ||
| str | results_dir | ||
| ) |
Collect metric values from generated case directories into one CSV.
| [in] | study_cfg | Argument passed to aggregate_study_metrics(). |
| [in] | cases | Argument passed to aggregate_study_metrics(). |
| [in] | results_dir | Argument passed to aggregate_study_metrics(). |
aggregate_study_metrics(). Definition at line 9208 of file core.py.
| picurv_cli.core.infer_plot_x_axis | ( | dict | study_cfg, |
| list | rows | ||
| ) |
Infer x-axis key/values for study plots.
| [in] | study_cfg | Argument passed to infer_plot_x_axis(). |
| [in] | rows | Argument passed to infer_plot_x_axis(). |
infer_plot_x_axis(). Definition at line 9271 of file core.py.
| picurv_cli.core.generate_study_plots | ( | dict | study_cfg, |
| str | metrics_csv, | ||
| str | plots_dir | ||
| ) |
Generate metric-vs-parameter plots for completed studies.
| [in] | study_cfg | Argument passed to generate_study_plots(). |
| [in] | metrics_csv | Argument passed to generate_study_plots(). |
| [in] | plots_dir | Argument passed to generate_study_plots(). |
generate_study_plots(). Definition at line 9308 of file core.py.
|
protected |
Render a command list as a shell-safe display string.
| [in] | command_tokens | Argument passed to _command_to_string(). |
_command_to_string(). Definition at line 9377 of file core.py.
|
protected |
Resolve post source directory without side effects or stdout/stderr output.
| [in] | run_dir | Argument passed to _resolve_post_source_directory_preview(). |
| [in] | monitor_cfg | Argument passed to _resolve_post_source_directory_preview(). |
| [in] | post_cfg | Argument passed to _resolve_post_source_directory_preview(). |
_resolve_post_source_directory_preview(). Definition at line 9386 of file core.py.
| dict picurv_cli.core.build_run_dry_plan | ( | args | ) |
Build a no-write execution plan for run --dry-run.
| [in] | args | Command-line style argument list supplied to the function. |
build_run_dry_plan(). Definition at line 9402 of file core.py.
| None picurv_cli.core.add_planned_grid_artifacts | ( | dict | plan, |
| dict | case_cfg, | ||
| str | run_dir | ||
| ) |
Add grid-mode-specific staged artifacts to a dry-run plan.
| [in,out] | plan | Dry-run plan to update. |
| [in] | case_cfg | Parsed case configuration. |
| [in] | run_dir | Preview run directory for relative artifact resolution. |
Definition at line 9785 of file core.py.
| None picurv_cli.core.add_planned_profile_artifacts | ( | dict | plan, |
| dict | case_cfg, | ||
| str | run_dir | ||
| ) |
Add generated prescribed-flow profile artifacts to a dry-run plan.
| [in,out] | plan | Dry-run plan to update. |
| [in] | case_cfg | Parsed case configuration. |
| [in] | run_dir | Preview run directory. |
Definition at line 9824 of file core.py.
| None picurv_cli.core.add_planned_initial_condition_artifacts | ( | dict | plan, |
| dict | case_cfg, | ||
| dict | solver_cfg, | ||
| str | run_dir | ||
| ) |
Add authoritative file-backed initial-condition artifacts to a dry-run plan.
| [in,out] | plan | Dry-run plan receiving artifact paths. |
| [in] | case_cfg | Parsed case configuration. |
| [in] | solver_cfg | Parsed solver configuration. |
| [in] | run_dir | Planned run directory. |
Definition at line 9862 of file core.py.
| picurv_cli.core.render_run_dry_plan | ( | dict | plan, |
| str | output_format = "text" |
||
| ) |
Render dry-run plan in human or JSON format.
| [in] | plan | Argument passed to render_run_dry_plan(). |
| [in] | output_format | Argument passed to render_run_dry_plan(). |
Definition at line 9897 of file core.py.
| picurv_cli.core.validate_workflow | ( | args | ) |
Implements picurv validate without launching solver/post workflows.
| [in] | args | Command-line style argument list supplied to the function. |
Definition at line 9949 of file core.py.
| picurv_cli.core.precompute_workflow | ( | args | ) |
Generate deterministic case artifacts without launching solver/post stages.
| [in] | args | Parsed precompute command arguments. |
Definition at line 10093 of file core.py.
| picurv_cli.core.run_workflow | ( | args | ) |
Main orchestrator for the 'run' command (local and Slurm modes).
| [in] | args | Command-line style argument list supplied to the function. |
Definition at line 10179 of file core.py.
| list picurv_cli.core.parse_case_index_tsv | ( | str | tsv_path | ) |
Parse a case_index.tsv file back into a list of case entry dicts.
| [in] | tsv_path | Path to the case_index.tsv file. |
Definition at line 10697 of file core.py.
| picurv_cli.core.sweep_workflow | ( | args | ) |
Study/sweep orchestration using Slurm job arrays.
| [in] | args | Command-line style argument list supplied to the function. |
Definition at line 10723 of file core.py.
| picurv_cli.core.sweep_continue_workflow | ( | args | ) |
Continue a partially-completed Slurm parameter sweep study.
Detects incomplete cases, prepares them for continuation (updating start_step, populating restart directories, regenerating control files), and submits new solver/post/metrics Slurm jobs. If all cases are already complete, performs metrics aggregation automatically.
| [in] | args | Parsed CLI arguments with study_dir and optional cluster override. |
Definition at line 10961 of file core.py.
| picurv_cli.core.sweep_reaggregate_workflow | ( | args | ) |
Re-run metrics aggregation and plot generation for an existing study.
| [in] | args | Parsed CLI arguments with study_dir. |
Definition at line 11184 of file core.py.
|
protected |
Read YAML when present, otherwise return None.
| [in] | filepath | Argument passed to _read_yaml_if_exists(). |
_read_yaml_if_exists(). Definition at line 11235 of file core.py.
|
protected |
Read JSON when present, otherwise return None.
| [in] | filepath | Argument passed to _read_json_if_exists(). |
_read_json_if_exists(). Definition at line 11250 of file core.py.
|
protected |
Best-effort integer parsing for summary extraction.
| [in] | value | Argument passed to _parse_int_loose(). |
_parse_int_loose(). Definition at line 11262 of file core.py.
|
protected |
Best-effort float parsing for summary extraction.
| [in] | value | Argument passed to _parse_float_loose(). |
_parse_float_loose(). Definition at line 11282 of file core.py.
|
protected |
Extract a numeric tuple from a string like '(1, 2, 3)'.
| [in] | text | Argument passed to _extract_numeric_tuple(). |
_extract_numeric_tuple(). Definition at line 11299 of file core.py.
|
protected |
Resolve run-local config and artifact paths for summarize.
| [in] | run_dir | Argument passed to _build_summary_context(). |
_build_summary_context(). Definition at line 11310 of file core.py.
|
protected |
Return one explicitly requested copied config or fail with a structured error.
| [in] | context | Summary context returned by _build_summary_context(). |
| [in] | name | Config selector name. |
Definition at line 11378 of file core.py.
|
protected |
Build timestep-independent run metadata for summarize.
| [in] | context | Summary context returned by _build_summary_context(). |
Definition at line 11407 of file core.py.
|
protected |
Build compact turbulence and wall-model selections.
| [in] | turbulence_cfg | Case turbulence configuration mapping. |
Definition at line 11427 of file core.py.
|
protected |
Build a curated case.yml summary with useful derived quantities.
| [in] | context | Summary context returned by _build_summary_context(). |
Definition at line 11447 of file core.py.
|
protected |
Build a curated solver.yml summary with normalized selections.
| [in] | context | Summary context returned by _build_summary_context(). |
Definition at line 11526 of file core.py.
|
protected |
Build a curated monitor.yml summary with resolved defaults.
| [in] | context | Summary context returned by _build_summary_context(). |
Definition at line 11565 of file core.py.
|
protected |
Parse Continuity_Metrics.log into latest rows by step plus observed order.
| [in] | filepath | Argument passed to _parse_continuity_metrics_log(). |
_parse_continuity_metrics_log(). Definition at line 11601 of file core.py.
|
protected |
Parse Particle_Metrics.log into latest rows by step plus observed order.
| [in] | filepath | Argument passed to _parse_particle_metrics_log(). |
_parse_particle_metrics_log(). Definition at line 11646 of file core.py.
|
protected |
Parse per-block momentum convergence logs.
| [in] | log_dir | Argument passed to _parse_momentum_convergence_logs(). |
_parse_momentum_convergence_logs(). Definition at line 11702 of file core.py.
|
protected |
Parse per-block Poisson convergence logs.
| [in] | log_dir | Argument passed to _parse_poisson_convergence_logs(). |
_parse_poisson_convergence_logs(). Definition at line 11744 of file core.py.
|
protected |
Parse profiling timestep CSV into latest rows by step plus observed order.
| [in] | filepath | Argument passed to _parse_profiling_timestep_csv(). |
_parse_profiling_timestep_csv(). Definition at line 11783 of file core.py.
|
protected |
Parse Runtime_Memory.log into latest rows by step and final status.
| [in] | filepath | Runtime memory log path. |
Definition at line 11815 of file core.py.
|
protected |
Parse solution_convergence.log into latest rows by step plus observed order.
The log format uses pipe-delimited aligned columns. The first line of the file is a banner (starts with '=') containing the mode tag; the second line is the column header; the third line is a separator (starts with '-'). Subsequent lines are one data row per timestep.
| [in] | filepath | Path to solution_convergence.log. |
Definition at line 11875 of file core.py.
|
protected |
Return plausible solver stream logs for local and Slurm runs.
| [in] | run_dir | Argument passed to _find_solver_stream_log_candidates(). |
| [in] | log_dir | Argument passed to _find_solver_stream_log_candidates(). |
_find_solver_stream_log_candidates(). Definition at line 11933 of file core.py.
|
protected |
Parse sampled particle snapshots from a solver stream log.
| [in] | filepath | Argument passed to _parse_particle_snapshot_file(). |
_parse_particle_snapshot_file(). Definition at line 11955 of file core.py.
|
protected |
Return the nearest earlier snapshot step when available.
| [in] | snapshot_steps | Argument passed to _find_previous_snapshot_step(). |
| [in] | step | Argument passed to _find_previous_snapshot_step(). |
_find_previous_snapshot_step(). Definition at line 12006 of file core.py.
|
protected |
Compute sampled deltas between two particle snapshot samples.
| [in] | current_rows | Argument passed to _compute_particle_snapshot_delta(). |
| [in] | previous_rows | Argument passed to _compute_particle_snapshot_delta(). |
_compute_particle_snapshot_delta(). Definition at line 12019 of file core.py.
|
protected |
Build sampled diagnostics for one particle console snapshot.
| [in] | source | Argument passed to _build_particle_snapshot_summary(). |
| [in] | step | Argument passed to _build_particle_snapshot_summary(). |
| [in] | rows | Argument passed to _build_particle_snapshot_summary(). |
| [in] | preview_rows | Argument passed to _build_particle_snapshot_summary(). |
| [in] | particle_console_output_freq | Argument passed to _build_particle_snapshot_summary(). |
| [in] | particle_log_interval | Argument passed to _build_particle_snapshot_summary(). |
| [in] | previous_step | Argument passed to _build_particle_snapshot_summary(). |
| [in] | previous_rows | Argument passed to _build_particle_snapshot_summary(). |
_build_particle_snapshot_summary(). Definition at line 12087 of file core.py.
|
protected |
Locate and summarize a particle console snapshot for one step.
| [in] | run_dir | Argument passed to _find_particle_snapshot_for_step(). |
| [in] | log_dir | Argument passed to _find_particle_snapshot_for_step(). |
| [in] | step | Argument passed to _find_particle_snapshot_for_step(). |
| [in] | preview_rows | Argument passed to _find_particle_snapshot_for_step(). |
| [in] | particle_console_output_freq | Argument passed to _find_particle_snapshot_for_step(). |
| [in] | particle_log_interval | Argument passed to _find_particle_snapshot_for_step(). |
_find_particle_snapshot_for_step(). Definition at line 12264 of file core.py.
|
protected |
Select a step to summarize from available metric artifacts.
| [in] | requested_step | Argument passed to _resolve_summary_step(). |
| [in] | continuity_rows | Argument passed to _resolve_summary_step(). |
| [in] | particle_rows | Argument passed to _resolve_summary_step(). |
| [in] | momentum_rows | Argument passed to _resolve_summary_step(). |
| [in] | poisson_rows | Argument passed to _resolve_summary_step(). |
| [in] | profiling_rows | Argument passed to _resolve_summary_step(). |
| [in] | memory_rows | Argument passed to _resolve_summary_step(). |
| [in] | convergence_rows | Argument passed to _resolve_summary_step(). |
| [in] | step_orders | Argument passed to _resolve_summary_step(). |
| [in] | selection_mode | Argument passed to _resolve_summary_step(). |
_resolve_summary_step(). Definition at line 12308 of file core.py.
|
protected |
Format optional numeric values for summary text output.
| [in] | value | Argument passed to _format_summary_float(). |
| [in] | spec | Argument passed to _format_summary_float(). |
| [in] | missing | Argument passed to _format_summary_float(). |
_format_summary_float(). Definition at line 12359 of file core.py.
|
protected |
Return the newest modification time among one or more summary sources.
| [in] | paths | Path string, iterable of paths, or mapping of paths. |
Definition at line 12372 of file core.py.
|
protected |
Order observed step sequences by the recency of their source files.
| [in] | sources | Pairs of observed steps and filesystem source path(s). |
Definition at line 12389 of file core.py.
| dict picurv_cli.core.build_run_summary_payload | ( | str | run_dir, |
| "int | None" | step = None, |
||
| int | snapshot_rows = 5, |
||
| str | selection_mode = "latest" |
||
| ) |
Build a read-only run-step summary from existing PICurv artifacts.
| [in] | run_dir | Argument passed to build_run_summary_payload(). |
| [in] | step | Argument passed to build_run_summary_payload(). |
| [in] | snapshot_rows | Argument passed to build_run_summary_payload(). |
| [in] | selection_mode | Argument passed to build_run_summary_payload(). |
build_run_summary_payload(). Definition at line 12403 of file core.py.
| picurv_cli.core.render_run_summary | ( | dict | payload, |
| str | output_format = "text" |
||
| ) |
Render a run-step summary in human or JSON form.
| [in] | payload | Argument passed to render_run_summary(). |
| [in] | output_format | Argument passed to render_run_summary(). |
Definition at line 12579 of file core.py.
|
protected |
Format one configuration-summary value for compact text output.
| [in] | value | Value to format. |
Definition at line 12809 of file core.py.
|
protected |
Print a strong dashboard-style configuration summary header.
| [in] | title | Section title. |
| [in] | subtitle | Optional one-line section subtitle. |
Definition at line 12830 of file core.py.
|
protected |
Print an aligned configuration-summary field group.
| [in] | title | Group title. |
| [in] | rows | Sequence of (label, value) pairs. |
Definition at line 12843 of file core.py.
|
protected |
Flatten nested summary mappings into readable dotted field rows.
| [in] | mapping | Mapping to flatten. |
| [in] | prefix | Optional parent-field prefix. |
(field, value) pairs. Definition at line 12858 of file core.py.
|
protected |
Render run metadata as a compact dashboard.
| [in] | summary | Curated run overview mapping. |
Definition at line 12875 of file core.py.
|
protected |
Render the case summary as a glanceable simulation dashboard.
| [in] | summary | Curated case configuration mapping. |
Definition at line 12901 of file core.py.
|
protected |
Render the solver summary as a glanceable numerical-method dashboard.
| [in] | summary | Curated solver configuration mapping. |
Definition at line 12972 of file core.py.
|
protected |
Render the monitor summary as a glanceable observability dashboard.
| [in] | summary | Curated monitor configuration mapping. |
Definition at line 13009 of file core.py.
| picurv_cli.core.render_selected_summary | ( | dict | payload, |
| str | output_format = "text" |
||
| ) |
Render selected timestep-independent config views and optional health.
| [in] | payload | Combined selected summary payload. |
| [in] | output_format | Output format. |
Definition at line 13060 of file core.py.
|
protected |
Append one numeric append-ordered record for summarize plotting.
| [out] | records | Destination record list. |
| [in] | source | Qualified source prefix. |
| [in] | step | Logged timestep. |
| [in] | line | Human-readable line identity. |
| [in] | values | Candidate field mapping. |
| [in] | source_path | Source artifact path. |
| [in] | segment | Zero-based continuation segment within the source artifact. |
Definition at line 13093 of file core.py.
|
protected |
Return whether a log line starts a new continuation segment.
| [in] | line | Candidate raw or stripped log line. |
Definition at line 13120 of file core.py.
|
protected |
Collect append-ordered numeric records from summarize-supported scalar logs.
| [in] | context | Summary context returned by _build_summary_context(). |
Definition at line 13129 of file core.py.
Build available qualified-series metadata from plot records.
| [in] | records | Append-ordered plot record list. |
Definition at line 13312 of file core.py.
|
protected |
Build one normalized plot.gen request from collected summarize records.
| [in] | context | Summary context returned by _build_summary_context(). |
| [in] | records | Append-ordered plot record list. |
| [in] | series | Qualified series name. |
| [in] | last_n | Optional last-N records per plotted line. |
| [in] | linear_y | Whether to force linear scaling. |
| [in] | output_path | Optional explicit output path. |
Definition at line 13336 of file core.py.
|
protected |
Render available summarize plot-series metadata.
| [in] | catalog | Available series catalog. |
| [in] | output_format | Text or JSON output format. |
Definition at line 13386 of file core.py.
|
protected |
Invoke standalone plot.gen with one normalized request over stdin.
| [in] | request | Versioned normalized plot request. |
Definition at line 13403 of file core.py.
| picurv_cli.core.summarize_workflow | ( | args | ) |
Build and render a read-only health summary for a run step.
| [in] | args | Command-line style argument list supplied to the function. |
Definition at line 13427 of file core.py.
|
protected |
Resolve a run/study submission target from explicit directory flags.
| [in] | run_dir | Argument passed to _resolve_submission_target(). |
| [in] | study_dir | Argument passed to _resolve_submission_target(). |
_resolve_submission_target(). Definition at line 13548 of file core.py.
|
protected |
Return stored metadata for one staged submission target.
| [in] | target_context | Argument passed to _get_submission_stage_metadata(). |
| [in] | stage_name | Argument passed to _get_submission_stage_metadata(). |
_get_submission_stage_metadata(). Definition at line 13634 of file core.py.
|
protected |
Return stage names explicitly recorded in scheduler submission metadata.
| [in] | target_context | Argument passed to _get_recorded_submission_stages(). |
_get_recorded_submission_stages(). Definition at line 13654 of file core.py.
|
protected |
Format a human-readable stage list for submit diagnostics.
| [in] | stage_names | Argument passed to _format_stage_list(). |
_format_stage_list(). Definition at line 13677 of file core.py.
|
protected |
Build an actionable hint for requested submit stages missing from metadata.
| [in] | target_context | Argument passed to _build_submit_missing_stage_hint(). |
| [in] | requested_stage | Argument passed to _build_submit_missing_stage_hint(). |
| [in] | selected_stages | Argument passed to _build_submit_missing_stage_hint(). |
_build_submit_missing_stage_hint(). Definition at line 13686 of file core.py.
|
protected |
Persist one stage's metadata back into the submission payload.
| [in] | target_context | Argument passed to _set_submission_stage_metadata(). |
| [in] | stage_name | Argument passed to _set_submission_stage_metadata(). |
| [in] | stage_meta | Argument passed to _set_submission_stage_metadata(). |
Definition at line 13751 of file core.py.
|
protected |
Write updated submission metadata back to disk.
| [in] | target_context | Argument passed to _write_submission_target_metadata(). |
Definition at line 13771 of file core.py.
| picurv_cli.core.submit_staged_jobs | ( | args | ) |
Submit previously staged Slurm artifacts from an existing run/study directory.
| [in] | args | Command-line style argument list supplied to the function. |
Definition at line 13786 of file core.py.
| picurv_cli.core.submit_staged_local_run | ( | args, | |
| dict | target_context, | ||
| list | selected_stages | ||
| ) |
Execute previously staged local run commands from scheduler/submission.json.
| [in] | args | Command-line style argument list supplied to the function. |
| [in] | target_context | Resolved submission target context. |
| [in] | selected_stages | Ordered stage names selected by the user. |
Definition at line 13908 of file core.py.
| picurv_cli.core.cancel_run_jobs | ( | args | ) |
Cancel Slurm-submitted jobs for an existing run directory.
| [in] | args | Command-line style argument list supplied to the function. |
Definition at line 14006 of file core.py.
| picurv_cli.core.init_case | ( | args | ) |
Implements the 'init' command.
Creates a new case study directory by copying a template. Runtime binaries are resolved from the project bin/ directory via PATH; use 'sync-binaries' to pin specific versions locally.
| [in] | args | The command-line arguments parsed by argparse. |
Definition at line 14127 of file core.py.
| picurv_cli.core.sync_case_binaries_command | ( | args | ) |
Refresh case-local executables from the source repository bin directory.
| [in] | args | Command-line style argument list supplied to the function. |
Definition at line 14213 of file core.py.
| picurv_cli.core.sync_case_config_command | ( | args | ) |
Refresh template-managed config/docs files in a case directory.
| [in] | args | Command-line style argument list supplied to the function. |
Definition at line 14244 of file core.py.
| picurv_cli.core.pull_source_repo | ( | args | ) |
Refresh source branches in the repository resolved from a case directory.
| [in] | args | Command-line style argument list supplied to the function. |
Definition at line 14296 of file core.py.
| picurv_cli.core.build_project | ( | args | ) |
Implements the 'build' command.
Executes the top-level Makefile directly, passing through any additional arguments to make. This allows for building, cleaning, and other Makefile targets via the orchestrator without maintaining a separate build wrapper script.
| [in] | args | The command-line arguments parsed by argparse. |
Definition at line 14336 of file core.py.
| picurv_cli.core.np = _LazyNumpyProxy() |
| picurv_cli.core.PACKAGE_PATH = os.path.dirname(os.path.realpath(__file__)) |
| picurv_cli.core.PACKAGE_PROJECT_ROOT = os.path.dirname(PACKAGE_PATH) |
| picurv_cli.core.INVOKED_SCRIPT_DIR |
| picurv_cli.core.SCRIPT_PATH |
| picurv_cli.core.PROJECT_ROOT = os.path.dirname(SCRIPT_PATH) |
| picurv_cli.core.GENERATORS_PATH = os.path.join(PACKAGE_PROJECT_ROOT, "generators") |
| picurv_cli.core.DEFAULT_BIN_DIR = SCRIPT_PATH |
| str picurv_cli.core.CASE_ORIGIN_METADATA_FILENAME = ".picurv-origin.json" |
| str picurv_cli.core.RUNTIME_EXECUTION_CONFIG_FILENAME = ".picurv-execution.yml" |
| str picurv_cli.core.LEGACY_LOCAL_RUNTIME_CONFIG_FILENAME = ".picurv-local.yml" |
| str picurv_cli.core.RUNTIME_EXECUTION_EXAMPLE_FILENAME = "execution.example.yml" |
| tuple picurv_cli.core.RUNTIME_EXECUTION_CONFIG_FILENAMES |
| str picurv_cli.core.DEFAULT_RUNTIME_EXECUTION_CONFIG_TEMPLATE |
| str picurv_cli.core.CLUSTER_TEMPLATE_PLACEHOLDER_ACCOUNT = "my_project_account" |
| str picurv_cli.core.CLUSTER_TEMPLATE_PLACEHOLDER_MAIL = "user@example.edu" |
| dict picurv_cli.core.DEFAULT_WALLTIME_GUARD_POLICY |
| str picurv_cli.core.WALLTIME_GUARD_ENV_JOB_START_EPOCH = "PICURV_JOB_START_EPOCH" |
| str picurv_cli.core.WALLTIME_GUARD_ENV_LIMIT_SECONDS = "PICURV_WALLTIME_LIMIT_SECONDS" |
| str picurv_cli.core.POST_RESUME_STATE_FILENAME = "post.resume.json" |
| str picurv_cli.core.POST_LOCK_METADATA_FILENAME = "post.lock.json" |
| str picurv_cli.core.POST_LOCK_WRAPPER_FILENAME = "post_lock_wrapper.py" |
| dict picurv_cli.core.POST_RECIPE_SIGNATURE_EXCLUDED_KEYS = {"startTime", "endTime"} |
| tuple picurv_cli.core.POST_REQUIRED_EULERIAN_SOURCE_BASENAMES = ("ufield", "vfield", "pfield", "nvfield") |
| str picurv_cli.core.ERROR_CODE_CLI_USAGE_INVALID = "CLI_USAGE_INVALID" |
| str picurv_cli.core.ERROR_CODE_CFG_MISSING_SECTION = "CFG_MISSING_SECTION" |
| str picurv_cli.core.ERROR_CODE_CFG_MISSING_KEY = "CFG_MISSING_KEY" |
| str picurv_cli.core.ERROR_CODE_CFG_INVALID_TYPE = "CFG_INVALID_TYPE" |
| str picurv_cli.core.ERROR_CODE_CFG_INVALID_VALUE = "CFG_INVALID_VALUE" |
| str picurv_cli.core.ERROR_CODE_CFG_FILE_NOT_FOUND = "CFG_FILE_NOT_FOUND" |
| str picurv_cli.core.ERROR_CODE_CFG_GRID_PARSE = "CFG_GRID_PARSE" |
| str picurv_cli.core.ERROR_CODE_CFG_INCONSISTENT_COMBO = "CFG_INCONSISTENT_COMBO" |
| str picurv_cli.core.ERROR_CODE_DEPENDENCY_MISSING = "DEPENDENCY_MISSING" |
|
protected |
| dict picurv_cli.core.POST_RUN_CONTROL_ALIASES |
| dict picurv_cli.core.GRID_GENERATOR_HYPHEN_KEY_HINTS |
| dict picurv_cli.core.GENERATED_PROFILE_GENERATORS = {"square_duct_poiseuille"} |
| dict picurv_cli.core.BC_FACE_MAP |
| dict picurv_cli.core.BC_TYPE_MAP |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| dict picurv_cli.core.DIAGNOSTICS_PETSC_KEYS |
| tuple picurv_cli.core.GRID_DA_PROCESSOR_KEYS = ("da_processors_x", "da_processors_y", "da_processors_z") |
| dict picurv_cli.core.SOLVER_MONITORING_POISSON_FLAG_MAP |
|
protected |