Skip to content

Support custom input file paths via command-line flag #45

Description

@01stamat

Background

Running GORILLA currently requires all input files (gorilla.inp, tetra_grid.inp, field_divB0.inp, gorilla_plot.inp, preload_for_SYNCH.inp, …) to reside in the working directory from which test_gorilla_main.x is executed, under their fixed conventional names. The filenames are hardcoded across multiple source modules (e.g. gorilla_settings_mod.f90, tetra_grid_settings_mod.f90, field_divB0.f90, …). This makes certain workflows cumbersome and breaks location-independence of the executable.

Proposed change

Add the option to specify the location of input files at execution time, for example:

./test_gorilla_main.x -input /path/to/input/dir
# or
./test_gorilla_main.x --input-dir /path/to/input/dir

or possibly even individual input files living in different directories. Existing behaviour — reading from the current working directory — is kept as the default so that no current workflow breaks.

Scope

  • Parse an optional -input <dir> (or equivalent) flag from the command line at startup.
  • Pass the resolved path or input files through to every module that opens a named input file.
  • Fall back to the current working directory when the flag is absent (fully backward-compatible).
  • Update the README / documentation to describe the new flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions