Set the relative energy floor of the amplitude gate. An element whose gate energy g satisfies
g <= max( epsilon(1.0_prec), relativeEnergyFloor*energyScale )
carries no resolvable signal at the scale of the field and is reported perfectly resolved (sigma_e = log10(epsilon) -> SELF_AMR_COARSEN) whatever the shape of its modal spectrum.
Dimensionless, and an ENERGY fraction, so it is the square of the corresponding amplitude fraction: 1e-12 gates amplitudes below 1e-6 (-120 dB) of the field scale, 1e-8 gates amplitudes below 1e-4 (-80 dB). Must lie in [0,1); 0 disables the relative floor and restores the pure absolute (machine-epsilon) guard.
Raising this beyond the default trades against refinement depth - the gate cannot tell residue from the flank of an under-resolved feature - and has been measured to cost more than it saves on a propagating-wave problem. See SELF_AMR_DEFAULT_RELFLOOR.
significantEnergyFloor, when supplied, is the UPPER edge of a hysteresis band on the energy axis, exactly analogous to the refine/coarsen band on sigma_e:
g <= quiescent floor -> COARSEN, whatever the spectrum says quiescent floor < g <= significant -> SELF_AMR_KEEP g > significant floor -> the spectrum decides, as before
Without it the amplitude gate is a single hard cut, so an element whose energy drifts across that one value flips COARSEN <-> REFINE on successive epochs - the thrashing the two sigma thresholds exist to prevent, reintroduced on the other axis. The middle zone says "too weak to be worth spending levels on, too strong to declare resolved", which is the honest answer there and is stable under a small change in amplitude.
Must satisfy quiescent floor <= significant floor < 1. It defaults to the quiescent floor, which collapses the band to the single cut and reproduces the ungapped behaviour exactly.
KEEP THE BAND NARROW. Its upper edge is functionally "do not spend levels below this energy", which is the same knob as the floor itself and carries the same cost in refinement depth. Measured on the ultrasound benchmark's initial adaptation (see SELF_AMR_DEFAULT_RELFLOOR), with a quiescent floor of 1e-12:
significant floor 1e-12 3e-12 1e-11 3e-11 1e-10 elements / level 328/2 328/2 268/1 268/1 268/1
A band up to ~3x the floor leaves refinement depth untouched; at 10x it collapses a level, exactly as raising the floor to 1e-10 does. The band is a thrash damper, not a savings knob: widen it only as far as is needed to stop flags oscillating.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(RefinementIndicator3D_t), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | relativeEnergyFloor | |||
| real(kind=prec), | intent(in), | optional | :: | significantEnergyFloor |
subroutine SetRelativeEnergyFloor_RefinementIndicator3D_t(this,relativeEnergyFloor, &
significantEnergyFloor)
!! Set the relative energy floor of the amplitude gate. An element whose gate energy g
!! satisfies
!!
!! g <= max( epsilon(1.0_prec), relativeEnergyFloor*energyScale )
!!
!! carries no resolvable signal at the scale of the field and is reported perfectly resolved
!! (sigma_e = log10(epsilon) -> SELF_AMR_COARSEN) whatever the shape of its modal spectrum.
!!
!! Dimensionless, and an ENERGY fraction, so it is the square of the corresponding amplitude
!! fraction: 1e-12 gates amplitudes below 1e-6 (-120 dB) of the field scale, 1e-8 gates
!! amplitudes below 1e-4 (-80 dB). Must lie in [0,1); 0 disables the relative floor and
!! restores the pure absolute (machine-epsilon) guard.
!!
!! Raising this beyond the default trades against refinement depth - the gate cannot tell
!! residue from the flank of an under-resolved feature - and has been measured to cost more
!! than it saves on a propagating-wave problem. See SELF_AMR_DEFAULT_RELFLOOR.
!!
!! significantEnergyFloor, when supplied, is the UPPER edge of a hysteresis band on the energy
!! axis, exactly analogous to the refine/coarsen band on sigma_e:
!!
!! g <= quiescent floor -> COARSEN, whatever the spectrum says
!! quiescent floor < g <= significant -> SELF_AMR_KEEP
!! g > significant floor -> the spectrum decides, as before
!!
!! Without it the amplitude gate is a single hard cut, so an element whose energy drifts across
!! that one value flips COARSEN <-> REFINE on successive epochs - the thrashing the two sigma
!! thresholds exist to prevent, reintroduced on the other axis. The middle zone says "too weak
!! to be worth spending levels on, too strong to declare resolved", which is the honest answer
!! there and is stable under a small change in amplitude.
!!
!! Must satisfy quiescent floor <= significant floor < 1. It defaults to the quiescent floor,
!! which collapses the band to the single cut and reproduces the ungapped behaviour exactly.
!!
!! KEEP THE BAND NARROW. Its upper edge is functionally "do not spend levels below this
!! energy", which is the same knob as the floor itself and carries the same cost in refinement
!! depth. Measured on the ultrasound benchmark's initial adaptation (see
!! SELF_AMR_DEFAULT_RELFLOOR), with a quiescent floor of 1e-12:
!!
!! significant floor 1e-12 3e-12 1e-11 3e-11 1e-10
!! elements / level 328/2 328/2 268/1 268/1 268/1
!!
!! A band up to ~3x the floor leaves refinement depth untouched; at 10x it collapses a level,
!! exactly as raising the floor to 1e-10 does. The band is a thrash damper, not a savings knob:
!! widen it only as far as is needed to stop flags oscillating.
implicit none
class(RefinementIndicator3D_t),intent(inout) :: this
real(prec),intent(in) :: relativeEnergyFloor
real(prec),intent(in),optional :: significantEnergyFloor
if(relativeEnergyFloor < 0.0_prec .or. relativeEnergyFloor >= 1.0_prec) then
print*,__FILE__,':',__LINE__, &
' : Error : relativeEnergyFloor must satisfy 0 <= floor < 1.'
stop 1
endif
this%relativeEnergyFloor = relativeEnergyFloor
this%significantEnergyFloor = relativeEnergyFloor
if(present(significantEnergyFloor)) then
if(significantEnergyFloor < relativeEnergyFloor .or. &
significantEnergyFloor >= 1.0_prec) then
print*,__FILE__,':',__LINE__, &
' : Error : significantEnergyFloor must satisfy relativeEnergyFloor <= floor < 1.'
stop 1
endif
this%significantEnergyFloor = significantEnergyFloor
endif
endsubroutine SetRelativeEnergyFloor_RefinementIndicator3D_t