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.

INV_VTU_NUM_FIELDS

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

INV_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.

INV_MAX_FREQUENCIES

Max number of inversion frequencies.

Variables

const PetscInt EDGE_VERTICES[NUM_EDGES_PER_CELL][NUM_VERTICES_PER_EDGE]

Reference-cell local connectivity tables (defined in constants.c).

Reference-cell local connectivity tables (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 in assembling edge-based finite element matrices and evaluating edge integrals.

const PetscInt FACE_VERTICES[NUM_FACES_PER_CELL][NUM_VERTICES_PER_FACE]

Face-to-vertex mapping for a tetrahedral reference cell.

Defines which three vertices form each triangular face of a tetrahedron. The faces are numbered from 0 to 3:

  • Face 0: vertices {0, 1, 2}

  • Face 1: vertices {0, 1, 3}

  • Face 2: vertices {0, 2, 3}

  • Face 3: vertices {1, 2, 3} Used in face integration, boundary condition application, and finite element assembly.

const PetscInt REFERENCE_CELL[NUM_DIMENSIONS][NUM_VERTICES_PER_CELL]

Reference coordinates of vertices for a tetrahedral cell.

Defines the local coordinates of the four vertices in a reference tetrahedron (unit tetrahedron). Each column corresponds to a vertex; each row corresponds to a spatial dimension (x, y, z):

  • Vertex 0: (0, 0, 0)

  • Vertex 1: (1, 0, 0)

  • Vertex 2: (0, 1, 0)

  • Vertex 3: (0, 0, 1) Used in mapping reference elements to physical mesh elements and in computing shape functions.

const PetscReal NORD1_1DGAUSSPOINTS[1][2]

1D Gauss quadrature points/weights by order (defined in constants.c).

1D Gauss quadrature points/weights by order (defined in constants.c).

const PetscReal NORD2_1DGAUSSPOINTS[2][2]

1D Gauss quadrature points and weights for 2-point rule.

const PetscReal NORD3_1DGAUSSPOINTS[3][2]

1D Gauss quadrature points and weights for 3-point rule.

const PetscReal NORD4_1DGAUSSPOINTS[4][2]

1D Gauss quadrature points and weights for 4-point rule.

const PetscReal NORD5_1DGAUSSPOINTS[5][2]

1D Gauss quadrature points and weights for 5-point rule.

const PetscReal NORD6_1DGAUSSPOINTS[6][2]

1D Gauss quadrature points and weights for 6-point rule.

const PetscReal NORD7_1DGAUSSPOINTS[7][2]

1D Gauss quadrature points and weights for 7-point rule.

const PetscReal NORD8_1DGAUSSPOINTS[8][2]

1D Gauss quadrature points and weights for 8-point rule.

const PetscReal NORD11_1DGAUSSPOINTS[11][2]

1D Gauss quadrature points and weights for 11-point rule.

const PetscReal NORD1_2DGAUSSPOINTS[1][3]

2D (triangle) Gauss quadrature points/weights by order.

2D (triangle) Gauss quadrature points/weights by order.

const PetscReal NORD2_2DGAUSSPOINTS[3][3]

2D Gauss quadrature points and weights for 3-point triangle rule.

const PetscReal NORD3_2DGAUSSPOINTS[4][3]

2D Gauss quadrature points and weights for 4-point triangle rule.

const PetscReal NORD4_2DGAUSSPOINTS[6][3]

2D Gauss quadrature points and weights for 6-point triangle rule.

const PetscReal NORD5_2DGAUSSPOINTS[7][3]

2D Gauss quadrature points and weights for 7-point triangle rule.

const PetscReal NORD6_2DGAUSSPOINTS[12][3]

2D Gauss quadrature points and weights for 12-point triangle rule.

const PetscReal NORD7_2DGAUSSPOINTS[13][3]

2D Gauss quadrature points and weights for 13-point triangle rule.

const PetscReal NORD8_2DGAUSSPOINTS[15][3]

2D Gauss quadrature points and weights for 15-point triangle rule.

const PetscReal NORD9_2DGAUSSPOINTS[19][3]

2D Gauss quadrature points and weights for 19-point triangle rule.

const PetscReal NORD10_2DGAUSSPOINTS[25][3]

2D Gauss quadrature points and weights for 25-point triangle rule.

const PetscReal NORD11_2DGAUSSPOINTS[27][3]

2D Gauss quadrature points and weights for 27-point triangle rule.

const PetscReal NORD12_2DGAUSSPOINTS[33][3]

2D Gauss quadrature points and weights for 33-point triangle rule.

const PetscReal NORD13_2DGAUSSPOINTS[37][3]

2D Gauss quadrature points and weights for 37-point triangle rule.

const PetscReal NORD14_2DGAUSSPOINTS[42][3]

2D Gauss quadrature points and weights for 42-point triangle rule.

const PetscReal NORD15_2DGAUSSPOINTS[48][3]

2D Gauss quadrature points and weights for 48-point triangle rule.

const PetscReal NORD16_2DGAUSSPOINTS[52][3]

2D Gauss quadrature points and weights for 52-point triangle rule.

const PetscReal NORD17_2DGAUSSPOINTS[61][3]

2D Gauss quadrature points and weights for 61-point triangle rule.

const PetscReal NORD18_2DGAUSSPOINTS[70][3]

2D Gauss quadrature points and weights for 70-point triangle rule.

const PetscReal NORD19_2DGAUSSPOINTS[73][3]

2D Gauss quadrature points and weights for 73-point triangle rule.

const PetscReal NORD1_3DGAUSSPOINTS[1][4]

3D (tetrahedron) Gauss quadrature points/weights by order.

3D (tetrahedron) Gauss quadrature points/weights by order.

const PetscReal NORD2_3DGAUSSPOINTS[4][4]

3D Gauss quadrature points and weights for 4-point tetrahedral rule.

const PetscReal NORD3_3DGAUSSPOINTS[5][4]

3D Gauss quadrature points and weights for 5-point tetrahedral rule.

const PetscReal NORD4_3DGAUSSPOINTS[11][4]

3D Gauss quadrature points and weights for 11-point tetrahedral rule.

const PetscReal NORD5_3DGAUSSPOINTS[14][4]

3D Gauss quadrature points and weights for 14-point tetrahedral rule.

const PetscReal NORD6_3DGAUSSPOINTS[24][4]

3D Gauss quadrature points and weights for 24-point tetrahedral rule.

const PetscReal NORD7_3DGAUSSPOINTS[31][4]

3D Gauss quadrature points and weights for 31-point tetrahedral rule.

const PetscReal NORD8_3DGAUSSPOINTS[43][4]

3D Gauss quadrature points and weights for 43-point tetrahedral rule.

const PetscReal NORD9_3DGAUSSPOINTS[53][4]

3D Gauss quadrature points and weights for 53-point tetrahedral rule.

const PetscReal NORD10_3DGAUSSPOINTS[126][4]

3D Gauss quadrature points and weights for 126-point tetrahedral rule.

const PetscReal NORD12_3DGAUSSPOINTS[210][4]

3D Gauss quadrature points and weights for 210-point tetrahedral rule.