  Common techniques for the spatial discretisation of PDEs on a macroscale grid
include finite difference, finite elements and finite volume methods. Such
methods typically impose assumed microscale structures on the subgrid fields,
so without further tailored analysis are not suitable for systems with
subgrid-scale heterogeneity or nonlinearities. We provide a new algebraic route
to systematically approximate, in principle exactly, the macroscale closure of
the spatially-discrete dynamics of a general class of heterogeneous
non-autonomous reaction-advection-diffusion PDEs. This holistic discretisation
approach, developed through rigorous theory and verified with computer algebra,
systematically constructs discrete macroscale models through physics informed
by the PDE out-of-equilibrium dynamics, thus relaxing many assumptions
regarding the subgrid structure. The construction is analogous to recent
gray-box machine learning techniques in that predictions are directed by
iterative layers (as in neural networks), but informed by the subgrid physics
(or 'data') as expressed in the PDEs. A major development of the holistic
methodology, presented herein, is novel inter-element coupling between subgrid
fields which preserve self-adjointness of the PDE after macroscale
discretisation, thereby maintaining the spectral structure of the original
system. This holistic methodology also encompasses homogenisation of microscale
heterogeneous systems, as shown here with the canonical examples of
heterogeneous 1D waves and diffusion.
