PyClaw output — Clawpack 5.2.1 documentation Clawpack-5 Docs Install Gallery Citation GitHub Community Contribute Navigation index modules | next | previous | Clawpack 5.2.1 documentation » Pyclaw » Going Further » Contents PyClaw output Outputting derived quantities Outputting functionals Using gauges Logging PyClaw output¶ PyClaw supports options to output more than just the solution \(q\). It can provide: Output of derived quantities computed from \(q\); for instance, pressure (not a conserved quantity) could be computed from density and energy. Output of scalar functionals, such as the total mass summed over the whole grid. Output of gauge values, which are time traces of the solution at a single point. Derived quantities and functionals are written out at the same times that the solution \(q\) is written. While these could be computed in postprocessing, it is more efficient to compute them at run-time for large parallel runs. Gauge output is written at every timestep. In order to get this data without a gauge, one would otherwise have to write the full solution out at every timestep, which might be very slow. Outputting derived quantities¶ It is sometimes desirable to output quantities other than those in the vector q. To do so, just add a function p_function to the controller that accepts the state and sets the derived quantities in state.p >>> def stress(state): ...    state.p[0,:,:] = np.exp(state.q[0,:,:]*state.aux[1,:,:]) - 1.