Inputs module (inputs.h)
Functions
-
PetscErrorCode readfmParams(const PetscMPIInt size, fmParams *params)
Reads and validates CSEM CLI parameters from PETSc options.
Extracts the required runtime parameters (input/output paths) from the PETSc options database. The finite-element basis order -nord is optional: when omitted, params->nord is set to 0 so loadCsemInputs takes the order from the input bundle.
This function extracts required runtime parameters from the PETSc options database, including input/output paths and the finite-element basis order. All parameters are mandatory except -nord, which can optionally override the value stored in the input bundle.
The -nord option is mainly intended for debugging runs. If not provided, fm_Params->nord is set to 0, meaning the value will be taken from the input bundle by loadCsemInputs.
- Parameters:
size – [in] Number of MPI tasks.
params – [out] Struct receiving the parsed CSEM parameters.
size – [in] Number of MPI tasks.
fm_Params – [out] Struct containing parsed CSEM parameters.
- Returns:
PetscErrorCode PETSC_SUCCESS on success, or a PETSc error code otherwise.
- Returns:
PetscErrorCode PETSC_SUCCESS on success, or a PETSc error code otherwise.
-
struct fmParams
- #include <inputs.h>
Parsed user-input parameters consumed by the PETGEM kernels.
Public Members
-
char inputFile[PETSC_MAX_PATH_LEN]
Unified PETGEM input bundle (HDF5) - contains mesh topology, sections, per-cell conductivity + materials_id, receivers (under /receivers), and single-frequency forward sources (under /sources/…). Produced by runPreprocessing() on the Python side. Consumed by loadCsemInputs().
-
char outputDirectory[PETSC_MAX_PATH_LEN]
Output directory path.
-
char outputFilename[PETSC_MAX_PATH_LEN]
Output filename stem for responses.
-
PetscInt nord
Finite-element basis order (0 = take from bundle).
-
PetscMPIInt numMPITasks
Number of MPI tasks in the run.
-
PetscBool quiet
Suppress per-call assembly headers (“Assembly RHS:”, “Vector size”, “Initiated”, “Finished”, “Assembly K + M(sigma)”, etc.) emitted by src/assembly.c. Default PETSC_FALSE preserves current fm.csem output; the inversion kernel sets this to PETSC_TRUE to silence repeated per-frequency / per-iteration headers in the L-BFGS loop.
-
char inputFile[PETSC_MAX_PATH_LEN]