# Exploratory Study of a Green Function Based Solver for Nonlinear Partial Differential Equations
## 3 Numerical Implementation
### The Numerical Transposition of the Integral Scheme
#### 3.2.4 Boundary Conditions
The implementation does not require for any extra boundary term as the Green function codifies the discretization scheme in order to satisfy automatically the boundary conditions. Finally, in Figure 14 we present an example where we use all three boundary contributions and required modifications to implement them into the scheme. In other words, we solve a Heat transfer equation with a space-dependent diffusion coefficient in the shape of a well in order to define clearly different regions of characteristic diffusion, and so, different heat propagation speeds. Furthermore, we set two boundary conditions: one time-evolving that increases the temperature of the left region of the domain up to a certain value progressively and another one at the left that serves as heat sink, i.e., a Dirichlet homogeneous condition. In particular, we select the following temperature law to heat the non-homogeneous boundary:  
\[u_{b}(-1,t)=\left\{ \begin{aligned} &\sin(2\pi t),\ 0\leq t\leq 0.5\\ & 1,\ 0.5\leq t\end{aligned} \right. \tag{67}\]  
Therefore, heat will take more time to evolve away from the domain, increasing the value of the temperature at the left-hand side more together with its slope or heat flux until  
Figure 14: Temporal evolution of diffusive problem (**left**) and its first-order spatial derivative (**right**) for an implementation of two Dirichlet boundary conditions, one non-homogeneous following the temporal evolution law, Equation (67), and another one, homogeneous. The diffusion coefficient presents a spatial variation, in order to include all the possible boundary modifications to the basic time evolving scheme at once. Figure 13: Temporal evolution of diffusive problem (**left**) and its first-order spatial derivative (**right**) for an implementation of two homogeneous boundaries at the boundaries of the domain: Neumann at \(x=-1\) and Dirichlet at \(x=1\). The diffusion coefficient presents a spatio-temporal variation, modifying the temporal evolution of the problem and introducing the corrections terms at the Green function. it reaches the maximum possible. Regardless of the physical interpretation of this simple example, we have shown how to impose boundary conditions in an efficient manner and consistent with the chosen optimized discretization. Therefore, the explorative analysis of the method successfully achieves its first milestone: the definition of a consistent numerical algorithm that can be derived from the Green function of the problem. This scheme sets the path for a wide range of possible boundaries to be imposed regardless of the problem we are dealing with as long as the boundary conditions are consistent with the order the Green function. In addition, as the contribution of the non-homogeneous terms and the boundaries are independent from the main propagation, we have shown that only the last point (or the last line or surface, deepening on which kind of boundary is under study) will be enough to deploy any kind of boundary law. Finally, we point out that our results align, from a humble numerical perspective, with the efforts being performed to obtain a precise definition of boundaries from the perspective of Quantum Field Theory [74; 75]. The most straightforward relation is the definition of boundary conditions as a discrete Dirac delta set at the boundary, from which they recover the Neumann term (two times the diffusion coefficient) in a more theoretically profound manner. Indeed, we can think of the boundary term that we have obtained as a non-homogeneous term, which by means of a Dirac delta, \(\delta_{x-x_{b}}\), breaks the volumetric integral and transforms it into a surface, line, or point. With this idea in mind, we could explore the possibility of defining internal boundary conditions, with the problem being that the stencils pointing towards them will be decentured automatically. Moreover, if this internal boundary evolves in time, we will need to update all polynomial coefficients and stencils at every iteration.