Regularization
Sentinel provides 10 regularization methods in three categories: penalty methods (added to the objective), Hessian modifiers (modify the update direction), and post-processing methods (applied after each iteration).
See the Mathematical Reference for complete functional definitions.
Abstract Interface
Sentinel.AbstractRegularization Type
AbstractRegularizationAbstract supertype for all regularization methods.
sourceSentinel.WeightSchedule Type
WeightScheduleLinear interpolation of a regularization weight from start_weight to end_weight over iterations delay+1 through max_iter.
Before iteration delay, the weight is 0. After max_iter, it stays at end_weight.
Ports the weight ramp-up logic from the Fortran regularization modules.
sourceSentinel.evaluate_weight Function
evaluate_weight(ws::WeightSchedule, iteration::Int) -> Float64Evaluate the scheduled weight at the given iteration. Returns 0 for iterations ≤ delay, then linearly interpolates.
sourcePenalty Methods
Tikhonov
Sentinel.TikhonovReg Type
TikhonovReg <: AbstractRegularizationTikhonov (L2) regularization penalizing deviation from reference values.
Fields
prop_index::Int: which material property (1-based) this applies toweight_real::WeightSchedule: weight schedule for real partweight_imag::WeightSchedule: weight schedule for imaginary parttheta_ref_real::Vector{Float64}: (npr,) reference values for real parttheta_ref_imag::Vector{Float64}: (npi,) reference values for imaginary part
Total Variation
Sentinel.TotalVariationReg Type
TotalVariationReg <: AbstractRegularizationTotal Variation regularization with smooth (Huber-like) approximation.
Fields
prop_index::Int: which material property (1-based)weight_real::WeightSchedule: weight schedule for real partweight_imag::WeightSchedule: weight schedule for imaginary partepsilon::Float64: smoothing parameter δ for √(|∇θ|² + ε²)active::Bool: false on first iteration, true after update_weights!mtrl_mesh::MaterialMesh: hex8 material mesh for integrationnode_to_elements::Vector{Vector{Int}}: precomputed inverse connectivity
Soft Prior
Region-based Laplacian penalty:
Sentinel.SoftPriorReg Type
SoftPriorReg <: AbstractRegularizationSoft prior regularization using region-based Laplacian penalty.
Fields
prop_index::Int: which material property (1-based)weight_real::WeightSchedule: weight schedule for real partweight_imag::WeightSchedule: weight schedule for imaginary partregion_info::RegionInfo: region assignment for material mesh nodes
Sentinel.RegionInfo Type
RegionInfoRegion assignment information for nodes in a material mesh. Used by soft prior regularization to penalize deviation within regions.
Fields
node_region::Vector{Int}: (nn,) region ID per node (0 = no region)nregions::Int: number of distinct regionsregion_node_count::Vector{Int}: (nregions,) node count per regionregion_node_lists::Vector{Vector{Int}}: (nregions,) node lists per region
Exterior Constraint
Sentinel.ExteriorConstraintReg Type
ExteriorConstraintReg <: AbstractRegularizationExterior constraint penalty that enforces parameter bounds.
Penalty is zero when parameters are within bounds and grows quadratically with violation magnitude. The scalar s = prop.scalar[1] (real) or prop.scalar[2] (imaginary) converts from stored normalized values to physical units before checking bounds.
Fields
prop_index::Int: which material property (1-based)weight::Float64: penalty weightmin_real::Float64: minimum allowed physical real valuemax_real::Float64: maximum allowed physical real valuemin_imag::Float64: minimum allowed physical imaginary valuemax_imag::Float64: maximum allowed physical imaginary value
Hessian Modifiers
Joachimowicz
Scales the diagonal Hessian:
Sentinel.JoachimowiczReg Type
JoachimowiczReg <: AbstractRegularizationJoachimowicz Hessian regularization.
Adds avg_diag · total_error · w to each diagonal entry of the Hessian for the specified property parameters.
Fields
prop_index::Int: which material property (1-based)weight::WeightSchedule: weight schedule
Marquardt
Normalized Levenberg-Marquardt damping: normalize
Sentinel.MarquardtReg Type
MarquardtReg <: AbstractRegularizationLevenberg-Marquardt Hessian regularization with adaptive weight.
Fields
prop_index::Int: which material property (1-based)current_weight::Float64: current λ valuestart_weight::Float64: initial λ value (for reset)min_weight::Float64: minimum λ value (floor)delta::Float64: reduction factor (< 1.0) applied on successful stepsadjust_threshold::Float64: |1−α| threshold for adaptation
Sentinel.normalize_and_regularize! Function
normalize_and_regularize!(H, grad_vec, reg::MarquardtReg, grad::MaterialGradient,
material::Material) -> Vector{Float64}Perform the Marquardt normalization and regularization in-place:
Compute D_k = √|H[k,k]| for relevant parameters
Normalize: H[i,j] /= D_i·D_j, grad[k] /= D_k
Add λ to diagonal: H[k,k] += reg.current_weight
Returns the scaling vector D for post-solve rescaling.
sourceSentinel.rescale_solution! Function
rescale_solution!(delta_theta, D, reg::MarquardtReg, grad::MaterialGradient,
material::Material)Rescale the Marquardt solution: Δθ[k] /= D_k for relevant parameters.
sourcePost-Processing Methods
Van Houten
Clips power-law exponents to
Sentinel.VanHoutenReg Type
VanHoutenReg <: AbstractRegularizationVan Houten post-processing regularization.
Clips power-law exponent values prop.rvalue[k, 2] and prop.ivalue[k, 2] to the range [-level, level] for properties with nvpp >= 3.
Fields
level::Float64: maximum allowed power-law exponent magnitude
Sentinel.apply_van_houten! Function
apply_van_houten!(material::Material, reg::VanHoutenReg)Clip power-law exponents in all properties with nvpp >= 3 to [-level, level].
Spatial Filter
Gaussian smoothing with widths
Sentinel.SpatialFilterReg Type
SpatialFilterReg <: AbstractRegularizationSpatial filter (Gaussian smoothing) post-processing regularization.
Fields
prop_index::Int: which material property (1-based)sigma_real_init::Float64: initial Gaussian width for real partsigma_real_final::Float64: final Gaussian width for real partsigma_imag_init::Float64: initial Gaussian width for imaginary partsigma_imag_final::Float64: final Gaussian width for imaginary partmax_iter::Int: total global iterations (for weight interpolation)const_reg_iters::Int: constant regularization iterations at endcutoff_multiplier::Float64: neighbor search radius = max_sigma × cutoff_multipliermtrl_mesh::MaterialMesh: material mesh for coordinate lookupneighbor_indices::Vector{Vector{Int}}: precomputed neighbor lists per nodeneighbor_distances::Vector{Vector{Float64}}: precomputed distances per noderegion_info::Union{RegionInfo, Nothing}: optional region constraintssensitivity_mask::Union{BitVector, Nothing}: optional mask for GP-covered nodes (Fortran nodsense)
Sentinel.apply_spatial_filter! Function
apply_spatial_filter!(material::Material, reg::SpatialFilterReg;
iteration::Int=1)Apply Gaussian spatial smoothing to material property values: θ_filtered[i] = Σ_j w_j·θ_j / Σ_j w_j where w_j = exp(−d²/(2σ²)).
Sigma is interpolated between init and final values based on iteration.
sourceBounds (McGarry)
Enforces Poisson ratio bounds via clipping.
Sentinel.BoundsReg Type
BoundsReg <: AbstractRegularizationMcGarry bounds post-processing regularization.
Fields
max_poisson::Float64: maximum allowed Poisson's ratio (e.g., 0.485) for Model 3property_bounds::Vector{PropertyBounds}: per-property min/max constraints
Sentinel.apply_mcgarry_bounds! Function
apply_mcgarry_bounds!(material::Material, reg::BoundsReg)Enforce material property bounds (post-processing, no gradient contribution).
General min/max clamping: for each constrained property, clamp
scalar * rvalueto[min, max](matching Fortran mcgarrybounds.f90).Model 3 Poisson ratio: clamp λ so that ν ≤ ν_max.
CG Update Scaling
Sentinel.cg_update_scale Function
cg_update_scale(alpha, material_orig, material_new, threshold) -> Float64Scale the CG step size alpha so that the relative material change does not exceed threshold.
Computes eps = material_epsilon(orig, new), then:
If
eps > threshold: returnalpha * threshold / epsOtherwise: return
alphaunchanged