ogs5py.tools.download

Downloader for ogs5.

Downloader

A downloading routine to get the OSG5 executable.

download_ogs([version, system, path, name, …]) Download the OGS5 executable.
add_exe(ogs_exe[, dest_name]) Add an OGS5 exe to OGS5PY_CONFIG.
reset_download() Reset all downloads in OGS5PY_CONFIG.
OGS5PY_CONFIG Standard config path for ogs5py.

add_exe(ogs_exe, dest_name=None)[source]

Add an OGS5 exe to OGS5PY_CONFIG.

Parameters:
  • ogs_exe (str) – Path to the ogs executable to be copied.
  • dest_name (str, optional) – Destination file name. Default: basename of ogs_exe
Returns:

dest – If an OGS5 executable was successfully copied, the file-path is returned.

Return type:

str

download_ogs(version='5.7', system=None, path='/home/docs/.config/ogs5py', name=None, build=None)[source]

Download the OGS5 executable.

Parameters:
  • version (str, optional) – Version to download (“5.7”, “5.8”, “latest” or “stable”). Default: “5.7”
  • system (str, optional) – Target system (Linux, Windows, Darwin). Default: platform.system()
  • path (str, optional) – Destination path. Default: OGS5PY_CONFIG
  • name (str, optional) – Destination file name. Default “ogs[.exe]”
  • build (str, optional) –

    If system is “Linux” and version is “latest” or “stable”, you can select a certain build from the ogs 5 builds:

    • ”BRNS”: Biogeochemical Reaction Network Simulator
    • ”FEM”: Finite Element Method
    • ”GEMS”: Gibbs Energy Minimization Solver
    • ”IPQC”: IPhreeqc
    • ”LIS”: Library of Iterative Solvers
    • ”MKL”: Intel Math Kernel Library
    • ”MPI”: Message Passing Interface
    • ”PETSC”: Portable, Extensible Toolkit for Scientific Computation
    • ”PETSC_GEMS”: PETSC and GEMS
    • ”PQC”: PHREEQC
    • ”SP”: Sparse solver
Returns:

dest – If an OGS5 executable was successfully downloaded, the file-path is returned.

Return type:

str

Notes

There is only an executable on “Darwin” for version “5.7”.

Taken from:

Get links from url ending with ext and containing build.

reset_download()[source]

Reset all downloads in OGS5PY_CONFIG.

OGS5PY_CONFIG = '/home/docs/.config/ogs5py'

Standard config path for ogs5py.

Type:str