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. | |
| str | _read_release_version () |
| Read the single release version shared by every PICurv executable. | |
| dict | _source_build_identity (str release_version) |
| Resolve reproducible release, commit, and dirty-tree build identity. | |
| _find_named_file_upwards (str start, str filename) | |
| Find a named file at or above an arbitrary filesystem anchor. | |
| find_workspace_root (*anchors) | |
| Locate the nearest initialized PICurv workspace for supplied anchors. | |
| dict | load_workspace_config (str workspace_root) |
| Load and validate the immutable workspace identity/configuration file. | |
| dict | enforce_workspace_version (str workspace_root) |
| Enforce an optional workspace PICurv version requirement. | |
| dict | enforce_reproducibility_policy (str workspace_root) |
| Enforce an optional workspace policy demanding a clean, released build. | |
| str | resolve_workspace_path (str anchor_file, str candidate, *bool allow_external=False) |
| Resolve a user path against its workspace and reject implicit escapes. | |
| None | ensure_workspace_layout (str workspace_root) |
| Materialize the uniform, cheap directory skeleton for one workspace. | |
| str | initialize_workspace_root (str workspace_root, str template_name) |
| Create the workspace skeleton and its identity file at one root. | |
| None | ensure_run_layout (str run_dir) |
| Materialize the uniform, cheap directory skeleton for one run. | |
| tuple | validate_run_directory_structure (str run_dir) |
| Refuse a run whose root has grown a directory the layout does not define. | |
| None | enforce_run_directory_structure (str run_dir) |
Apply validate_run_directory_structure() as a refusal at run time. | |
| str | case_run_label (dict case_cfg, str case_path) |
| Resolve the stable human-facing portion of a generated run identifier. | |
| str | allocate_generated_run_id (str runs_root, dict case_cfg, str case_path) |
| Build the generated run identity, disambiguating a same-second collision. | |
| bool | discard_unused_run_directory (str run_dir, *bool created) |
| Remove a generated run directory that never received any content. | |
| _file_sha256 (str path) | |
| Content digest of one file, or None when it cannot be read. | |
| dict | build_software_lock () |
| Capture the exact software identity a run is about to execute with. | |
| dict | _toolchain_identity () |
| Best-effort record of the PETSc, MPI, and compiler the binaries were built on. | |
| str | write_software_lock (str run_dir) |
| Write the run's software lock beside its asset lock. | |
| str | workspace_artifact_root (str workspace_root, str kind) |
| Return the canonical workspace-owned root for runs or studies. | |
| _relative_to_workspace (str path, str workspace_root) | |
| Return a portable workspace-relative path when possible. | |
| dict | snapshot_run_configuration (str run_dir, dict source_paths, bool continuation=False) |
| Snapshot editable YAML inputs without erasing prior continuation state. | |
| dict | load_active_run_configuration (str run_dir) |
| Load the active immutable configuration revision for a run. | |
| dict | archive_active_generated_configuration (str run_dir, list paths) |
| Preserve generated control sidecars beside a continuation's YAML revision. | |
| dict | _run_component_states (str run_dir, dict stages_requested) |
| Report each run component's home, retention class, and lifecycle state. | |
| dict | build_run_lineage (str parent_run_dir, int checkpoint_step, *workspace_root=None, statistics_state=None, requested_source=None) |
| Record which run and which checkpoint a branched run was started from. | |
| dict | build_run_manifest (str run_dir, str run_id, *workspace_root=None, str launch_mode="local", int num_procs=1, int post_num_procs=1, stages_requested=None, stages_completed=None, inputs=None, asset_lock=None, submission=None, lineage=None, str artifact_type="run", study_id=None, case_id=None) |
| Build the authoritative run identity, topology, and lifecycle manifest. | |
| str | _checkpoint_bundle_path (str source_dir, int step) |
| Resolve a run/output root or an exact checkpoint bundle. | |
| dict | _read_checkpoint_options (str metadata_path) |
| Parse the deliberately small PETSc-options checkpoint manifest. | |
| dict | validate_committed_checkpoint (str source_dir, int step, bool require_particles=False) |
| Validate one committed bundle using the same manifest contract as C. | |
| "set[int]" | _scan_committed_checkpoint_steps (str source_dir, bool require_particles=False) |
| Return only fully validated, committed checkpoint steps. | |
| 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. | |
| dict | read_binary_build_identity (str executable_path) |
| Read the build identity a native executable was compiled with. | |
| dict | runtime_build_identities () |
| Read the build identity of every native executable a run would launch. | |
| list | build_identity_problems (dict identities, workspace_requirement=None) |
| Report every reason the active build identity is not internally coherent. | |
| list | warn_on_stale_runtime_binaries (dict identities) |
| Report native executables whose build identity is not the active source. | |
| 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) | |
| Separate a validation error into its source-file and message fields 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. | |
| list | reject_generator_destination_keys (generator, str case_path, str label) |
| Reject generator settings that try to choose their own output destination. | |
| 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 | normalize_post_spectra_config (dict post_cfg) |
| Validate and canonicalize the spectra block of post.yml. | |
| list | validate_post_spectra_preconditions (dict spectra_cfg, dict case_cfg, str post_path) |
| Check spectra tasks against what the case can actually support. | |
| str | _resolve_spectra_payload (dict bundle, str kind, str field, int block) |
| Locate one checkpoint payload by its inventory entry rather than by path shape. | |
| list | _spectra_mean_arguments (dict task_cfg, dict bundle, dict mean_bundle=None) |
| Build the generator arguments implementing a task's fluctuation choice. | |
| set | resolve_post_stage_selection (only) |
Resolve the --only selector into the set of post stages to execute. | |
| dict | run_post_spectra_stage (str run_dir, dict post_cfg, dict monitor_cfg, str source_dir, steps, bool quiet=False) |
| Measure spectra for every requested task across a window of committed steps. | |
| str | compute_post_spectra_signature (dict spectra_cfg) |
| Reduce a normalized spectra recipe to a stable identity string. | |
| str | resolve_post_spectra_output_dir (monitor_cfg=None) |
| Resolve the run-relative directory spectra CSVs are written to. | |
| str | resolve_recipe_spectra_output_dir (dict post_cfg, monitor_cfg=None) |
| Resolve the canonical spectra directory for one versioned recipe. | |
| list | get_post_spectra_output_artifacts (dict post_cfg, str run_dir, monitor_cfg=None) |
| Predict the spectra CSV paths a recipe will write. | |
| str | post_spectra_task_basename (dict task_cfg, str output_prefix) |
| Build the file basename one normalized spectra task writes. | |
| dict | normalize_post_field_statistics_config (dict post_cfg) |
| Validate and canonicalize the field_statistics block of post.yml. | |
| int | _post_window_derived_field_count (dict window_cfg, list outputs) |
| Count the derived fields one window would produce for a set of outputs. | |
| bool | _post_requests_field_statistics (dict post_cfg) |
| Return whether the current post recipe derives accumulated field statistics. | |
| get_post_field_statistics_artifacts (dict post_cfg, str run_dir) | |
| Predict the per-window statistics artifacts a recipe will produce. | |
| dict | build_post_recipe_config (dict post_cfg, monitor_cfg=None) |
| Build the flat key=value mapping consumed by the C post-processor. | |
| str | compute_post_recipe_id (dict post_cfg) |
| Compute a stable human-readable identity for one post recipe. | |
| "tuple[dict, str]" | apply_canonical_post_paths (dict post_cfg, str run_dir) |
| Route every post artifact into its fixed analysis or visualization home. | |
| 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, dict post_cfg=None) |
| Return the JSON resume metadata path for a run directory. | |
| str | get_post_recipe_root (str run_dir, dict post_cfg) |
| Return the versioned run-local control directory for one post recipe. | |
| dict | get_post_lock_paths (str run_dir, str recipe_id=None) |
| 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) |
| Collect step numbers from VTK files named with a prefix, step suffix, and extension. | |
| "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. | |
| str | compute_physical_case_identity (dict case_cfg) |
| Compute the hidden identity used to guard in-place continuation. | |
| None | validate_continue_case_identity (str run_dir, dict case_cfg) |
| Reject in-place continuation when the physical case has changed. | |
| populate_restart_directory (str source_output, str target_restart, int start_step, dict monitor_cfg, "int | None" end_step=None, bool materialize=True) | |
| Atomically materialize an immutable checkpoint interval into a run. | |
| validate_eulerian_checkpoint (str source_dir, int step, dict monitor_cfg) | |
Validate the mandatory Eulerian field set required by ReadSimulationFields(). | |
| detect_last_checkpoint_step (str output_dir) | |
| 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. | |
| str | resolve_latest_restart_run (dict case_cfg, str case_path, int start_step) |
| Select the newest local workspace run compatible with a requested restart. | |
| resolve_restart_source (args, dict case_cfg, dict solver_cfg, dict monitor_cfg, str run_dir, bool materialize=True) | |
| 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. | |
| str | format_picgrid_coordinate (float value) |
| Format a coordinate with round-trip-safe binary64 precision. | |
| 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. | |
| list | validate_grid_generator_cli_args (cli_args, str case_path) |
| Check closed-choice values inside the generator's opaque token list. | |
| str | run_grid_generator (str case_path, str run_dir, dict grid_cfg, dict case_cfg=None) |
| Runs generators/grid.gen to produce a PICGRID file for this run. | |
| 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. | |
| float | _to_finite_float (value, str field_name) |
| Convert a non-boolean YAML scalar to a finite float. | |
| 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. | |
| set | _les_periodic_axes (dict case_cfg) |
| Reports which logical axes a case declares periodic on both faces. | |
| validate_wall_model_pairing (dict case_cfg, les_cfg, rans_cfg, wall_cfg, str case_path, list errors, list warnings) | |
| Rejects wall-model selections that no turbulence treatment can support. | |
| _case_reynolds_number (dict case_cfg) | |
| Reynolds number implied by a case's scaling and fluid properties. | |
| validate_les_configuration (dict case_cfg, dict les_cfg, str case_path, list errors, list warnings) | |
| Checks the structured LES block for values the closure cannot honour. | |
| 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. | |
| str | directory_value_charset_problem (str value) |
| Describe why a directory value cannot be written to a PETSc options line. | |
| str | classify_run_directory_value (value) |
| Classify a configured run directory value. | |
| str | normalized_run_directory (str value) |
| Normalized, comparable form of a contained run directory value. | |
| bool | paths_overlap (str first, str second) |
| Whether two run-relative directories are the same or nested in one another. | |
| tuple | resolve_unsafe_paths_override (dict dirs, str monitor_path) |
| Resolve the unsafe-paths override, requiring a real YAML boolean. | |
| tuple | evaluate_run_directories (dict values, bool override, set explicit=None) |
| Apply every run-directory safety rule to a set of effective directory values. | |
| list | classify_physical_containment (str run_dir, dict values) |
| Classify where each run-owned directory physically lands. | |
| list | check_physical_containment (str run_dir, dict values) |
| Human-readable physical containment violations. | |
| dict | effective_run_directories (dict configured) |
| Fill in defaults for run-owned directories that were not configured. | |
| tuple | validate_run_directory_containment (dict monitor_cfg, str monitor_path) |
| Classify legacy directory values as defense-in-depth during validation. | |
| list | validate_reserved_directory_flags (dict config, str config_path, str label) |
| Reject raw PETSc passthrough options that set run-owned directories. | |
| validate_simulation_configs (dict case_cfg, dict solver_cfg, dict monitor_cfg, str case_path, str solver_path, str monitor_path) | |
| Validates every configuration a simulation run consumes, before any work is done. | |
| "tuple[list, list]" | check_post_checkpoint_cadence_alignment (dict post_cfg, dict monitor_cfg, str post_path, str monitor_path="monitor.yml") |
| Report post step selections that cannot land on a committed checkpoint. | |
| validate_post_config (dict post_cfg, str post_path, dict monitor_cfg=None, dict case_cfg=None) | |
| 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. | |
| dict | flatten_study_parameters (dict parameters) |
| Flatten grouped study overrides into scalar dotted-path columns. | |
| 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) |
| Canonicalize a user-supplied filename extension by trimming whitespace and leading dots. | |
| list | resolve_conductor_entry_point () |
| Resolve how to invoke this conductor again from a batch script. | |
| list | build_spectra_follow_command (str run_dir, str post_path, dict post_cfg) |
| Build the batch-script step that measures spectra after the field stage. | |
| 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, list follow_commands=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. | |
| 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, str config_dir=None) |
| 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. | |
| dict | _diagnostic_info (value) |
| Validate PETSc info logging configuration. | |
| _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. | |
| bool | _statistics_subsystem_available (dict case_cfg, requirement) |
| Report whether the subsystem a statistics field depends on is active. | |
| dict | normalize_field_statistics_config (dict monitor_cfg, dict case_cfg=None) |
| Validate and canonicalize the field-statistics block of monitor.yml. | |
| list | resolve_field_statistics_flags (dict monitor_cfg, dict case_cfg=None) |
| Serialize field-statistics configuration into control-file option lines. | |
| "int | None" | resolve_statistics_console_output_frequency (dict io_cfg) |
| Resolve the statistics console cadence, mirroring the particle one. | |
| dict | normalize_solution_monitoring_config (dict monitor_cfg) |
| Validate and canonicalize physical-solution convergence monitoring. | |
| dict | resolve_solution_monitoring_flags (dict monitor_cfg) |
| Translate solution-monitoring YAML into the existing C convergence flags. | |
| dict | prepare_monitor_files (str run_dir, str run_id, dict monitor_cfg, dict source_files, str config_dir=None) |
| 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, str config_dir=None) |
| 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. | |
| None | validate_programmatic_generated_ic_grid_settings (dict raw_settings) |
| Validate scalar programmatic grid settings needed by file-generating IC providers. | |
| 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. | |
| dict | validate_newton_krylov_config (dict cfg) |
| Validate and normalize the structured Newton–Krylov solver block. | |
| 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. | |
| bool | is_generated_ic_provider (dict resolved_ic) |
| Return whether a resolved IC is backed by a registered file generator. | |
| dict | resolve_fluid_scaling (dict case_cfg) |
| Resolve the shared physical and nondimensional fluid scaling contract. | |
| dict | resolve_initial_condition_config (dict ic, prepared_blocks, float U_ref, provider_context=None) |
| 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_spectrum_generator (str field_path, str staged_grid, str spectrum_path, str case_dir) |
| Measure the shell-averaged spectrum of a staged initial condition. | |
| 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 kernel names to the C -les_test_filter_kernel flag. | |
| int | normalize_les_filter_width (value) |
| Maps LES grid-filter-width model names to the C -les_filter_width flag. | |
| int | normalize_les_averaging_mode (value) |
| Maps LES coefficient-averaging mode names to the C -les_averaging_mode flag. | |
| int | normalize_les_clip_mode (value) |
| Maps LES coefficient-limiting mode names to the C -les_clip_mode flag. | |
| str | normalize_les_averaging_directions (value) |
| Maps a list of homogeneous logical directions to the C flag's string form. | |
| int | normalize_rans_model (value) |
| Maps RANS model selectors to the current C -rans switch. | |
| int | normalize_wall_function_model (value) |
| Maps wall-function model selectors to the C -wallfunction flag. | |
| bool | resolve_enabled_flag (dict cfg, str path, bool default=True) |
Resolves a structured enabled flag and rejects non-boolean values. | |
| append_les_parameter_flags (dict les_cfg, list control_lines) | |
| Appends the LES closure parameter flags from a structured les block. | |
| append_turbulence_flags (dict models, list control_lines) | |
| Appends turbulence model flags from legacy or structured case.yml blocks. | |
| control_value (value, str context) | |
| Guard a value that is written verbatim into the generated control file. | |
| 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, str config_dir=None) | |
| 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. | |
| dict | _read_previous_metric_rows (str results_dir) |
| Read the metrics table an earlier aggregation wrote, keyed by case id. | |
| str | aggregate_study_metrics (dict study_cfg, list cases, str results_dir) |
| Collect metric values from generated case directories into one CSV. | |
| str | _study_parameter_label (str key) |
| Return a concise report label for a study parameter path. | |
| str | _study_metric_label (dict study_cfg, str metric) |
| Resolve an optional configured metric label or humanize its name. | |
| "list | None" | _numeric_study_column (list rows, str key) |
| Parse one complete, finite numeric study-table column. | |
| "dict | None" | _infer_study_plot_axis (dict study_cfg, list rows) |
| Infer the scientifically meaningful independent variable of a study. | |
| infer_plot_x_axis (dict study_cfg, list rows) | |
| Infer x-axis key/values for study plots. | |
| str | _format_study_group_value (value) |
| Format a secondary study parameter compactly for a legend. | |
| list | _study_plot_groups (dict study_cfg, list rows, dict axis, str metric) |
| Group metric points by any secondary varied study parameters. | |
| bool | _study_use_log_scale (list values, bool semantic_hint=False) |
| Use log scaling only for positive data spanning a meaningful range. | |
| "tuple[float, float] | None" | _study_linear_y_limits (list values) |
| Build padded linear limits that include zero for non-negative metrics. | |
| 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. | |
| str | _asset_file_sha256 (str path) |
| Hash an asset source or payload without loading it into memory. | |
| str | _stable_mapping_sha256 (payload) |
| Hash a JSON-compatible value with deterministic serialization. | |
| dict | _provider_source_fingerprints (value, str case_path, str key="") |
| Hash every existing file explicitly referenced by an asset provider. | |
| dict | build_case_asset_graph (dict case_cfg, str case_path) |
| Classify case inputs into precomputable or simulator-runtime providers. | |
| list | _asset_selection (dict graph, requested=None, *bool precomputable_only=False) |
| Resolve requested asset kinds plus dependency closure. | |
| list | _asset_payload_files (str build_root, str kind) |
| Enumerate canonical files belonging to one asset kind in a build tree. | |
| dict | _build_selected_asset_payloads (str build_root, dict case_cfg, str case_path, list selected) |
| Execute existing generators into one isolated run-like build tree. | |
| dict | _picgrid_geometry_summary (str path) |
| Read a canonical PICGRID and summarize what a user would want to check. | |
| bool | _write_structured_grid_preview (str picgrid_path, str destination, dims) |
| Write a single-block ASCII VTS preview of a staged PICGRID. | |
| dict | _build_asset_inspection (str kind, str build_root, dict provider, list payload_files) |
| Produce the inspection material published beside an asset's payload. | |
| dict | _publish_asset_object (str workspace_root, str build_root, dict provider, list payload_files) |
| Publish one immutable content-addressed asset object atomically. | |
| str | _workspace_asset_set_name (str workspace_root, str case_path) |
| Return a collision-free, readable mutable asset-set name. | |
| str | _write_workspace_asset_set (str workspace_root, str case_path, dict graph, dict references) |
| Atomically update the named asset set and workspace asset catalog. | |
| dict | precompute_case_assets (str workspace_root, dict case_cfg, str case_path, requested=None, bool precomputable_only=False) |
| Build and publish a selected deterministic asset dependency closure. | |
| str | _workspace_asset_set_path (str workspace_root, str case_path) |
| Return the mutable asset-set pointer associated with a case config name. | |
| dict | plan_run_assets (dict case_cfg, str case_path) |
| Plan reuse/build/runtime actions for all configured run providers. | |
| str | _materialize_asset_file (str source, str destination) |
| Expose one immutable shared-asset file through reflink, hardlink, or copy. | |
| dict | materialize_run_assets (str run_dir, dict case_cfg, str case_path, bool require_precomputed=False, bool fetch_missing=False) |
| Resolve/build workspace assets and write the exact run input lock. | |
| precompute_workflow (args) | |
| Resolve, preflight, and atomically publish reusable workspace assets. | |
| 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. | |
| str | _humanize_plot_identifier (str value) |
| Convert one machine-oriented identifier into a readable plot label. | |
| str | _summary_field_label (str field) |
| Return the report-facing label for one logged scalar field. | |
| "float | None" | _summary_physical_time (dict context, dict record) |
| Resolve a record's physical time from its artifact or copied case configuration. | |
| _read_runtime_diagnostics_csv (path) | |
Yields (segment, row) for each data line of a runtime diagnostics CSV. | |
| _append_summary_plot_record (list records, str source, step, str line, dict values, str source_path, int segment=0, dict coordinates=None) | |
| 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 | _collect_spectra_plot_records (dict context) |
| Collect the per-step scalar histories written by the spectra post stage. | |
| list | _build_summary_plot_catalog (list records) |
| Build available qualified-series metadata from plot records. | |
| list | _representative_indices (int count, int maximum=6) |
| Select evenly distributed indices while always retaining both endpoints. | |
| dict | _build_spectrum_plot_request (dict context, str task, bool reference, bool linear_y, "str | None" output_path) |
| Build a plot.gen request drawing representative measured spectra. | |
| 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. | |
| tuple | staged_control_directories (str control_path) |
| Read run-owned directory values from a staged control file. | |
| list | preflight_config_directories (str root_dir) |
| Every config directory under a run or study root that may hold a control file. | |
| tuple | preflight_staged_run_directories (str root_dir) |
| Re-check run-directory safety against an already-staged run or study. | |
| list | read_text_file_lines (str path) |
| Read a text file into a list of lines. | |
| 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. | |
| _workspace_yaml_role (str path) | |
| Infer the owned workspace role of one copied YAML file. | |
| _rewrite_workspace_path_values (value, dict replacements) | |
| Rewrite copied template path scalars to workspace-root-relative homes. | |
| _choose_primary_workspace_role (list candidates, str role, str template_name) | |
| Select the canonical role file from a template that may carry variants. | |
| dict | organize_initialized_workspace (str workspace_root, str template_name, str source_template_root=None) |
| Convert a copied example into the canonical editable workspace layout. | |
| dict | import_workspace_input (str workspace_root, str kind, str source, str name=None, str mode="copy") |
| Explicitly import or register one workspace input. | |
| inputs_workflow (args) | |
| Handle explicit workspace input management. | |
| version_workflow (args) | |
Report, and for the status action validate, the shared build identity. | |
| None | _require_clean_source_checkout (str action) |
| Refuse version-changing Git operations in a dirty source checkout. | |
| subprocess.CompletedProcess | _git_source_command (list arguments) |
| Run a checked Git command against the active PICurv source checkout. | |
| source_workflow (args) | |
| Fetch source history without silently changing the active code. | |
| _workspace_requested_version (str workspace_root) | |
| Resolve an exact version requested by an initialized workspace. | |
| versions_workflow (args) | |
| List or activate a release using the existing source/build owners. | |
| init_case (args) | |
| Implements the 'init' command. | |
| 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. | |
Variables | |
| _package_parent = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
| _storage_module = importlib.import_module("picurv_cli.storage") | |
| StorageError = _storage_module.StorageError | |
| cold_study_members = _storage_module.cold_study_members | |
| restore_cold_study_members = _storage_module.restore_cold_study_members | |
| is_artifact_cold = _storage_module.is_artifact_cold | |
| read_artifact_identity = _storage_module.read_artifact_identity | |
| STORAGE_LOCK_FILENAME = _storage_module.STORAGE_LOCK_FILENAME | |
| STORAGE_STATE_FILENAME = _storage_module.STORAGE_STATE_FILENAME | |
| require_storage_payload_local = _storage_module.require_storage_payload_local | |
| runtime_stage_lock = _storage_module.runtime_stage_lock | |
| storage_state_summary = _storage_module.storage_state_summary | |
| _NUMPY_MODULE = None | |
| _MATPLOTLIB_PYPLOT = None | |
| np = _LazyNumpyProxy() | |
| PACKAGE_PATH = os.path.dirname(os.path.realpath(__file__)) | |
| PACKAGE_PROJECT_ROOT = os.path.dirname(PACKAGE_PATH) | |
| INVOKED_SCRIPT_DIR | |
| SCRIPT_PATH | |
| PROJECT_ROOT = os.path.dirname(SCRIPT_PATH) | |
| GENERATORS_PATH = os.path.join(PACKAGE_PROJECT_ROOT, "generators") | |
| DEFAULT_BIN_DIR = SCRIPT_PATH | |
| VERSION_FILE = os.path.join(PACKAGE_PROJECT_ROOT, "VERSION") | |
| str | PICURV_RELEASE_VERSION = _read_release_version() |
| dict | PICURV_BUILD = _source_build_identity(PICURV_RELEASE_VERSION) |
| dict | PICURV_VERSION = PICURV_BUILD["version"] |
| str | CASE_ORIGIN_METADATA_FILENAME = ".picurv-origin.json" |
| str | WORKSPACE_CONFIG_FILENAME = ".picurv-workspace.yml" |
| int | WORKSPACE_SCHEMA_VERSION = 1 |
| int | RUN_MANIFEST_SCHEMA_VERSION = 3 |
| int | ASSET_MANIFEST_SCHEMA_VERSION = 1 |
| int | ASSET_LOCK_SCHEMA_VERSION = 1 |
| str | RUNTIME_EXECUTION_CONFIG_FILENAME = ".picurv-execution.yml" |
| str | LEGACY_LOCAL_RUNTIME_CONFIG_FILENAME = ".picurv-local.yml" |
| str | RUNTIME_EXECUTION_EXAMPLE_FILENAME = "execution.example.yml" |
| tuple | RUNTIME_EXECUTION_CONFIG_FILENAMES |
| str | DEFAULT_RUNTIME_EXECUTION_CONFIG_TEMPLATE |
| str | CLUSTER_TEMPLATE_PLACEHOLDER_ACCOUNT = "my_project_account" |
| str | CLUSTER_TEMPLATE_PLACEHOLDER_MAIL = "user@example.edu" |
| dict | DEFAULT_WALLTIME_GUARD_POLICY |
| str | WALLTIME_GUARD_ENV_JOB_START_EPOCH = "PICURV_JOB_START_EPOCH" |
| str | WALLTIME_GUARD_ENV_LIMIT_SECONDS = "PICURV_WALLTIME_LIMIT_SECONDS" |
| str | POST_RESUME_STATE_FILENAME = "post.resume.json" |
| str | POST_LOCK_FILENAME = "post.lock" |
| str | POST_LOCK_METADATA_FILENAME = "post.lock.json" |
| str | POST_LOCK_WRAPPER_FILENAME = "post_lock_wrapper.py" |
| int | POST_RESUME_SCHEMA_VERSION = 1 |
| dict | POST_RECIPE_SIGNATURE_EXCLUDED_KEYS = {"startTime", "endTime"} |
| str | CHECKPOINT_FORMAT = "picurv-checkpoint" |
| int | CHECKPOINT_VERSION = 1 |
| int | CHECKPOINT_STEP_WIDTH = 12 |
| dict | CHECKPOINT_REQUIRED_EULERIAN_FIELDS = {"Ucat", "Ucont", "Ucont_rm1", "P", "Nvert"} |
| tuple | WORKSPACE_DIRECTORY_LAYOUT |
| tuple | RUN_DIRECTORY_LAYOUT |
| dict | CANONICAL_RUN_PATHS |
| INITIAL_CONDITION_SPECTRUM_RELPATH | |
| dict | _WORKSPACE_ARTIFACT_ROOT_VALUES = {"runs", "studies"} |
| dict | _ASSET_SOURCE_REFERENCE_KEYS |
| dict | _PYTHON_INITIAL_CONDITION_PROVIDERS = {"ic_gen", "spectral_random_velocity"} |
| dict | _FILE_BACKED_GRID_VALUES = {"file", "grid_gen"} |
| dict | _WORKSPACE_MANAGED_PATHS = {"assets", "inputs", "runs", "studies"} |
| dict | _VENDORABLE_CONFIG_REFERENCE_KEYS = {"config_file", "script"} |
| dict | _PLAIN_FILENAME_SENTINELS = {"", ".", ".."} |
| dict | _VERSION_BUILD_ACTIONS = {"install", "activate"} |
| RUN_DIRECTORY_ROOTS | |
| RUN_ROOT_ALLOWED_FILES = frozenset({"manifest.json"}) | |
| STORAGE_OFFLOADED_STATES = frozenset({"COLD", "PARTIAL"}) | |
| tuple | RUN_COMPONENT_STATES |
| tuple | RUN_COMPONENT_LAYOUT |
| _BINARY_VERSION_PATTERN | |
| str | ERROR_CODE_CLI_USAGE_INVALID = "CLI_USAGE_INVALID" |
| str | ERROR_CODE_CFG_MISSING_SECTION = "CFG_MISSING_SECTION" |
| str | ERROR_CODE_CFG_MISSING_KEY = "CFG_MISSING_KEY" |
| str | ERROR_CODE_CFG_INVALID_TYPE = "CFG_INVALID_TYPE" |
| str | ERROR_CODE_CFG_INVALID_VALUE = "CFG_INVALID_VALUE" |
| str | ERROR_CODE_CFG_FILE_NOT_FOUND = "CFG_FILE_NOT_FOUND" |
| str | ERROR_CODE_CFG_GRID_PARSE = "CFG_GRID_PARSE" |
| str | ERROR_CODE_CFG_INCONSISTENT_COMBO = "CFG_INCONSISTENT_COMBO" |
| str | ERROR_CODE_DEPENDENCY_MISSING = "DEPENDENCY_MISSING" |
| tuple | RESTART_RUN_DIR_REQUIRED_MESSAGE |
| dict | _ERROR_HINTS |
| dict | POST_RUN_CONTROL_ALIASES |
| dict | GRID_GENERATOR_HYPHEN_KEY_HINTS |
| tuple | RETIRED_GENERATOR_DESTINATION_KEYS |
| dict | POST_SPECTRA_TASKS |
| tuple | POST_SPECTRA_SYMBOLS = ("continuum", "discrete") |
| tuple | POST_SPECTRA_MEAN_MODES = ("none", "domain") |
| tuple | POST_FIELD_STATISTICS_OUTPUTS = ("mean", "reynolds_stress", "rms", "tke", "flux") |
| tuple | POST_FIELD_STATISTICS_FORMATS = ("vtk", "csv") |
| tuple | GRID_MODES = ("file", "programmatic_c", "grid_gen") |
| tuple | GRID_GENERATOR_TYPES = ("box", "sweep") |
| tuple | GRID_CROSS_SECTION_KINDS = ("rectangle", "circle") |
| tuple | GRID_WALL_SEGMENT_KINDS = ("flat", "step", "ramp", "arc", "sine", "gaussian", "hill") |
| tuple | GRID_PATH_SEGMENT_KINDS = ("straight", "arc") |
| tuple | GRID_TRANSFORM_KINDS = ("anchor", "translate", "scale", "rotate", "mirror", "permute") |
| tuple | PARTICLE_RESTART_MODES = ("init", "load") |
| tuple | POST_EULERIAN_PIPELINE_TASKS = ("q_criterion", "normalize_field", "nodal_average") |
| tuple | POST_LAGRANGIAN_PIPELINE_TASKS = ("specific_ke",) |
| tuple | STUDY_TYPES = ("grid_independence", "timestep_independence", "sensitivity") |
| tuple | NEWTON_KRYLOV_PRECONDITIONER_MODELS = ("none", "frozen_momentum_jacobian") |
| tuple | NEWTON_KRYLOV_PRECONDITIONER_STRUCTURES = ("none", "point_block") |
| tuple | POISSON_PRECONDITIONER_TYPES = ("multigrid",) |
| dict | POISSON_PRECONDITIONER_SPELLINGS = {"mg": "multigrid", "pcmg": "multigrid"} |
| tuple | PRESCRIBED_FLOW_SOURCE_TYPES = ("file", "generated", "field_slice") |
| tuple | VERIFICATION_SCALAR_PROFILES = ("CONSTANT", "LINEAR_X", "SIN_PRODUCT") |
| tuple | STUDY_PLOT_FORMATS = ("png", "pdf", "svg") |
| tuple | PROFILING_TIMESTEP_MODES = ("off", "selected", "all") |
| tuple | GMRES_RESTART_METHODS = ("gmres", "fgmres", "lgmres") |
| tuple | ANALYTICAL_SOLUTION_TYPES = ("TGV3D", "ZERO_FLOW", "UNIFORM_FLOW") |
| tuple | LEGACY_FIELD_INIT_SPELLINGS = ("Zero", "Constant", "Poiseuille") |
| tuple | PROJECTION_OPERATORS = ("continuum", "picurv_discrete") |
| tuple | METRIC_SOURCE_KINDS = ("statistics_csv", "csv", "log_regex", "log") |
| tuple | LAUNCH_MODES = ("local", "cluster") |
| tuple | POST_SPECTRA_SCALAR_COLUMNS |
| tuple | POST_STAGE_NAMES = ("fields", "spectra") |
| str | PICGRID_FLOAT_FORMAT = ".17e" |
| dict | GENERATED_PROFILE_GENERATORS = {"square_duct_poiseuille"} |
| dict | GRID_GENERATOR_CHOICE_FLAGS |
| dict | GRID_GENERATOR_SPEC_FLAGS |
| dict | BC_FACE_MAP |
| dict | BC_TYPE_MAP |
| dict | BC_HANDLER_SPECS |
| dict | _NUMERIC_BC_PARAMS = {"vx", "vy", "vz", "v_max", "target_flux"} |
| dict | _BOOL_BC_PARAMS = {"enforce_seam_flux", "apply_trim"} |
| dict | _DEPRECATED_BC_PARAM_ALIASES = {"apply_trim": "enforce_seam_flux"} |
| dict | _CASE_SCHEMA |
| dict | _SOLVER_SCHEMA |
| dict | _MONITOR_SCHEMA |
| dict | STATISTICS_ELIGIBLE_FIELDS |
| tuple | STATISTICS_MOMENT_NAMES = ("first", "second") |
| tuple | STATISTICS_WEIGHTING_MODES = ("sample", "physical_time") |
| dict | _POST_SCHEMA |
| dict | _CLUSTER_SCHEMA |
| dict | _STUDY_SCHEMA |
| dict | _WORKSPACE_SCHEMA |
| tuple | RUN_OWNED_DIRECTORY_KEYS = ("log", "output") |
| str | UNSAFE_PATHS_OVERRIDE_KEY = "allow_unsafe_paths" |
| tuple | RESERVED_RUN_DIRECTORY_NAMES = ("config", "scheduler", "checkpoints", "visualization") |
| dict | RUN_DIRECTORY_DEFAULTS = {"log": "logs", "output": "output"} |
| tuple | RESERVED_DIRECTORY_FLAGS |
| tuple | RESERVED_INDIRECTION_FLAGS = ("-options_file", "-options_file_yaml", "-alias") |
| tuple | UNSAFE_DIRECTORY_CHARACTERS = ('"', "'", "#", "\n", "\r", "\t") |
| str | PHYSICAL_VERDICT_CONTAINED = "contained" |
| str | PHYSICAL_VERDICT_RUN_ROOT = "run_root" |
| str | PHYSICAL_VERDICT_ANCESTOR = "ancestor" |
| str | PHYSICAL_VERDICT_RELATIVE_ESCAPE = "relative_escape" |
| str | PHYSICAL_VERDICT_EXTERNAL_ABSOLUTE = "external_absolute" |
| WAIVABLE_PHYSICAL_VERDICTS = frozenset({PHYSICAL_VERDICT_EXTERNAL_ABSOLUTE}) | |
| dict | DIAGNOSTICS_PETSC_KEYS |
| tuple | PROGRAMMATIC_GENERATED_IC_GRID_KEYS |
| tuple | GRID_DA_PROCESSOR_KEYS = ("da_processors_x", "da_processors_y", "da_processors_z") |
| dict | GENERATED_IC_PROVIDERS |
| tuple | LES_AVERAGING_DIRECTION_AXES = ("i", "j", "k") |
| dict | SOLVER_MONITORING_POISSON_FLAG_MAP |
| dict | SOLVER_MONITORING_MOMENTUM_FLAG_MAP |
| dict | KRYLOV_KSP_TYPES |
| tuple | _STUDY_REPORT_COLORS |
| dict | ASSET_KIND_DIRECTORIES |
| int | ASSET_PREVIEW_NODE_LIMIT = 2_000_000 |
| _SUMMARY_NUMERIC_RE = re.compile(r"[-+]?\d*\.?\d+(?:[eE][-+]?\d+)?") | |
| int | _CONFIG_SUMMARY_WIDTH = 78 |
| dict | _SUMMARY_PLOT_LOG_SCALE_FIELDS |
| dict | _SUMMARY_PLOT_FIELD_LABELS |
| dict | _SUMMARY_PLOT_SOURCE_TITLES |
| dict | _SUMMARY_ITERATION_HISTORY_FIELDS |
| dict | _SUMMARY_COUNT_FIELDS |
| dict | WORKSPACE_INPUT_DIRECTORIES |
|
protected |
Remove site-package paths for a different Python major/minor version.
| [in] | paths | Candidate sys.path entries. |
Definition at line 95 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 115 of file core.py.
| picurv_cli.core.require_numpy | ( | ) |
Import NumPy only for commands that need numeric reductions.
Definition at line 126 of file core.py.
| picurv_cli.core.optional_matplotlib_pyplot | ( | ) |
Import matplotlib.pyplot lazily for study plot generation.
Definition at line 156 of file core.py.
|
protected |
Read the single release version shared by every PICurv executable.
Definition at line 202 of file core.py.
|
protected |
Resolve reproducible release, commit, and dirty-tree build identity.
| [in] | release_version | Release version read from VERSION. |
Definition at line 218 of file core.py.
|
protected |
Find a named file at or above an arbitrary filesystem anchor.
| [in] | start | File or directory from which to search. |
| [in] | filename | Basename to locate. |
Definition at line 420 of file core.py.
| picurv_cli.core.find_workspace_root | ( | * | anchors | ) |
Locate the nearest initialized PICurv workspace for supplied anchors.
| [in] | anchors | Candidate config, run, study, or current-working-directory paths. |
Definition at line 440 of file core.py.
| dict picurv_cli.core.load_workspace_config | ( | str | workspace_root | ) |
Load and validate the immutable workspace identity/configuration file.
| [in] | workspace_root | Initialized workspace directory. |
Definition at line 455 of file core.py.
| dict picurv_cli.core.enforce_workspace_version | ( | str | workspace_root | ) |
Enforce an optional workspace PICurv version requirement.
| [in] | workspace_root | Initialized workspace directory. |
Definition at line 475 of file core.py.
| dict picurv_cli.core.enforce_reproducibility_policy | ( | str | workspace_root | ) |
Enforce an optional workspace policy demanding a clean, released build.
Exploratory work should stay frictionless, so this is opt-in: a workspace running a campaign that will be published sets it once, and PICurv then refuses to stage from a modified or untagged tree instead of recording the compromise in a manifest nobody reads until later.
| [in] | workspace_root | Initialized workspace directory, or None. |
| ValueError | when the active build does not satisfy the configured policy. |
Definition at line 513 of file core.py.
| str picurv_cli.core.resolve_workspace_path | ( | str | anchor_file, |
| str | candidate, | ||
| *bool | allow_external = False |
||
| ) |
Resolve a user path against its workspace and reject implicit escapes.
| [in] | anchor_file | Config file whose workspace owns the reference. |
| [in] | candidate | Workspace-relative path text. |
| [in] | allow_external | Whether an explicit import/reference operation permits an absolute path. |
Definition at line 571 of file core.py.
| None picurv_cli.core.ensure_workspace_layout | ( | str | workspace_root | ) |
Materialize the uniform, cheap directory skeleton for one workspace.
| [in] | workspace_root | Workspace root to initialize. |
Definition at line 608 of file core.py.
| str picurv_cli.core.initialize_workspace_root | ( | str | workspace_root, |
| str | template_name | ||
| ) |
Create the workspace skeleton and its identity file at one root.
| [in] | workspace_root | Workspace root to initialize. |
| [in] | template_name | Example template the workspace was created from. |
Definition at line 617 of file core.py.
| None picurv_cli.core.ensure_run_layout | ( | str | run_dir | ) |
Materialize the uniform, cheap directory skeleton for one run.
| [in] | run_dir | Run root to initialize. |
Definition at line 646 of file core.py.
| tuple picurv_cli.core.validate_run_directory_structure | ( | str | run_dir | ) |
Refuse a run whose root has grown a directory the layout does not define.
The run topology is a contract: manifest.json publishes it, the solver's reserved-directory guard defends it, and storage classifies against it. A directory beside output/ breaks all three at once - it is routed by nothing, classified as unclassified, and therefore archived forever and pruned never. Catching it when the run is staged or resumed is the only point where the answer is still "move it", rather than "it is already in
every archive of this run".
Unexpected files are reported and allowed. A stray note at a run root costs nothing and refusing to resume a long campaign over one would be a worse failure than the one being prevented.
| [in] | run_dir | Run root to check. |
Definition at line 666 of file core.py.
| None picurv_cli.core.enforce_run_directory_structure | ( | str | run_dir | ) |
Apply validate_run_directory_structure() as a refusal at run time.
| [in] | run_dir | Run root to check. |
Definition at line 711 of file core.py.
| str picurv_cli.core.case_run_label | ( | dict | case_cfg, |
| str | case_path | ||
| ) |
Resolve the stable human-facing portion of a generated run identifier.
| [in] | case_cfg | Parsed case configuration. |
| [in] | case_path | Source case YAML path. |
Definition at line 733 of file core.py.
| str picurv_cli.core.allocate_generated_run_id | ( | str | runs_root, |
| dict | case_cfg, | ||
| str | case_path | ||
| ) |
Build the generated run identity, disambiguating a same-second collision.
The identity is <run label>_<timestamp> at one-second resolution, so two runs of the same case launched back to back - a script, or a smoke sequence - would otherwise name the same directory. Creating a run never writes into an existing one, so the identity is advanced instead of the launch being refused for a clock artifact.
| [in] | runs_root | Directory generated runs are created beneath. |
| [in] | case_cfg | Parsed case configuration supplying the run label. |
| [in] | case_path | Case path, for the label's fallback. |
runs_root. Definition at line 751 of file core.py.
| bool picurv_cli.core.discard_unused_run_directory | ( | str | run_dir, |
| *bool | created | ||
| ) |
Remove a generated run directory that never received any content.
Only a directory this invocation created, and which still holds no files, is removed: an existing run, or one that already produced output, is never touched by a staging failure.
| [in] | run_dir | Run directory that was about to be staged. |
| [in] | created | Whether this invocation created the directory. |
Definition at line 773 of file core.py.
|
protected |
Content digest of one file, or None when it cannot be read.
| [in] | path | File to digest. |
Definition at line 793 of file core.py.
| dict picurv_cli.core.build_software_lock | ( | ) |
Capture the exact software identity a run is about to execute with.
The release and commit say which source is checked out; they do not say which bytes ran. Hashing the executables and the generators pins that, so a queued job rebuilt out from under it is detectable afterwards rather than merely suspected.
Definition at line 809 of file core.py.
|
protected |
Best-effort record of the PETSc, MPI, and compiler the binaries were built on.
Definition at line 849 of file core.py.
| str picurv_cli.core.write_software_lock | ( | str | run_dir | ) |
Write the run's software lock beside its asset lock.
| [in] | run_dir | Run directory receiving the lock. |
Definition at line 892 of file core.py.
| str picurv_cli.core.workspace_artifact_root | ( | str | workspace_root, |
| str | kind | ||
| ) |
Return the canonical workspace-owned root for runs or studies.
| [in] | workspace_root | Initialized workspace, or None for standalone mode. |
| [in] | kind | Either runs or studies. |
Definition at line 904 of file core.py.
|
protected |
Return a portable workspace-relative path when possible.
| [in] | path | Path to normalize. |
| [in] | workspace_root | Optional initialized workspace root. |
Definition at line 918 of file core.py.
| dict picurv_cli.core.snapshot_run_configuration | ( | str | run_dir, |
| dict | source_paths, | ||
| bool | continuation = False |
||
| ) |
Snapshot editable YAML inputs without erasing prior continuation state.
| [in] | run_dir | Owning run directory. |
| [in] | source_paths | Role-to-source-path mapping. |
| [in] | continuation | Whether this is a continuation configuration revision. |
Definition at line 933 of file core.py.
| dict picurv_cli.core.load_active_run_configuration | ( | str | run_dir | ) |
Load the active immutable configuration revision for a run.
| [in] | run_dir | Run directory. |
Definition at line 970 of file core.py.
| dict picurv_cli.core.archive_active_generated_configuration | ( | str | run_dir, |
| list | paths | ||
| ) |
Preserve generated control sidecars beside a continuation's YAML revision.
| [in] | run_dir | Owning run. |
| [in] | paths | Generated control and sidecar paths. |
Definition at line 991 of file core.py.
|
protected |
Report each run component's home, retention class, and lifecycle state.
The skeleton is created whole, so an empty directory says nothing about whether its contents were requested. This is where that question is answered, and it is answered for every component whether or not it ran.
| [in] | run_dir | Run directory being described. |
| [in] | stages_requested | Mapping of requested stage names to booleans. |
{path, retention, state} mapping. Definition at line 1045 of file core.py.
| dict picurv_cli.core.build_run_lineage | ( | str | parent_run_dir, |
| int | checkpoint_step, | ||
| * | workspace_root = None, |
||
statistics_state = None, |
|||
requested_source = None |
|||
| ) |
Record which run and which checkpoint a branched run was started from.
Without this a branch is indistinguishable from a fresh run: the copied bundle under inputs/restart/ carries the parent's geometry and software identity but never says which run produced it, so the trajectory a result belongs to cannot be reconstructed after the fact.
The parent's own manifest is asked for its identity rather than its directory name, so a parent that was renamed or restored under another name is still named correctly here.
| [in] | parent_run_dir | Absolute path to the run being branched from. |
| [in] | checkpoint_step | Checkpoint step the branch starts from. |
| [in] | workspace_root | Optional workspace root, to record a portable path. |
| [in] | statistics_state | Resolved field-statistics decision for the branch. |
| [in] | requested_source | What the user asked for, e.g. "latest" or a path. |
Definition at line 1089 of file core.py.
| dict picurv_cli.core.build_run_manifest | ( | str | run_dir, |
| str | run_id, | ||
| * | workspace_root = None, |
||
| str | launch_mode = "local", |
||
| int | num_procs = 1, |
||
| int | post_num_procs = 1, |
||
stages_requested = None, |
|||
stages_completed = None, |
|||
inputs = None, |
|||
asset_lock = None, |
|||
submission = None, |
|||
lineage = None, |
|||
| str | artifact_type = "run", |
||
study_id = None, |
|||
case_id = None |
|||
| ) |
Build the authoritative run identity, topology, and lifecycle manifest.
| [in] | run_dir | Owning run directory. |
| [in] | run_id | Stable run identity. |
| [in] | workspace_root | Optional initialized workspace root. |
| [in] | launch_mode | Local or scheduler-backed launch mode. |
| [in] | num_procs | Effective solver process count. |
| [in] | post_num_procs | Effective post-process count. |
| [in] | stages_requested | Requested stage mapping. |
| [in] | stages_completed | Completed or submitted stage names. |
| [in] | inputs | Active configuration identities. |
| [in] | asset_lock | Resolved run asset lock. |
| [in] | submission | Scheduler submission metadata. |
| [in] | lineage | Where this run's initial state came from; see build_run_lineage(). |
| [in] | artifact_type | "run" for a standalone run, "study-case" for a study member. |
| [in] | study_id | Owning study identity, for a study member. |
| [in] | case_id | Member identity within its study. |
Definition at line 1124 of file core.py.
|
protected |
Resolve a run/output root or an exact checkpoint bundle.
| [in] | source_dir | Run/output root or exact bundle path. |
| [in] | step | Checkpoint step to resolve. |
Definition at line 1192 of file core.py.
|
protected |
Parse the deliberately small PETSc-options checkpoint manifest.
| [in] | metadata_path | Path to checkpoint.meta. |
Definition at line 1205 of file core.py.
| dict picurv_cli.core.validate_committed_checkpoint | ( | str | source_dir, |
| int | step, | ||
| bool | require_particles = False |
||
| ) |
Validate one committed bundle using the same manifest contract as C.
| [in] | source_dir | Run/output root or exact bundle path. |
| [in] | step | Expected checkpoint step. |
| [in] | require_particles | Whether particle restart payloads are required. |
Definition at line 1228 of file core.py.
|
protected |
Return only fully validated, committed checkpoint steps.
| [in] | source_dir | Run/output root containing checkpoints. |
| [in] | require_particles | Whether particle restart payloads are required. |
Definition at line 1315 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 1340 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 1397 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 1427 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 1442 of file core.py.
| dict picurv_cli.core.read_binary_build_identity | ( | str | executable_path | ) |
Read the build identity a native executable was compiled with.
The Makefile stamps the release, commit, and dirty state into the binaries, and they are written into every checkpoint manifest. Reading it back is what makes the run manifest's provenance a statement about the binary that ran rather than about whatever source happens to be checked out when the conductor is invoked.
| [in] | executable_path | Path to simulator or postprocessor. |
available: False mapping when it cannot be read. Definition at line 1460 of file core.py.
| dict picurv_cli.core.runtime_build_identities | ( | ) |
Read the build identity of every native executable a run would launch.
matches_source. Definition at line 1499 of file core.py.
| list picurv_cli.core.build_identity_problems | ( | dict | identities, |
workspace_requirement = None |
|||
| ) |
Report every reason the active build identity is not internally coherent.
The conductor, the simulator, and the postprocessor are three artifacts that must agree before a run's provenance means anything. This states the disagreements rather than printing them, so version status can exit on them while ordinary staging only warns.
| [in] | identities | Mapping returned by runtime_build_identities(). |
| [in] | workspace_requirement | Optional software.picurv constraint to check. |
Definition at line 1519 of file core.py.
| list picurv_cli.core.warn_on_stale_runtime_binaries | ( | dict | identities | ) |
Report native executables whose build identity is not the active source.
| [in] | identities | Mapping returned by runtime_build_identities(). |
Definition at line 1565 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 1612 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 1626 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 1650 of file core.py.
|
protected |
Separate a validation error into its source-file and message fields when possible.
| [in] | raw_error | Validation error text, optionally beginning with a file path and colon. |
-) and the message text. Definition at line 1666 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 1684 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 1705 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 1744 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 1772 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 1787 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 1804 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 1822 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 1831 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 1853 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 1879 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 1896 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 1912 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 1926 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 1947 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 1969 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 1988 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 2020 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 2065 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 2113 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 2137 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 2152 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 2174 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 2199 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 2232 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 2268 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 2288 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 2308 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 2325 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 2347 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 2365 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 2384 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 2454 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 2554 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 2598 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 2626 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 2658 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 2674 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 2687 of file core.py.
| list picurv_cli.core.reject_generator_destination_keys | ( | generator, | |
| str | case_path, | ||
| str | label | ||
| ) |
Reject generator settings that try to choose their own output destination.
| [in] | generator | Generator mapping from the case configuration. |
| [in] | case_path | Case file path for diagnostics. |
| [in] | label | Dotted configuration path being checked, for the message. |
Definition at line 2703 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 2721 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 2733 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 2743 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 2761 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 2789 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 2800 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 2820 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 2839 of file core.py.
| dict picurv_cli.core.normalize_post_spectra_config | ( | dict | post_cfg | ) |
Validate and canonicalize the spectra block of post.yml.
The recipe chooses what to measure; whether the case can support that measurement is a separate question answered by validate_post_spectra_preconditions(), which needs the grid and the boundary conditions. Keeping the two apart means a recipe stays valid on its own terms even when it is read without a case beside it.
| [in] | post_cfg | Parsed post-processing configuration. |
| ValueError | on a malformed or inconsistent recipe. |
Definition at line 2994 of file core.py.
| list picurv_cli.core.validate_post_spectra_preconditions | ( | dict | spectra_cfg, |
| dict | case_cfg, | ||
| str | post_path | ||
| ) |
Check spectra tasks against what the case can actually support.
Runs before any field is read, so a case with no homogeneous direction is refused rather than yielding a curve that means nothing. Only the checks the case file can answer are made here: periodicity and block count. Grid uniformity is enforced by generators/spectra.gen, which reads the staged PICGRID and is the only place the real node coordinates are known.
| [in] | spectra_cfg | Normalized spectra recipe. |
| [in] | case_cfg | Parsed case configuration. |
| [in] | post_path | Post recipe path, for error messages. |
Definition at line 3111 of file core.py.
|
protected |
Locate one checkpoint payload by its inventory entry rather than by path shape.
| [in] | bundle | Validated checkpoint bundle mapping. |
| [in] | kind | Payload kind recorded in the inventory. |
| [in] | field | Payload field name recorded in the inventory. |
| [in] | block | Block index the payload belongs to. |
| ValueError | when the bundle carries no such payload. |
Definition at line 3172 of file core.py.
|
protected |
Build the generator arguments implementing a task's fluctuation choice.
| [in] | task_cfg | Normalized spectra task. |
| [in] | bundle | Validated checkpoint bundle for the step being transformed. |
| [in] | mean_bundle | Bundle supplying the window mean; defaults to bundle. |
| ValueError | when a named window is absent from the bundle. |
Definition at line 3192 of file core.py.
| set picurv_cli.core.resolve_post_stage_selection | ( | only | ) |
Resolve the --only selector into the set of post stages to execute.
| [in] | only | Comma-separated selector text, or None for every stage. |
| ValueError | when the selector names an unknown or empty stage. |
Definition at line 3224 of file core.py.
| dict picurv_cli.core.run_post_spectra_stage | ( | str | run_dir, |
| dict | post_cfg, | ||
| dict | monitor_cfg, | ||
| str | source_dir, | ||
| steps, | |||
| bool | quiet = False |
||
| ) |
Measure spectra for every requested task across a window of committed steps.
One spectrum per step per task, because a spectrum is a property of one state: averaging across steps would be wrong for a decaying flow, where every step is a different statistical state. Results are written in long form so a family of curves stays one file, alongside a scalar history that plots through the ordinary series machinery.
| [in] | run_dir | Run directory receiving the output. |
| [in] | post_cfg | Parsed post-processing configuration. |
| [in] | monitor_cfg | Parsed monitor configuration anchoring the output root. |
| [in] | source_dir | Directory holding the committed checkpoints. |
| [in] | steps | Iterable of checkpoint steps to process, in order. |
| [in] | quiet | Suppress progress reporting. |
| ValueError | when the generator fails or a requested payload is absent. |
Definition at line 3245 of file core.py.
| str picurv_cli.core.compute_post_spectra_signature | ( | dict | spectra_cfg | ) |
Reduce a normalized spectra recipe to a stable identity string.
| [in] | spectra_cfg | Normalized spectra recipe. |
Definition at line 3369 of file core.py.
| str picurv_cli.core.resolve_post_spectra_output_dir | ( | monitor_cfg = None | ) |
Resolve the run-relative directory spectra CSVs are written to.
| [in] | monitor_cfg | Optional monitor configuration anchoring the output root. |
Definition at line 3379 of file core.py.
| str picurv_cli.core.resolve_recipe_spectra_output_dir | ( | dict | post_cfg, |
monitor_cfg = None |
|||
| ) |
Resolve the canonical spectra directory for one versioned recipe.
| [in] | post_cfg | Parsed runtime post config. |
| [in] | monitor_cfg | Optional monitor config for standalone compatibility. |
Definition at line 3389 of file core.py.
| list picurv_cli.core.get_post_spectra_output_artifacts | ( | dict | post_cfg, |
| str | run_dir, | ||
monitor_cfg = None |
|||
| ) |
Predict the spectra CSV paths a recipe will write.
| [in] | post_cfg | Parsed post-processing configuration. |
| [in] | run_dir | Run directory the recipe operates on. |
| [in] | monitor_cfg | Optional monitor configuration anchoring the output root. |
Definition at line 3400 of file core.py.
| str picurv_cli.core.post_spectra_task_basename | ( | dict | task_cfg, |
| str | output_prefix | ||
| ) |
Build the file basename one normalized spectra task writes.
| [in] | task_cfg | Normalized task mapping. |
| [in] | output_prefix | Recipe output prefix. |
Definition at line 3423 of file core.py.
| dict picurv_cli.core.normalize_post_field_statistics_config | ( | dict | post_cfg | ) |
Validate and canonicalize the field_statistics block of post.yml.
The recipe names windows rather than redescribing them, because the window definitions already reach the post-processor through the run's solver control. Validation therefore covers the recipe's own choices only; a name no window matches is caught in C against the resolved list, which is the only place the real set is known.
| [in] | post_cfg | Parsed post-processing configuration. |
normalize_post_field_statistics_config(). Definition at line 3435 of file core.py.
|
protected |
Count the derived fields one window would produce for a set of outputs.
Mirrors the resolution the C derivation performs, so a recipe that would produce an empty file is refused before the run rather than after it. Each output resolves against what the window accumulated: a window keeping only first moments has no stresses, RMS, or turbulent kinetic energy to give.
| [in] | window_cfg | Normalized window definition from monitor.yml. |
| [in] | outputs | Requested output kinds. |
_post_window_derived_field_count(). Definition at line 3508 of file core.py.
|
protected |
Return whether the current post recipe derives accumulated field statistics.
| [in] | post_cfg | Argument passed to _post_requests_field_statistics(). |
_post_requests_field_statistics(). Definition at line 3543 of file core.py.
| picurv_cli.core.get_post_field_statistics_artifacts | ( | dict | post_cfg, |
| str | run_dir | ||
| ) |
Predict the per-window statistics artifacts a recipe will produce.
Returns one entry per window and format, so resume tracking can tell a half-finished window from a completed one.
| [in] | post_cfg | Parsed post-processing configuration. |
| [in] | run_dir | Run directory the outputs are written under. |
Definition at line 3556 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 3589 of file core.py.
| str picurv_cli.core.compute_post_recipe_id | ( | dict | post_cfg | ) |
Compute a stable human-readable identity for one post recipe.
| [in] | post_cfg | Parsed post configuration before runtime path injection. |
Definition at line 3701 of file core.py.
| "tuple[dict, str]" picurv_cli.core.apply_canonical_post_paths | ( | dict | post_cfg, |
| str | run_dir | ||
| ) |
Route every post artifact into its fixed analysis or visualization home.
| [in] | post_cfg | Parsed user recipe. |
| [in] | run_dir | Run receiving derived artifacts. |
Definition at line 3729 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 3765 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 3786 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 3797 of file core.py.
| str picurv_cli.core.get_post_resume_state_path | ( | str | run_dir, |
| dict | post_cfg = None |
||
| ) |
Return the JSON resume metadata path for a run directory.
| [in] | run_dir | Argument passed to get_post_resume_state_path(). |
| [in] | post_cfg | Optional versioned post recipe configuration. |
get_post_resume_state_path(). Definition at line 3816 of file core.py.
| str picurv_cli.core.get_post_recipe_root | ( | str | run_dir, |
| dict | post_cfg | ||
| ) |
Return the versioned run-local control directory for one post recipe.
| [in] | run_dir | Owning run root. |
| [in] | post_cfg | Runtime post config with canonical paths, or a user recipe. |
Definition at line 3828 of file core.py.
| dict picurv_cli.core.get_post_lock_paths | ( | str | run_dir, |
| str | recipe_id = None |
||
| ) |
Return lock-wrapper related paths for a run directory.
| [in] | run_dir | Argument passed to get_post_lock_paths(). |
| [in] | recipe_id | Optional stable recipe identity used to scope the lock. |
get_post_lock_paths(). Definition at line 3840 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 3856 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 3871 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 3881 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 3891 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 3900 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 3910 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 3925 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 3943 of file core.py.
|
protected |
Collect step numbers from VTK files named with a prefix, step suffix, and extension.
| [in] | prefix_path | Output path prefix before the numeric step suffix. |
| [in] | extension | VTK file extension to match without its leading dot. |
Definition at line 3964 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 3984 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 4007 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 4041 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 4066 of file core.py.
|
protected |
Format an optional step number for user-facing diagnostics.
| [in] | step | Step number or None. |
Definition at line 4078 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 4087 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 4106 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 4122 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 4176 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 4202 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 4281 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 4302 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 4324 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 4458 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 4482 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 4493 of file core.py.
| str picurv_cli.core.compute_physical_case_identity | ( | dict | case_cfg | ) |
Compute the hidden identity used to guard in-place continuation.
Run length/timestep controls and particle load-vs-init policy do not define the physical case. All other case.yml content does.
| [in] | case_cfg | Parsed case configuration. |
Definition at line 4504 of file core.py.
| None picurv_cli.core.validate_continue_case_identity | ( | str | run_dir, |
| dict | case_cfg | ||
| ) |
Reject in-place continuation when the physical case has changed.
| [in] | run_dir | Existing run directory being continued. |
| [in] | case_cfg | Newly requested case configuration. |
Definition at line 4524 of file core.py.
| picurv_cli.core.populate_restart_directory | ( | str | source_output, |
| str | target_restart, | ||
| int | start_step, | ||
| dict | monitor_cfg, | ||
| "int | None" | end_step = None, |
||
| bool | materialize = True |
||
| ) |
Atomically materialize an immutable checkpoint interval into a run.
| [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 | First checkpoint step to materialize. |
| [in] | monitor_cfg | Parsed monitor YAML dictionary (for subdirectory names). |
| [in] | end_step | Optional inclusive last checkpoint step. |
| [in] | materialize | Whether to copy the bundles, or only validate and resolve the path a real run would use. The dry-run planner needs the second: it reports what a run would refuse, and promises to write nothing. |
Definition at line 4542 of file core.py.
| picurv_cli.core.validate_eulerian_checkpoint | ( | str | source_dir, |
| int | step, | ||
| dict | monitor_cfg | ||
| ) |
Validate the mandatory Eulerian field set required by ReadSimulationFields().
| [in] | source_dir | Root directory containing the Eulerian subdirectory. |
| [in] | step | Checkpoint step to validate. |
| [in] | monitor_cfg | Monitor configuration defining the Eulerian subdirectory. |
| ValueError | if any mandatory Eulerian field is absent. |
Definition at line 4603 of file core.py.
| picurv_cli.core.detect_last_checkpoint_step | ( | str | output_dir | ) |
Scan output directory for the highest step number available.
Ignores incomplete temporary directories and invalid bundles.
| [in] | output_dir | Path to the output directory. |
Definition at line 4616 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 4627 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 4647 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 4672 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 4686 of file core.py.
| str picurv_cli.core.resolve_latest_restart_run | ( | dict | case_cfg, |
| str | case_path, | ||
| int | start_step | ||
| ) |
Select the newest local workspace run compatible with a requested restart.
| [in] | case_cfg | Current case configuration. |
| [in] | case_path | Current case path. |
| [in] | start_step | Required committed checkpoint. |
Definition at line 4698 of file core.py.
| picurv_cli.core.resolve_restart_source | ( | args, | |
| dict | case_cfg, | ||
| dict | solver_cfg, | ||
| dict | monitor_cfg, | ||
| str | run_dir, | ||
| bool | materialize = True |
||
| ) |
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. |
| [in] | materialize | Whether to copy restart bundles into the run. The dry-run planner passes False: it still validates and resolves, but writes nothing. |
build_run_lineage(), or None when this run did not branch from another. Definition at line 4749 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 4943 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 5008 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 5076 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 5087 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 5102 of file core.py.
| str picurv_cli.core.format_picgrid_coordinate | ( | float | value | ) |
Format a coordinate with round-trip-safe binary64 precision.
| [in] | value | Coordinate value. |
Definition at line 5116 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 5125 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 5232 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 5289 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 5387 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 5395 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 5415 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 5431 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 5458 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 5524 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 5590 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 5643 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 5714 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 5746 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 5768 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 5797 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 5810 of file core.py.
| list picurv_cli.core.validate_grid_generator_cli_args | ( | cli_args, | |
| str | case_path | ||
| ) |
Check closed-choice values inside the generator's opaque token list.
cli_args is passed through to grid.gen untouched, so a misspelled geometry selector there is only discovered when the subprocess exits nonzero partway into a run. The generator remains the authority; this reports the same set earlier, and stays silent on anything it does not recognize.
| [in] | cli_args | Raw token list from grid.generator.cli_args. |
| [in] | case_path | Case file path for diagnostics. |
Definition at line 5885 of file core.py.
| str picurv_cli.core.run_grid_generator | ( | str | case_path, |
| str | run_dir, | ||
| dict | grid_cfg, | ||
| dict | case_cfg = None |
||
| ) |
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. |
| [in] | case_cfg | Parsed case configuration, when available. Its reference scales are handed to the generator so the quality report can carry solver and wall units. Reporting only: the generator never scales coordinates, which validate_and_nondimensionalize_picgrid does once for every grid regardless of origin. |
| ValueError | on invalid config or generator failure. |
Definition at line 5926 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 6097 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 6152 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 6172 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 6232 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 6310 of file core.py.
|
protected |
Convert a non-boolean YAML scalar to a finite float.
| [in] | value | Raw YAML scalar. |
| [in] | field_name | User-facing configuration path. |
Definition at line 6323 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 6337 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 6354 of file core.py.
|
protected |
Reports which logical axes a case declares periodic on both faces.
| [in] | case_cfg | Parsed case.yml mapping. |
Definition at line 6379 of file core.py.
| picurv_cli.core.validate_wall_model_pairing | ( | dict | case_cfg, |
| les_cfg, | |||
| rans_cfg, | |||
| wall_cfg, | |||
| str | case_path, | ||
| list | errors, | ||
| list | warnings | ||
| ) |
Rejects wall-model selections that no turbulence treatment can support.
A wall model replaces the near-wall flow with an analytic profile so that the boundary layer need not be resolved. That only means something if the unresolved motions are modelled somewhere. Three combinations cannot be, and each fails here rather than after the mesh is built.
| case_cfg | Parsed case configuration, read for the Reynolds number. |
| les_cfg | models.physics.turbulence.les, or None. |
| rans_cfg | models.physics.turbulence.rans, or None. |
| wall_cfg | models.physics.turbulence.wall_function, or None. |
| case_path | Case path, for message prefixes. |
| errors | Collected blocking messages, appended to. |
| warnings | Collected advisory messages, appended to. |
Definition at line 6399 of file core.py.
|
protected |
Reynolds number implied by a case's scaling and fluid properties.
| case_cfg | Parsed case configuration. |
Definition at line 6479 of file core.py.
| picurv_cli.core.validate_les_configuration | ( | dict | case_cfg, |
| dict | les_cfg, | ||
| str | case_path, | ||
| list | errors, | ||
| list | warnings | ||
| ) |
Checks the structured LES block for values the closure cannot honour.
| [in] | case_cfg | Parsed case.yml mapping, used to read declared periodicity. |
| [in] | les_cfg | Parsed models.physics.turbulence.les mapping. |
| [in] | case_path | Case file path used to prefix diagnostics. |
| [out] | errors | List collecting blocking validation failures. |
| [out] | warnings | List collecting advisory messages. |
errors and warnings. Definition at line 6500 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 6672 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 6845 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 6854 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 6872 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 6900 of file core.py.
| str picurv_cli.core.directory_value_charset_problem | ( | str | value | ) |
Describe why a directory value cannot be written to a PETSc options line.
| [in] | value | Configured directory value. |
Definition at line 7257 of file core.py.
| str picurv_cli.core.classify_run_directory_value | ( | value | ) |
Classify a configured run directory value.
Containment is judged lexically against the run directory, because the run directory does not exist yet at validation time. Beyond escaping, a value is rejected when it resolves to the run root itself: the log directory is recursively deleted on a fresh solve, so . or a/.. would delete the run.
| [in] | value | Configured directory value from monitor io.directories. |
Definition at line 7274 of file core.py.
| str picurv_cli.core.normalized_run_directory | ( | str | value | ) |
Normalized, comparable form of a contained run directory value.
| [in] | value | Configured directory value. |
Definition at line 7310 of file core.py.
| bool picurv_cli.core.paths_overlap | ( | str | first, |
| str | second | ||
| ) |
Whether two run-relative directories are the same or nested in one another.
| [in] | first | Normalized directory. |
| [in] | second | Normalized directory. |
Definition at line 7319 of file core.py.
| tuple picurv_cli.core.resolve_unsafe_paths_override | ( | dict | dirs, |
| str | monitor_path | ||
| ) |
Resolve the unsafe-paths override, requiring a real YAML boolean.
A truthy string such as "false" must never enable an override that permits a destructive path. Only a genuine boolean true enables it; any other type is a configuration error rather than a silent interpretation.
| [in] | dirs | The io.directories mapping. |
| [in] | monitor_path | Path to the monitor file, for error messages. |
Definition at line 7331 of file core.py.
| tuple picurv_cli.core.evaluate_run_directories | ( | dict | values, |
| bool | override, | ||
| set | explicit = None |
||
| ) |
Apply every run-directory safety rule to a set of effective directory values.
Single source of truth for the rules, shared by configuration validation and submission preflight so the two cannot drift apart. Callers must pass effective values with defaults filled in.
Two classes of finding are distinguished. Waivable findings concern a deliberate external location; allow_unsafe_paths downgrades those to warnings. Non-waivable findings concern self-destruction or a value that cannot be written unambiguously - the run root itself, a reserved run directory, log/output overlap, and malformed characters. The override was granted for deliberate external storage, never for deleting the run's own config or emitting an ambiguous option line, so those stay errors.
| [in] | values | Effective mapping of directory key to configured value. |
| [in] | override | Whether the unsafe-paths override is enabled. |
| [in] | explicit | Keys the user actually configured; the rest are reported as defaults. |
Definition at line 7356 of file core.py.
| list picurv_cli.core.classify_physical_containment | ( | str | run_dir, |
| dict | values | ||
| ) |
Classify where each run-owned directory physically lands.
Lexical containment is not enough: a contained name can be a symlink to an external directory, and PetscRMTree follows symlinks. This resolves the real path - including any symlinked ancestor - and reports a typed verdict so the caller can apply the waiver rule structurally.
| [in] | run_dir | Run directory the values are relative to. |
| [in] | values | Effective directory mapping. |
Definition at line 7503 of file core.py.
| list picurv_cli.core.check_physical_containment | ( | str | run_dir, |
| dict | values | ||
| ) |
Human-readable physical containment violations.
| [in] | run_dir | Run directory the values are relative to. |
| [in] | values | Effective directory mapping. |
Definition at line 7560 of file core.py.
| dict picurv_cli.core.effective_run_directories | ( | dict | configured | ) |
Fill in defaults for run-owned directories that were not configured.
An omitted key is not absent at runtime, it takes its default. Checking only explicit keys would miss log: output, which collides with the default output directory and would delete solver output.
| [in] | configured | Configured directory mapping, possibly partial. |
Definition at line 7570 of file core.py.
| tuple picurv_cli.core.validate_run_directory_containment | ( | dict | monitor_cfg, |
| str | monitor_path | ||
| ) |
Classify legacy directory values as defense-in-depth during validation.
The monitor schema rejects this removed surface. Keeping the stricter classifier here ensures malformed or manually constructed configurations still receive the safety findings that protect recursive log cleanup.
| [in] | monitor_cfg | Parsed monitor YAML dictionary. |
| [in] | monitor_path | Path to the monitor file, for error messages. |
Definition at line 7587 of file core.py.
| list picurv_cli.core.validate_reserved_directory_flags | ( | dict | config, |
| str | config_path, | ||
| str | label | ||
| ) |
Reject raw PETSc passthrough options that set run-owned directories.
Passthrough surfaces emit {flag: value} verbatim into the generated control file. Run-owned path flags are reserved for the fixed workspace topology and may only be emitted by the generator.
| [in] | config | Parsed configuration mapping to scan. |
| [in] | config_path | Path to the file, for error messages. |
| [in] | label | Human-readable description of the surface being scanned. |
Definition at line 7611 of file core.py.
| picurv_cli.core.validate_simulation_configs | ( | dict | case_cfg, |
| dict | solver_cfg, | ||
| dict | monitor_cfg, | ||
| str | case_path, | ||
| str | solver_path, | ||
| str | monitor_path | ||
| ) |
Validates every configuration a simulation run consumes, before any work is done.
Covers the three roles the solver is launched with: the case, the solver, and the monitor. Only one of those is a solver configuration, which is why this is not named for the solver; the monitor in particular carries observation and field-statistics contracts that have nothing to do with the numerical scheme.
Checks required sections, required keys, physical sanity, and the cross-file combinations no single file can rule out. Post-processing configuration is validated separately by validate_post_config().
| [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 7656 of file core.py.
| "tuple[list, list]" picurv_cli.core.check_post_checkpoint_cadence_alignment | ( | dict | post_cfg, |
| dict | monitor_cfg, | ||
| str | post_path, | ||
| str | monitor_path = "monitor.yml" |
||
| ) |
Report post step selections that cannot land on a committed checkpoint.
The post-processor reads committed bundles, and the solver commits one every io.data_output_frequency completed steps. A step_interval that is not a multiple of that cadence therefore asks for steps that were never written: the source-frontier scan stops at the first missing one and processes far less than the recipe requested. That is only discovered after a solve has already run, so it is caught here instead.
The solver also commits the initial and final states off cadence, which is why a misaligned start_step is a warning rather than an error: it may legitimately be the run's own starting step. step_interval has no such exemption, because a stride off the cadence cannot land on two consecutive checkpoints whatever the run's bounds are.
| [in] | post_cfg | Parsed post-processing configuration. |
| [in] | monitor_cfg | Parsed monitor configuration governing the source run. |
| [in] | post_path | Path to the post file, for error messages. |
| [in] | monitor_path | Path to the monitor file, for error messages. |
(errors, warnings), each a list of message strings. Both are empty when the comparison cannot be made, because the inputs that would make it meaningful are validated and reported elsewhere. Definition at line 8396 of file core.py.
| picurv_cli.core.validate_post_config | ( | dict | post_cfg, |
| str | post_path, | ||
| dict | monitor_cfg = None, |
||
| dict | case_cfg = None |
||
| ) |
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). |
| [in] | monitor_cfg | Parsed monitor configuration, when available. Two checks span both files: field statistics, where post.yml names the windows and monitor.yml decides what each accumulates, and step cadence, where monitor.yml decides which steps exist to be read. Both run only when the monitor is known. |
| [in] | case_cfg | Parsed case configuration, when available. Spectra preconditions need the boundary conditions and block count, so they are checked only when the case is known; validating a recipe on its own still checks it on its own terms. |
| SystemExit | on validation failure. |
Definition at line 8467 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 8749 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 8904 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 9032 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 9047 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 9061 of file core.py.
| dict picurv_cli.core.flatten_study_parameters | ( | dict | parameters | ) |
Flatten grouped study overrides into scalar dotted-path columns.
A grouped override such as case.run_control: {dt_physical: ...} materializes correctly in case YAML but is not a useful CSV cell or plot coordinate. Flattening preserves the actual varied variables.
| [in] | parameters | One expanded study parameter combination. |
Definition at line 9073 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 9103 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 9135 of file core.py.
| str picurv_cli.core.normalize_extension | ( | str | ext | ) |
Canonicalize a user-supplied filename extension by trimming whitespace and leading dots.
| [in] | ext | Argument passed to normalize_extension(). |
normalize_extension(). Definition at line 9144 of file core.py.
| list picurv_cli.core.resolve_conductor_entry_point | ( | ) |
Resolve how to invoke this conductor again from a batch script.
Prefers the bin/picurv wrapper, which selects the managed Python environment a cluster node needs, and falls back to the running interpreter with the package entry point when that wrapper is absent.
Definition at line 9154 of file core.py.
| list picurv_cli.core.build_spectra_follow_command | ( | str | run_dir, |
| str | post_path, | ||
| dict | post_cfg | ||
| ) |
Build the batch-script step that measures spectra after the field stage.
Spectra are a serial pass over committed checkpoints, so the command is returned bare rather than wrapped in the MPI launcher: run under srun with the post stage's task count it would become one identical copy per task, each writing the same files.
| [in] | run_dir | Run directory the batch job operates on. |
| [in] | post_path | Post recipe path, reachable from the compute node. |
| [in] | post_cfg | Effective post configuration. |
Definition at line 9170 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, |
||
| list | follow_commands = 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(). |
| [in] | follow_commands | Commands to run after the launched one, each an argv list. They run in the batch shell rather than under the MPI launcher, so a serial step does not become one copy per task. Supplying any of them drops the exec. |
Definition at line 9198 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 9312 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 9340 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 9353 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 9386 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 9456 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 9474 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 9541 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 9550 of file core.py.
|
protected |
Prints validation errors and exits.
| [in] | errors | List of error message strings. |
Definition at line 9583 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 9602 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, | ||
| str | config_dir = None |
||
| ) |
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. |
| [in] | config_dir | Optional configuration revision directory. |
Definition at line 9627 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 9656 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 9666 of file core.py.
|
protected |
Validate PETSc info logging configuration.
| [in] | value | Boolean or structured PETSc info configuration. |
Definition at line 9734 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 9763 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 9777 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 9789 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 9803 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 9813 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 9830 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 9921 of file core.py.
|
protected |
Report whether the subsystem a statistics field depends on is active.
| [in] | case_cfg | Parsed case configuration. |
| [in] | requirement | Subsystem key from STATISTICS_ELIGIBLE_FIELDS, or None. |
_statistics_subsystem_available(). Definition at line 9962 of file core.py.
| dict picurv_cli.core.normalize_field_statistics_config | ( | dict | monitor_cfg, |
| dict | case_cfg = None |
||
| ) |
Validate and canonicalize the field-statistics block of monitor.yml.
Rejects every condition the field-statistics contract forbids, naming the offending window so a message points at one entry rather than the block. Returns a canonical form the flag resolver serializes without further interpretation, so validation and emission cannot disagree.
| [in] | monitor_cfg | Parsed monitor configuration. |
| [in] | case_cfg | Parsed case configuration, used to check that each field's subsystem is active. Subsystem checks are skipped when None. |
normalize_field_statistics_config(). Definition at line 9988 of file core.py.
| list picurv_cli.core.resolve_field_statistics_flags | ( | dict | monitor_cfg, |
| dict | case_cfg = None |
||
| ) |
Serialize field-statistics configuration into control-file option lines.
A window list is variable arity, so its option names are constructed from the index. Each name belongs to a family declared in the ingress audit manifest.
| [in] | monitor_cfg | Parsed monitor configuration. |
| [in] | case_cfg | Parsed case configuration, for subsystem availability checks. |
resolve_field_statistics_flags(). Definition at line 10173 of file core.py.
| "int | None" picurv_cli.core.resolve_statistics_console_output_frequency | ( | dict | io_cfg | ) |
Resolve the statistics console cadence, mirroring the particle one.
| [in] | io_cfg | Parsed monitor io block. |
resolve_statistics_console_output_frequency(). Definition at line 10212 of file core.py.
| dict picurv_cli.core.normalize_solution_monitoring_config | ( | dict | monitor_cfg | ) |
Validate and canonicalize physical-solution convergence monitoring.
| [in] | monitor_cfg | Parsed monitor.yml mapping. |
| ValueError | when convergence settings are invalid. |
Definition at line 10223 of file core.py.
| dict picurv_cli.core.resolve_solution_monitoring_flags | ( | dict | monitor_cfg | ) |
Translate solution-monitoring YAML into the existing C convergence flags.
| [in] | monitor_cfg | Parsed monitor.yml mapping. |
Definition at line 10278 of file core.py.
| dict picurv_cli.core.prepare_monitor_files | ( | str | run_dir, |
| str | run_id, | ||
| dict | monitor_cfg, | ||
| dict | source_files, | ||
| str | config_dir = None |
||
| ) |
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(). |
| [in] | config_dir | Optional configuration revision directory. |
prepare_monitor_files(). Definition at line 10296 of file core.py.
| list picurv_cli.core.generate_multi_block_bcs | ( | str | run_dir, |
| str | run_id, | ||
| dict | case_cfg, | ||
| dict | source_files, | ||
| str | config_dir = None |
||
| ) |
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. |
| [in] | config_dir | Optional configuration revision directory. |
| ValueError | if the number of BC definitions does not match the number of blocks. |
Definition at line 10341 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 10494 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 10506 of file core.py.
| None picurv_cli.core.validate_programmatic_generated_ic_grid_settings | ( | dict | raw_settings | ) |
Validate scalar programmatic grid settings needed by file-generating IC providers.
| [in] | raw_settings | programmatic_settings dict from case.yml. |
| ValueError | when required scalar settings are missing or invalid. |
Definition at line 10532 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 10584 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 10651 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 10705 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 10746 of file core.py.
| dict picurv_cli.core.validate_newton_krylov_config | ( | dict | cfg | ) |
Validate and normalize the structured Newton–Krylov solver block.
| [in] | cfg | Structured momentum_solver.newton_krylov mapping. |
Definition at line 10772 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 11073 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 11098 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 11120 of file core.py.
| bool picurv_cli.core.is_generated_ic_provider | ( | dict | resolved_ic | ) |
Return whether a resolved IC is backed by a registered file generator.
| [in] | resolved_ic | Resolved initial-condition contract. |
Definition at line 11150 of file core.py.
| dict picurv_cli.core.resolve_fluid_scaling | ( | dict | case_cfg | ) |
Resolve the shared physical and nondimensional fluid scaling contract.
| [in] | case_cfg | Parsed case configuration. |
Definition at line 11159 of file core.py.
| dict picurv_cli.core.resolve_initial_condition_config | ( | dict | ic, |
| prepared_blocks, | |||
| float | U_ref, | ||
provider_context = None |
|||
| ) |
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. |
| [in] | provider_context | Optional conductor-derived provider context. |
Definition at line 11183 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 11360 of file core.py.
| str picurv_cli.core.run_initial_spectrum_generator | ( | str | field_path, |
| str | staged_grid, | ||
| str | spectrum_path, | ||
| str | case_dir | ||
| ) |
Measure the shell-averaged spectrum of a staged initial condition.
The spectrum has a single implementation in generators/spectra.gen, so the conductor measures the generated field rather than asking the initial-condition generator to report a spectrum it would have to bin itself.
| [in] | field_path | Generated PETSc binary Ucat path. |
| [in] | staged_grid | Staged canonical PICGRID path. |
| [in] | spectrum_path | Destination k,energy CSV path. |
| [in] | case_dir | Working directory for the subprocess. |
| ValueError | when the generator is missing or fails. |
Definition at line 11381 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 11412 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 11467 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 11512 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 11531 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 11545 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 11646 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 11670 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 11689 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 11716 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 11748 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 11772 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 11793 of file core.py.
| int picurv_cli.core.normalize_les_test_filter | ( | value | ) |
Maps LES test-filter kernel names to the C -les_test_filter_kernel flag.
| [in] | value | Test-filter selector name or integer code. |
| ValueError | if the input cannot be mapped. |
Definition at line 11828 of file core.py.
| int picurv_cli.core.normalize_les_filter_width | ( | value | ) |
Maps LES grid-filter-width model names to the C -les_filter_width flag.
| [in] | value | Filter-width model name or integer code. |
| ValueError | if the input cannot be mapped. |
Definition at line 11857 of file core.py.
| int picurv_cli.core.normalize_les_averaging_mode | ( | value | ) |
Maps LES coefficient-averaging mode names to the C -les_averaging_mode flag.
| [in] | value | Averaging mode name or integer code. |
| ValueError | if the input cannot be mapped. |
Definition at line 11887 of file core.py.
| int picurv_cli.core.normalize_les_clip_mode | ( | value | ) |
Maps LES coefficient-limiting mode names to the C -les_clip_mode flag.
| [in] | value | Clipping mode name or integer code. |
| ValueError | if the input cannot be mapped. |
Definition at line 11917 of file core.py.
| str picurv_cli.core.normalize_les_averaging_directions | ( | value | ) |
Maps a list of homogeneous logical directions to the C flag's string form.
| [in] | value | List or string naming a subset of the i, j, and k directions. |
| ValueError | if a direction is unknown or repeated. |
Definition at line 11950 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 11981 of file core.py.
| int picurv_cli.core.normalize_wall_function_model | ( | value | ) |
Maps wall-function model selectors to the C -wallfunction flag.
| [in] | value | Wall-function selector name, or None for the default. |
| ValueError | if the input cannot be mapped. |
Definition at line 12009 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 12037 of file core.py.
| picurv_cli.core.append_les_parameter_flags | ( | dict | les_cfg, |
| list | control_lines | ||
| ) |
Appends the LES closure parameter flags from a structured les block.
| [in] | les_cfg | Parsed models.physics.turbulence.les mapping. |
| [out] | control_lines | A list of strings to which C-flags will be appended. |
| ValueError | if a selector name or nested block shape is unsupported. |
Definition at line 12052 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 12124 of file core.py.
| picurv_cli.core.control_value | ( | value, | |
| str | context | ||
| ) |
Guard a value that is written verbatim into the generated control file.
PETSc reads the control file line by line, so a value containing a newline writes additional option lines - which defeats every key-based check by smuggling a whole new flag. Rejecting the value is the only safe handling; there is no quoting that makes a multi-line option meaningful.
| [in] | value | Configured value destined for a control line. |
| [in] | context | YAML path, for the error message. |
| SystemExit | when the value would inject an option line. |
Definition at line 12175 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 12200 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 12243 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 12316 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 12326 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 12389 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, |
|||
| str | config_dir = None |
||
| ) |
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. |
| [in] | config_dir | Optional configuration revision directory. |
generate_solver_control_file(). Definition at line 12905 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 13179 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 13211 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 13271 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 13280 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 13319 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 13340 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 13352 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 13364 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 13402 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 13414 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 13433 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 13445 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 13477 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 13496 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 13604 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 13637 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 13665 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 13798 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 13860 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 13882 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 13932 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 13963 of file core.py.
|
protected |
Read the metrics table an earlier aggregation wrote, keyed by case id.
| [in] | results_dir | Study analysis directory holding metrics_table.csv. |
Definition at line 13980 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 13998 of file core.py.
|
protected |
Return a concise report label for a study parameter path.
| [in] | key | Dotted study parameter path. |
Definition at line 14090 of file core.py.
|
protected |
Resolve an optional configured metric label or humanize its name.
| [in] | study_cfg | Parsed study configuration. |
| [in] | metric | Metric column name. |
Definition at line 14107 of file core.py.
|
protected |
Parse one complete, finite numeric study-table column.
| [in] | rows | Metrics-table rows. |
| [in] | key | Column name. |
Definition at line 14125 of file core.py.
|
protected |
Infer the scientifically meaningful independent variable of a study.
| [in] | study_cfg | Parsed study configuration. |
| [in] | rows | Metrics-table rows. |
Definition at line 14144 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 14196 of file core.py.
|
protected |
Format a secondary study parameter compactly for a legend.
| [in] | value | Parameter value. |
Definition at line 14209 of file core.py.
|
protected |
Group metric points by any secondary varied study parameters.
| [in] | study_cfg | Parsed study configuration. |
| [in] | rows | Metrics-table rows. |
| [in] | axis | Inferred independent-axis metadata. |
| [in] | metric | Metric column name. |
Definition at line 14224 of file core.py.
|
protected |
Use log scaling only for positive data spanning a meaningful range.
| [in] | values | Candidate axis values. |
| [in] | semantic_hint | Whether the quantity is conventionally read logarithmically. |
Definition at line 14268 of file core.py.
|
protected |
Build padded linear limits that include zero for non-negative metrics.
| [in] | values | Finite metric values. |
Definition at line 14281 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 14296 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 14409 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 14418 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 14433 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 14863 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 14890 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 14922 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 | Dry-run plan produced by build_run_dry_plan(). |
| [in] | output_format | Either "text" or "json". |
Definition at line 14963 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 15034 of file core.py.
|
protected |
Hash an asset source or payload without loading it into memory.
| [in] | path | File to hash. |
Definition at line 15189 of file core.py.
|
protected |
Hash a JSON-compatible value with deterministic serialization.
| [in] | payload | Value to hash. |
Definition at line 15202 of file core.py.
|
protected |
Hash every existing file explicitly referenced by an asset provider.
| [in] | value | Provider subtree to inspect. |
| [in] | case_path | Owning case configuration path. |
| [in] | key | Current dotted key for diagnostics. |
Definition at line 15212 of file core.py.
| dict picurv_cli.core.build_case_asset_graph | ( | dict | case_cfg, |
| str | case_path | ||
| ) |
Classify case inputs into precomputable or simulator-runtime providers.
| [in] | case_cfg | Parsed case configuration. |
| [in] | case_path | Owning case YAML path. |
Definition at line 15248 of file core.py.
|
protected |
Resolve requested asset kinds plus dependency closure.
| [in] | graph | Provider graph returned by build_case_asset_graph. |
| [in] | requested | Optional iterable of requested kind names. |
| [in] | precomputable_only | Exclude runtime-C providers for normal-run staging. |
Definition at line 15376 of file core.py.
|
protected |
Enumerate canonical files belonging to one asset kind in a build tree.
| [in] | build_root | Temporary run-like build root. |
| [in] | kind | Asset kind. |
Definition at line 15415 of file core.py.
|
protected |
Execute existing generators into one isolated run-like build tree.
| [in] | build_root | Temporary output root. |
| [in] | case_cfg | Parsed case config. |
| [in] | case_path | Owning case path. |
| [in] | selected | Ordered selected providers. |
Definition at line 15443 of file core.py.
|
protected |
Read a canonical PICGRID and summarize what a user would want to check.
| [in] | path | Staged PICGRID file. |
Definition at line 15545 of file core.py.
|
protected |
Write a single-block ASCII VTS preview of a staged PICGRID.
Only the first block is written: the preview exists so a user can confirm the shape they configured, not to reproduce the solver's view of a multi-block domain.
| [in] | picgrid_path | Staged PICGRID file. |
| [in] | destination | Preview path to write. |
| [in] | dims | Per-block dimension triples. |
Definition at line 15582 of file core.py.
|
protected |
Produce the inspection material published beside an asset's payload.
Precompute exists so a user can look at a grid, field, or profile and change it before committing a solve. An asset that carries only opaque solver input cannot serve that purpose, so every published object gets a validation record and, where it is affordable, a preview.
| [in] | kind | Asset kind. |
| [in] | build_root | Temporary build tree. |
| [in] | provider | Provider metadata for the asset. |
| [in] | payload_files | Absolute payload paths produced for this asset. |
Definition at line 15628 of file core.py.
|
protected |
Publish one immutable content-addressed asset object atomically.
| [in] | workspace_root | Owning workspace. |
| [in] | build_root | Temporary build root. |
| [in] | provider | Provider metadata. |
| [in] | payload_files | Files produced for the provider. |
Definition at line 15716 of file core.py.
|
protected |
Return a collision-free, readable mutable asset-set name.
| [in] | workspace_root | Owning initialized workspace. |
| [in] | case_path | Source case configuration path. |
Definition at line 15790 of file core.py.
|
protected |
Atomically update the named asset set and workspace asset catalog.
| [in] | workspace_root | Owning workspace. |
| [in] | case_path | Source case YAML. |
| [in] | graph | Complete provider graph. |
| [in] | references | Newly published or reused asset references. |
Definition at line 15803 of file core.py.
| dict picurv_cli.core.precompute_case_assets | ( | str | workspace_root, |
| dict | case_cfg, | ||
| str | case_path, | ||
requested = None, |
|||
| bool | precomputable_only = False |
||
| ) |
Build and publish a selected deterministic asset dependency closure.
| [in] | workspace_root | Owning workspace. |
| [in] | case_cfg | Parsed case configuration. |
| [in] | case_path | Source case path. |
| [in] | requested | Requested asset kinds, or all configured providers. |
| [in] | precomputable_only | Drop runtime-C dependencies from the closure instead of refusing. For internal run-staging only: a run legitimately depends on a runtime-C grid that its own solver builds moments later, so its presence in the dependency closure is expected there, not an error. The standalone picurv precompute command leaves this False, since nothing will ever build a runtime-C provider in that context. |
Definition at line 15849 of file core.py.
|
protected |
Return the mutable asset-set pointer associated with a case config name.
| [in] | workspace_root | Owning workspace. |
| [in] | case_path | Source case path. |
Definition at line 15902 of file core.py.
| dict picurv_cli.core.plan_run_assets | ( | dict | case_cfg, |
| str | case_path | ||
| ) |
Plan reuse/build/runtime actions for all configured run providers.
| [in] | case_cfg | Parsed case configuration. |
| [in] | case_path | Source case path. |
Definition at line 15913 of file core.py.
|
protected |
Expose one immutable shared-asset file through reflink, hardlink, or copy.
| [in] | source | Immutable asset payload file. |
| [in] | destination | Run-local destination. |
Definition at line 15955 of file core.py.
| dict picurv_cli.core.materialize_run_assets | ( | str | run_dir, |
| dict | case_cfg, | ||
| str | case_path, | ||
| bool | require_precomputed = False, |
||
| bool | fetch_missing = False |
||
| ) |
Resolve/build workspace assets and write the exact run input lock.
| [in] | run_dir | Run receiving immutable input exposures. |
| [in] | case_cfg | Parsed case config. |
| [in] | case_path | Source case path. |
| [in] | require_precomputed | Refuse any missing deterministic asset. |
| [in] | fetch_missing | Request remote fetch before local build. |
Definition at line 15991 of file core.py.
| picurv_cli.core.precompute_workflow | ( | args | ) |
Resolve, preflight, and atomically publish reusable workspace assets.
| [in] | args | Parsed precompute command arguments. |
Definition at line 16103 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 16136 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 16807 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 16833 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 17125 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 17379 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 17447 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 17462 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 17474 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 17494 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 17511 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 17522 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 17589 of file core.py.
|
protected |
Build timestep-independent run metadata for summarize.
| [in] | context | Summary context returned by _build_summary_context(). |
Definition at line 17618 of file core.py.
|
protected |
Build compact turbulence and wall-model selections.
| [in] | turbulence_cfg | Case turbulence configuration mapping. |
Definition at line 17641 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 17661 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 17739 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 17776 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 17819 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 17864 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 17920 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 18043 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 18082 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 18114 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 18174 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 18232 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 18254 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 18305 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 18318 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 18386 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 18563 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 18607 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 18658 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 18671 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 18688 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 18702 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 18878 of file core.py.
|
protected |
Format one configuration-summary value for compact text output.
| [in] | value | Value to format. |
Definition at line 19141 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 19162 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 19175 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 19190 of file core.py.
|
protected |
Render run metadata as a compact dashboard.
| [in] | summary | Curated run overview mapping. |
Definition at line 19207 of file core.py.
|
protected |
Render the case summary as a glanceable simulation dashboard.
| [in] | summary | Curated case configuration mapping. |
Definition at line 19235 of file core.py.
|
protected |
Render the solver summary as a glanceable numerical-method dashboard.
| [in] | summary | Curated solver configuration mapping. |
Definition at line 19306 of file core.py.
|
protected |
Render the monitor summary as a glanceable observability dashboard.
| [in] | summary | Curated monitor configuration mapping. |
Definition at line 19348 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 19399 of file core.py.
|
protected |
Convert one machine-oriented identifier into a readable plot label.
| [in] | value | Dotted path or snake-case identifier. |
Definition at line 19547 of file core.py.
|
protected |
Return the report-facing label for one logged scalar field.
| [in] | field | Logged scalar field name. |
Definition at line 19563 of file core.py.
|
protected |
Resolve a record's physical time from its artifact or copied case configuration.
| [in] | context | Summary context with copied case configuration. |
| [in] | record | Collected plot record. |
Definition at line 19572 of file core.py.
|
protected |
Yields (segment, row) for each data line of a runtime diagnostics CSV.
The solver's runtime CSVs share one shape: a step,... header written once, data rows appended across the run, and a comment marker at each seam where a continuation resumed. Rows before the header, or whose width disagrees with it, are skipped rather than guessed at. segment counts the continuations seen so far, so a caller can keep restarts as separate series instead of drawing a line across the seam.
| path | Diagnostics CSV to read. |
(segment_index, {column: text}) pairs. Definition at line 19589 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. |
| [in] | coordinates | Optional independent variables carried by the source row. |
Definition at line 19618 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 19651 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 19660 of file core.py.
|
protected |
Collect the per-step scalar histories written by the spectra post stage.
Each spectra task keeps its own history file, so one task becomes one plotted line and several tasks compare directly on the same axes.
| [in] | context | Summary context returned by _build_summary_context(). |
Definition at line 19941 of file core.py.
Build available qualified-series metadata from plot records.
| [in] | records | Append-ordered plot record list. |
Definition at line 19987 of file core.py.
|
protected |
Select evenly distributed indices while always retaining both endpoints.
| [in] | count | Number of available ordered states. |
| [in] | maximum | Maximum states to retain. |
Definition at line 20011 of file core.py.
|
protected |
Build a plot.gen request drawing representative measured spectra.
A decaying flow has a different spectrum at every step, so states are never averaged. Up to six evenly spaced states are retained, including the first and last, to show evolution without an unreadable legend.
| [in] | context | Summary context returned by _build_summary_context(). |
| [in] | task | Task basename, or a unique substring of one. |
| [in] | reference | Overlay the staged initial-condition spectrum when available. |
| [in] | linear_y | Force linear axes instead of the log-log default. |
| [in] | output_path | Optional explicit output path. |
| ValueError | when no matching spectrum file exists. |
Definition at line 20023 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 20151 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 20285 of file core.py.
|
protected |
Invoke standalone plot.gen with one normalized request over stdin.
| [in] | request | Versioned normalized plot request. |
Definition at line 20302 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 20326 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 20458 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 20544 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 20564 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 20587 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 20596 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 20661 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 20681 of file core.py.
| tuple picurv_cli.core.staged_control_directories | ( | str | control_path | ) |
Read run-owned directory values from a staged control file.
Tokenizes with shlex because PETSc's options-file parser treats a double-quoted span as a single token. Splitting on whitespace would read -log_dir "/tmp/VICTIM DIR" as the value "/tmp/VICTIM, which looks relative and contained while PETSc would use the absolute path.
Malformed quoting is reported rather than skipped: a line the parser cannot interpret is exactly the case where preflight must not assume the run is safe.
| [in] | control_path | Path to a generated .control file. |
Definition at line 20696 of file core.py.
| list picurv_cli.core.preflight_config_directories | ( | str | root_dir | ) |
Every config directory under a run or study root that may hold a control file.
A study keeps its controls under cases/<member>/config, not at the study root, so a preflight that only looked at <root>/config was empty for every study. This walks the tree so members and nested runs are covered.
| [in] | root_dir | Run or study directory. |
Definition at line 20745 of file core.py.
| tuple picurv_cli.core.preflight_staged_run_directories | ( | str | root_dir | ) |
Re-check run-directory safety against an already-staged run or study.
Staging validates the configuration it is given, but a staged run can be edited, or produced by an older version, before submission. This re-reads the effective staged control files - across study members and nested runs - and applies the same rules as configuration validation, plus a physical containment check that a symlink cannot slip past.
| [in] | root_dir | Run or study directory being submitted. |
Definition at line 20767 of file core.py.
| list picurv_cli.core.read_text_file_lines | ( | str | path | ) |
Read a text file into a list of lines.
| [in] | path | File to read. |
Definition at line 20816 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 20826 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 20979 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 21085 of file core.py.
|
protected |
Infer the owned workspace role of one copied YAML file.
| [in] | path | YAML file copied from an example template. |
Definition at line 21210 of file core.py.
|
protected |
Rewrite copied template path scalars to workspace-root-relative homes.
| [in] | value | YAML subtree to rewrite. |
| [in] | replacements | Old relative/basename paths mapped to new workspace paths. |
Definition at line 21236 of file core.py.
|
protected |
Select the canonical role file from a template that may carry variants.
| [in] | candidates | Candidate absolute YAML paths. |
| [in] | role | Config role being selected. |
| [in] | template_name | Source example directory name. |
Definition at line 21253 of file core.py.
| dict picurv_cli.core.organize_initialized_workspace | ( | str | workspace_root, |
| str | template_name, | ||
| str | source_template_root = None |
||
| ) |
Convert a copied example into the canonical editable workspace layout.
| [in] | workspace_root | Newly copied workspace root. |
| [in] | template_name | Example template identity. |
| [in] | source_template_root | Optional original template root used to vendor references. |
Definition at line 21277 of file core.py.
| dict picurv_cli.core.import_workspace_input | ( | str | workspace_root, |
| str | kind, | ||
| str | source, | ||
| str | name = None, |
||
| str | mode = "copy" |
||
| ) |
Explicitly import or register one workspace input.
| [in] | workspace_root | Initialized workspace root. |
| [in] | kind | Semantic input kind. |
| [in] | source | Existing source file path. |
| [in] | name | Optional destination basename. |
| [in] | mode | Copy, reflink, hardlink, or external-reference mode. |
Definition at line 21477 of file core.py.
| picurv_cli.core.inputs_workflow | ( | args | ) |
Handle explicit workspace input management.
| [in] | args | Parsed inputs command arguments. |
Definition at line 21554 of file core.py.
| picurv_cli.core.version_workflow | ( | args | ) |
Report, and for the status action validate, the shared build identity.
Bare picurv version reports and always succeeds; it is an informational surface that scripts and documentation already depend on. picurv version status additionally exits non-zero when the conductor, the executables, and the workspace requirement do not agree, so a job script can refuse to launch a run whose provenance would be incoherent.
| [in] | args | Parsed version command arguments. |
Definition at line 21573 of file core.py.
|
protected |
Refuse version-changing Git operations in a dirty source checkout.
| [in] | action | User-facing action name. |
Definition at line 21629 of file core.py.
|
protected |
Run a checked Git command against the active PICurv source checkout.
| [in] | arguments | Git arguments excluding the executable. |
Definition at line 21648 of file core.py.
| picurv_cli.core.source_workflow | ( | args | ) |
Fetch source history without silently changing the active code.
| [in] | args | Parsed source command arguments. |
Definition at line 21663 of file core.py.
|
protected |
Resolve an exact version requested by an initialized workspace.
| [in] | workspace_root | Initialized workspace root. |
Definition at line 21675 of file core.py.
| picurv_cli.core.versions_workflow | ( | args | ) |
List or activate a release using the existing source/build owners.
| [in] | args | Parsed versions command arguments. |
Definition at line 21696 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; pass –pin-binaries to pin specific versions locally.
| [in] | args | The command-line arguments parsed by argparse. |
Definition at line 21745 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 21846 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 21898 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 21938 of file core.py.
|
protected |
|
protected |
| picurv_cli.core.StorageError = _storage_module.StorageError |
| picurv_cli.core.cold_study_members = _storage_module.cold_study_members |
| picurv_cli.core.restore_cold_study_members = _storage_module.restore_cold_study_members |
| picurv_cli.core.is_artifact_cold = _storage_module.is_artifact_cold |
| picurv_cli.core.read_artifact_identity = _storage_module.read_artifact_identity |
| picurv_cli.core.STORAGE_LOCK_FILENAME = _storage_module.STORAGE_LOCK_FILENAME |
| picurv_cli.core.STORAGE_STATE_FILENAME = _storage_module.STORAGE_STATE_FILENAME |
| picurv_cli.core.require_storage_payload_local = _storage_module.require_storage_payload_local |
| picurv_cli.core.runtime_stage_lock = _storage_module.runtime_stage_lock |
| picurv_cli.core.storage_state_summary = _storage_module.storage_state_summary |
| 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 |
| picurv_cli.core.VERSION_FILE = os.path.join(PACKAGE_PROJECT_ROOT, "VERSION") |
| str picurv_cli.core.PICURV_RELEASE_VERSION = _read_release_version() |
| dict picurv_cli.core.PICURV_BUILD = _source_build_identity(PICURV_RELEASE_VERSION) |
| dict picurv_cli.core.PICURV_VERSION = PICURV_BUILD["version"] |
| str picurv_cli.core.CASE_ORIGIN_METADATA_FILENAME = ".picurv-origin.json" |
| str picurv_cli.core.WORKSPACE_CONFIG_FILENAME = ".picurv-workspace.yml" |
| 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"} |
| dict picurv_cli.core.CHECKPOINT_REQUIRED_EULERIAN_FIELDS = {"Ucat", "Ucont", "Ucont_rm1", "P", "Nvert"} |
| tuple picurv_cli.core.WORKSPACE_DIRECTORY_LAYOUT |
| tuple picurv_cli.core.RUN_DIRECTORY_LAYOUT |
| dict picurv_cli.core.CANONICAL_RUN_PATHS |
| picurv_cli.core.INITIAL_CONDITION_SPECTRUM_RELPATH |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| picurv_cli.core.RUN_DIRECTORY_ROOTS |
| picurv_cli.core.RUN_ROOT_ALLOWED_FILES = frozenset({"manifest.json"}) |
| picurv_cli.core.STORAGE_OFFLOADED_STATES = frozenset({"COLD", "PARTIAL"}) |
| tuple picurv_cli.core.RUN_COMPONENT_STATES |
| tuple picurv_cli.core.RUN_COMPONENT_LAYOUT |
|
protected |
| 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" |
| tuple picurv_cli.core.RESTART_RUN_DIR_REQUIRED_MESSAGE |
|
protected |
| dict picurv_cli.core.POST_RUN_CONTROL_ALIASES |
| dict picurv_cli.core.GRID_GENERATOR_HYPHEN_KEY_HINTS |
| tuple picurv_cli.core.RETIRED_GENERATOR_DESTINATION_KEYS |
| dict picurv_cli.core.POST_SPECTRA_TASKS |
| tuple picurv_cli.core.POST_SPECTRA_SYMBOLS = ("continuum", "discrete") |
| tuple picurv_cli.core.POST_SPECTRA_MEAN_MODES = ("none", "domain") |
| tuple picurv_cli.core.POST_FIELD_STATISTICS_OUTPUTS = ("mean", "reynolds_stress", "rms", "tke", "flux") |
| tuple picurv_cli.core.POST_FIELD_STATISTICS_FORMATS = ("vtk", "csv") |
| tuple picurv_cli.core.GRID_MODES = ("file", "programmatic_c", "grid_gen") |
| tuple picurv_cli.core.GRID_GENERATOR_TYPES = ("box", "sweep") |
| tuple picurv_cli.core.GRID_CROSS_SECTION_KINDS = ("rectangle", "circle") |
| tuple picurv_cli.core.GRID_WALL_SEGMENT_KINDS = ("flat", "step", "ramp", "arc", "sine", "gaussian", "hill") |
| tuple picurv_cli.core.GRID_PATH_SEGMENT_KINDS = ("straight", "arc") |
| tuple picurv_cli.core.GRID_TRANSFORM_KINDS = ("anchor", "translate", "scale", "rotate", "mirror", "permute") |
| tuple picurv_cli.core.PARTICLE_RESTART_MODES = ("init", "load") |
| tuple picurv_cli.core.POST_EULERIAN_PIPELINE_TASKS = ("q_criterion", "normalize_field", "nodal_average") |
| tuple picurv_cli.core.POST_LAGRANGIAN_PIPELINE_TASKS = ("specific_ke",) |
| tuple picurv_cli.core.STUDY_TYPES = ("grid_independence", "timestep_independence", "sensitivity") |
| tuple picurv_cli.core.NEWTON_KRYLOV_PRECONDITIONER_MODELS = ("none", "frozen_momentum_jacobian") |
| tuple picurv_cli.core.NEWTON_KRYLOV_PRECONDITIONER_STRUCTURES = ("none", "point_block") |
| tuple picurv_cli.core.POISSON_PRECONDITIONER_TYPES = ("multigrid",) |
| dict picurv_cli.core.POISSON_PRECONDITIONER_SPELLINGS = {"mg": "multigrid", "pcmg": "multigrid"} |
| tuple picurv_cli.core.PRESCRIBED_FLOW_SOURCE_TYPES = ("file", "generated", "field_slice") |
| tuple picurv_cli.core.VERIFICATION_SCALAR_PROFILES = ("CONSTANT", "LINEAR_X", "SIN_PRODUCT") |
| tuple picurv_cli.core.STUDY_PLOT_FORMATS = ("png", "pdf", "svg") |
| tuple picurv_cli.core.PROFILING_TIMESTEP_MODES = ("off", "selected", "all") |
| tuple picurv_cli.core.GMRES_RESTART_METHODS = ("gmres", "fgmres", "lgmres") |
| tuple picurv_cli.core.ANALYTICAL_SOLUTION_TYPES = ("TGV3D", "ZERO_FLOW", "UNIFORM_FLOW") |
| tuple picurv_cli.core.LEGACY_FIELD_INIT_SPELLINGS = ("Zero", "Constant", "Poiseuille") |
| tuple picurv_cli.core.PROJECTION_OPERATORS = ("continuum", "picurv_discrete") |
| tuple picurv_cli.core.METRIC_SOURCE_KINDS = ("statistics_csv", "csv", "log_regex", "log") |
| tuple picurv_cli.core.POST_SPECTRA_SCALAR_COLUMNS |
| tuple picurv_cli.core.POST_STAGE_NAMES = ("fields", "spectra") |
| dict picurv_cli.core.GENERATED_PROFILE_GENERATORS = {"square_duct_poiseuille"} |
| dict picurv_cli.core.GRID_GENERATOR_CHOICE_FLAGS |
| dict picurv_cli.core.GRID_GENERATOR_SPEC_FLAGS |
| dict picurv_cli.core.BC_FACE_MAP |
| dict picurv_cli.core.BC_TYPE_MAP |
|
protected |
|
protected |
|
protected |
| dict picurv_cli.core.STATISTICS_ELIGIBLE_FIELDS |
| tuple picurv_cli.core.STATISTICS_MOMENT_NAMES = ("first", "second") |
| tuple picurv_cli.core.STATISTICS_WEIGHTING_MODES = ("sample", "physical_time") |
|
protected |
|
protected |
|
protected |
|
protected |
| tuple picurv_cli.core.RUN_OWNED_DIRECTORY_KEYS = ("log", "output") |
| str picurv_cli.core.UNSAFE_PATHS_OVERRIDE_KEY = "allow_unsafe_paths" |
| tuple picurv_cli.core.RESERVED_RUN_DIRECTORY_NAMES = ("config", "scheduler", "checkpoints", "visualization") |
| dict picurv_cli.core.RUN_DIRECTORY_DEFAULTS = {"log": "logs", "output": "output"} |
| tuple picurv_cli.core.RESERVED_DIRECTORY_FLAGS |
| tuple picurv_cli.core.RESERVED_INDIRECTION_FLAGS = ("-options_file", "-options_file_yaml", "-alias") |
| tuple picurv_cli.core.UNSAFE_DIRECTORY_CHARACTERS = ('"', "'", "#", "\n", "\r", "\t") |
| str picurv_cli.core.PHYSICAL_VERDICT_CONTAINED = "contained" |
| str picurv_cli.core.PHYSICAL_VERDICT_RELATIVE_ESCAPE = "relative_escape" |
| str picurv_cli.core.PHYSICAL_VERDICT_EXTERNAL_ABSOLUTE = "external_absolute" |
| picurv_cli.core.WAIVABLE_PHYSICAL_VERDICTS = frozenset({PHYSICAL_VERDICT_EXTERNAL_ABSOLUTE}) |
| dict picurv_cli.core.DIAGNOSTICS_PETSC_KEYS |
| tuple picurv_cli.core.PROGRAMMATIC_GENERATED_IC_GRID_KEYS |
| tuple picurv_cli.core.GRID_DA_PROCESSOR_KEYS = ("da_processors_x", "da_processors_y", "da_processors_z") |
| dict picurv_cli.core.GENERATED_IC_PROVIDERS |
| tuple picurv_cli.core.LES_AVERAGING_DIRECTION_AXES = ("i", "j", "k") |
| dict picurv_cli.core.SOLVER_MONITORING_POISSON_FLAG_MAP |
| dict picurv_cli.core.SOLVER_MONITORING_MOMENTUM_FLAG_MAP |
| dict picurv_cli.core.KRYLOV_KSP_TYPES |
|
protected |
| dict picurv_cli.core.ASSET_KIND_DIRECTORIES |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |