Overview
PETGEM provides two execution modes built on the same high-order vector finite element core: forward modeling of the 3D Controlled-Source Electromagnetic (CSEM) response, and inverse modeling (inversion) that recovers a subsurface conductivity model from observed data. Both modes share the same meshes, conductivity description, and preprocessing pipeline, and differ only in the kernel that consumes the prepared input.
Execution modes
PETGEM ships three binaries (built by make into build/):
fm.csem: the forward kernel (single-purpose).im.csem: the inverse kernel (single-purpose).petgem: a unified dispatcher that selects the mode from the command line:./petgem modeling -options_file params.txt # forward (== fm.csem) ./petgem inverse -options_file params.txt # inverse (== im.csem)
The single-purpose binaries and the matching petgem mode run identical
code paths; use whichever fits your workflow.