Constants module (constants.h)

Defines

MU

Magnetic permeability of free space μ₀ (H/m).

NUM_FACES_PER_CELL

Reference tetrahedral-cell topology counts and fixed array sizes.

Faces per tetrahedron.

NUM_EDGES_PER_CELL

Edges per tetrahedron.

NUM_VERTICES_PER_CELL

Vertices per tetrahedron.

NUM_EDGES_PER_FACE

Edges per triangular face.

NUM_VERTICES_PER_EDGE

Vertices per edge.

NUM_VERTICES_PER_FACE

Vertices per triangular face.

NUM_DIMENSIONS

Spatial dimensions.

NUM_H1_DOF_PER_CELL

P1 H1 (vertex) DOFs per cell.

NUM_CONDUCTIVITY_COMPONENTS

Conductivity components (σx, σy, σz).

NUM_MATERIALS_ID_COMPONENTS

Material-id components per cell.

MAX_TRANSITIVE_CLOSURE_SIZE

Upper bound on DMPlex closure size.

IM_VTU_NUM_FIELDS

Cell-data fields written per VTU piece (rho_ohm_m).

FE_NODAL_MAX_ORDER

Highest supported order; sizes the 1D factor tables.

FEM_MAX_ND_DOF
FEM_MAX_H1_DOF
IM_MAX_FIXED_MATERIALS

Inversion-kernel array caps (compile-time constants).

Sized at struct-definition time so they must be compile-time constants. Bump and recompile if a use case exceeds these; setupInversionSources errors when exceeded, and the fixed-materials option array is sized to the cap on read. Max number of held-fixed materials.

IM_MAX_FREQUENCIES

Max number of inversion frequencies.

Variables

const PetscInt EDGE_VERTICES[NUM_EDGES_PER_CELL][NUM_VERTICES_PER_EDGE]

Reference-cell local edge-to-vertex table (defined in constants.c).

Reference-cell local edge-to-vertex table (defined in constants.c).

Defines which two vertices form each edge in a tetrahedron. The edges are numbered from 0 to 5, corresponding to:

  • Edge 0: vertex 0 –> vertex 1

  • Edge 1: vertex 1 –> vertex 2

  • Edge 2: vertex 2 –> vertex 0

  • Edge 3: vertex 0 –> vertex 3

  • Edge 4: vertex 3 –> vertex 1

  • Edge 5: vertex 2 –> vertex 3 Used when reporting per-edge connectivity and midpoints.