SetEnergyScale_RefinementIndicator3D_t Subroutine

public subroutine SetEnergyScale_RefinementIndicator3D_t(this, energyScale)

Pin the energy scale that normalizes the relative floor, in the units of the gate energy (squared field amplitude times the reference-element volume). Two reasons to use this rather than the automatic maximum over elements:

  • determinism: the automatic scale is a floating-point reduction, and under MPI it is a collective whose result can differ at round-off between rank counts, which propagates into the flags;
  • a poor automatic normalizer: a strong steady background would otherwise set the floor for a weak transient that is the feature of interest.

Must be >= 0; 0 makes the gate collapse onto the absolute floor.

Arguments

TypeIntentOptionalAttributesName
class(RefinementIndicator3D_t), intent(inout) :: this
real(kind=prec), intent(in) :: energyScale

Contents


Source Code

  subroutine SetEnergyScale_RefinementIndicator3D_t(this,energyScale)
    !! Pin the energy scale that normalizes the relative floor, in the units of the gate energy
    !! (squared field amplitude times the reference-element volume). Two reasons to use this rather
    !! than the automatic maximum over elements:
    !!
    !!   - determinism: the automatic scale is a floating-point reduction, and under MPI it is a
    !!     collective whose result can differ at round-off between rank counts, which propagates
    !!     into the flags;
    !!   - a poor automatic normalizer: a strong steady background would otherwise set the floor
    !!     for a weak transient that is the feature of interest.
    !!
    !! Must be >= 0; 0 makes the gate collapse onto the absolute floor.
    implicit none
    class(RefinementIndicator3D_t),intent(inout) :: this
    real(prec),intent(in) :: energyScale

    if(energyScale < 0.0_prec) then
      print*,__FILE__,':',__LINE__, &
        ' : Error : energyScale must be non-negative.'
      stop 1
    endif
    this%energyScale = energyScale
    this%energyScaleIsSet = .true.

  endsubroutine SetEnergyScale_RefinementIndicator3D_t