.. _physics-mergerTreeEvolveProfiler: Merger Tree Evolver Profiler ============================ Class providing profilers for merger tree evolution---diagnostic objects that record timing and performance information for each ODE integration step. For each differential evolution step, a profiler receives the node being evolved, the time range, the number of function evaluations, the property values and rates, and the wall-clock CPU time. This information can be written to log files to identify bottlenecks in the galaxy formation physics or in the ODE integrator configuration. **Default implementation:** ``mergerTreeEvolveProfilerNull`` Methods ------- ``stepDescriptor`` → ``void`` Provide a descriptor of the current step. * ``type (varying_string), intent(in ) :: descriptor`` ``profile`` → ``void`` Profile a differential evolution step. * ``type (treeNode ), intent(in ) :: node`` * ``double precision , intent(in ) :: time , timeStart , timeEnd , timeStep`` * ``integer (c_size_t ), intent(in ) :: countEvaluations`` * ``logical , intent(in ) :: interrupted`` * ``integer (c_size_t ), intent(in ) :: propertyIndex`` * ``type (varying_string), intent(in ) :: propertyName`` * ``double precision , intent(in ), dimension(:) :: propertyValue , propertyRate, propertyScale, propertyError`` * ``double precision , intent(in ) :: timeCPU`` .. _physics-mergerTreeEvolveProfilerNull: ``mergerTreeEvolveProfilerNull`` -------------------------------- A merger tree evolve profiler that does nothing. **(Default implementation)** **Parameters** * ``[dimensionless]`` (default ``.true.``) — If true the null profile is considered to be dimensionless. .. _physics-mergerTreeEvolveProfilerSimple: ``mergerTreeEvolveProfilerSimple`` ---------------------------------- A merger tree evolve profiler that collects simple data. Each step taken by the ODE evolver is then analyzed. First, a record of the size of the time step taken is recorded. Second, the property which is currently limiting the time step size (i.e. that which has the largest error over the step as judged using the same heuristics as the ODE solver uses to determine step size) is determined and a record of this is kept. At the end of a run the accumulated data is written to the Galacticus output file, into a group named ``metaData/evolverProfiler``. A histogram of time step sizes is written to ``timeStepCount`` with bins specified in ``timeStep``---these bins can be adjusted using ``[timeStepMinimum]``, ``[timeStepMaximum]`` and ``[timeStepPointsPerDecade]``. A histogram of which properties limited step size is written to ``propertyHitCount`` with the associated property names written to ``[propertyNames]``. **Methods** * ``calculationReset`` — Reset memoized calculations. **Parameters** * ``[efficiencyWind]`` (default ``2.2157d-3``) — The coupling efficiency of the black hole accretion-driven wind, defined as the fraction of the accreted rest-mass energy that is deposited as kinetic or thermal energy into the surrounding gas via AGN-driven outflows. * ``[redshiftReionization]`` (default ``9.97d0``) — The redshift of reionization below which baryonic accretion onto halos is suppressed due to the ionizing background heating the intergalactic medium and preventing gas from accreting onto low-mass halos. * ``[opticalDepthReionization]`` — The optical depth to electron scattering below which baryonic accretion is suppressed. * ``[velocitySuppressionReionization]`` (default ``35.0d0``) — The velocity scale below which baryonic accretion is suppressed. * ``[accretionNegativeAllowed]`` (default ``.true.``) — Specifies whether negative accretion (mass loss) is allowed in the simple halo accretion model. * ``[accretionNewGrowthOnly]`` (default ``.false.``) — Specifies whether accretion from the :term:`IGM` is allowed only when a halo is growing past its previous greatest mass. * ``[acceptedStateCount]`` (default ``100``) — The number of states to use in acceptance rate statistics. * ``[timeStepRelative]`` (default ``0.1d0``) — The maximum allowed relative change in time for a single step in the evolution of a node. * ``[timeStepAbsolute]`` (default ``1.0d0``) — The maximum allowed absolute change in time (in Gyr) for a single step in the evolution of a node. * ``[timeStepMinimum]`` (default ``1.0d-6``) — The smallest timestep to use in profiling ODE solver steps. * ``[timeStepMaximum]`` (default ``1.0d+1``) — The largest timestep to use in profiling ODE solver steps. * ``[timeStepPointsPerDecade]`` (default ``3``) — The number of bins per decade of timestep to use when profiling ODE solver steps. * ``[wavelength]`` (default ``1.0d4``) — The wavelength of the photon packet (in \AA). * ``[wavelengthMinimum]`` (default ``0.5d4``) — The minimum wavelength of the photon packet (in \AA). * ``[wavelengthMaximum]`` (default ``2.0d4``) — The maximum wavelength of the photon packet (in \AA). * ``[luminosity]`` (default ``1.0d0``) — The luminosity of the photon packet (in :math:`L_\odot`). * ``[massRatioMajorMerger]`` (default ``0.25d0``) — The mass ratio above which mergers are considered to be "major". * ``[destinationGasMinorMerger]`` (default ``var_str('spheroid')``) — The component to which satellite galaxy gas moves to as a result of a minor merger. * ``[destinationStarsMinorMerger]`` (default ``var_str('spheroid')``) — The component to which satellite galaxy stars move to as a result of a minor merger. * ``[degreesOfFreedom]`` (default ``3.0d0``) — Number of degrees of freedom to assume when computing the energy density of cooling gas in the "simple" cooling time class. * ``[timeScale]`` (default ``1.0d0``) — The timescale (in Gyr) for cooling in the simple cooling rate model. * ``[reionizationRedshift]`` (default ``9.97d0``) — The redshift of reionization in the simple :term:`IGM` state model. * ``[reionizationTemperature]`` (default ``1.0d4``) — The post-reionization temperature (in units of Kelvin) in the simple :term:`IGM` state model. * ``[preReionizationTemperature]`` (default ``10.0d0``) — The pre-reionization temperature (in units of Kelvin) in the simple :term:`IGM` state model. * ``[useFormationHalo]`` (default ``.false.``) — Specifies whether or not the "formation halo" should be used when solving for the radii of galaxies. * ``[solveForInactiveProperties]`` (default ``.true.``) — If true, galactic structure is solved for during evaluation of inactive property integrals. Otherwise, structure is not solved for during this phase---this should only be used if the inactive property integrands *do not* depend on galactic structure. * ``[rateFractionalMaximum]`` (default ``10.0d0``) — The maximum fractional mass loss rate per dynamical time in the simple model of mass loss due to tidal stripping. * ``[beta]`` (default ``1.0d0``) — The scaling factor which multiplies the tidal mass loss rate. * ``[OmegaMatter]`` (default ``0.3153d0``) — The density of matter in the Universe in units of the critical density. * ``[OmegaBaryon]`` (default ``0.04930d0``) — The density of baryons in the Universe in units of the critical density. * ``[OmegaDarkEnergy]`` (default ``0.6847d0``) — The density of dark energy in the Universe in units of the critical density. * ``[temperatureCMB]`` (default ``2.72548d0``) — The present day temperature of the :term:`CMB` in units of Kelvin. * ``[HubbleConstant]`` (default ``67.36d0``) — The present day value of the Hubble parameter in units of km/s/Mpc. .. _physics-mergerTreeEvolveProfilerTinySteps: ``mergerTreeEvolveProfilerTinySteps`` ------------------------------------- A merger tree evolve profiler that monitors timestep sizes during galaxy evolution and issues warnings when steps fall below a threshold, helping to diagnose stiff ODE systems or convergence problems. The warning threshold is set by ``[timeStepTiny]`` and the minimum recorded step size is tracked via ``[timeStepMinimum]``. **Parameters** * ``[timeStepTiny]`` (default ``1.0d-9``) — The time step below which warnings will be issued.