import { VecN } from '@holotope/core'; import { type SimplexConstitutiveEvaluationN } from './simplex-constitutive.js'; import { type SimplexConstitutiveHessianVectorEvaluationN } from './simplex-constitutive-curvature.js'; /** Compactly supported lower-measure barrier in intrinsic simplex coordinates. */ export interface SimplexMeasureBarrierMaterialN { /** Hard lower chart boundary `m`; evaluation requires `J > m`. */ readonly minimumMeasureRatio: number; /** Barrier activation ratio `a`, with `m < a <= 1`. */ readonly activationMeasureRatio: number; /** Positive energy-density scale `kappa`. */ readonly stiffness: number; } export interface SimplexMeasureBarrierEvaluationN extends SimplexConstitutiveEvaluationN { /** Whether `minimumMeasureRatio < J < activationMeasureRatio`. */ readonly active: boolean; /** Positive intrinsic or orientation-preserving signed current/rest ratio. */ readonly measureRatio: number; /** `(J - minimum) / (activation - minimum)`; may exceed one when inactive. */ readonly normalizedGap: number; /** `d energyDensity / dJ`. */ readonly energyDerivativeByMeasureRatio: number; /** `d^2 energyDensity / dJ^2`. */ readonly energySecondDerivativeByMeasureRatio: number; } export declare const SIMPLEX_MEASURE_BARRIER_LAW_ID = "simplex-measure-barrier"; /** * Evaluates a C2-clamped logarithmic lower-measure barrier on a k-simplex. * * The energy is a proactive force, not an inversion guarantee. Pair it with * accepted-state and continuous-chord guards when the lower boundary is a * simulation invariant. */ export declare function evaluateSimplexMeasureBarrierN(restPositions: readonly VecN[], currentPositions: readonly VecN[], material: SimplexMeasureBarrierMaterialN): SimplexMeasureBarrierEvaluationN; /** * Evaluates the exact matrix-free lower-measure-barrier Hessian direction. * * Outside the compact activation interval the potential, gradient, and * curvature products are all exactly zero. * * The compact support carries into the curvature for the same reason it * holds for the energy: an element comfortably above the activation ratio is * not merely cheap to evaluate, it contributes nothing at all, so an * inactive element cannot bias a direction it should have no opinion about. * * @example * Flattening a unit tetrahedron towards its base drives the measure ratio * `J` down. Above the activation ratio the barrier is silent in energy and * in curvature alike; below it, both rise steeply towards the hard chart * boundary at `minimumMeasureRatio`: * ```ts * const rest = [ * new VecN([0, 0, 0]), new VecN([1, 0, 0]), * new VecN([0, 1, 0]), new VecN([0, 0, 1]) * ]; * const material = { * minimumMeasureRatio: 0.1, activationMeasureRatio: 0.6, stiffness: 1 * }; * const directions = [ * new VecN([0, 0, 0]), new VecN([0, 0, 0]), * new VecN([0, 0, 0]), new VecN([0, 0, -1]) * ]; * const flattenedTo = [0.8, 0.3].map((height) => [ * new VecN([0, 0, 0]), new VecN([1, 0, 0]), * new VecN([0, 1, 0]), new VecN([0, 0, height]) * ]); * * const curvatures = flattenedTo.map((current) => * evaluateSimplexMeasureBarrierHessianVectorN(rest, current, directions, material) * ); * * // J = 0.8, above activation: exactly zero, not merely small. * // J = 0.3, inside the support: the element resists being flattened. * curvatures.map((c) => c.products.every((p) => p.lengthSq() === 0)); // [true, false] * curvatures.map((c) => c.netProductResidual); // [0, 0] — translation invariant either way * ``` */ export declare function evaluateSimplexMeasureBarrierHessianVectorN(restPositions: readonly VecN[], currentPositions: readonly VecN[], directions: readonly VecN[], material: SimplexMeasureBarrierMaterialN): SimplexConstitutiveHessianVectorEvaluationN; //# sourceMappingURL=simplex-measure-barrier-material.d.ts.map