Open jonny97 opened 1 year ago
What do you mean the initial boundary will always be 0?
Sorry for the confusion. The initial condition in advection, case 3, according to the paper is:
$$u_0(x) = h1 1{(c_1 - \frac{w}{2}, c_1 + \frac{w}{2})} + \sqrt{\max(h_2^2 - a^2(x-c_2)^2, 0)}$$
with periodic boundary condition. In the code, $$a\in[5,10], h_2 \in [0.5,2], c_2 \in [0.7, 0.8]$$. For example, if $c_2 = 0.8, a = 5, h_2 = 2$, for the second term to be nonzero, we have $x \in [0.4,1.2]$. The problem occurs at the boundary, $x=1$, $u_0(1)$ will be nonzero in this case but $u_0(0)$ is always zero with the current choice of $c_1, w$.
In the current implementation, $u_0(1)$ is not computed as we are using the periodic boundary, but this will lead to a jump of discontinuity in the function definition. The plot I attached in this initial post gives such an example. I am not sure if this is intended.
Good catch. We don't intend to have the jump, but it is not a problem in practice, because the network can learn the jump.
Hi Professor Lu, thanks for the well-written codes. I am reading the advection data generation code, case 3, where the input function is defined to be a square wave plus a continuous bump, the following are your parameter setting:
Thus, the c2 + a / h2 could be bigger than 1. In pde.solve code, seems like this case is never handled, and because of the periodic boundary condition assumption, the current implementation may have the following inputs: Initial condition:
solution at t = 29/40
![image](https://user-images.githubusercontent.com/19214697/226750971-e2ed7090-42f4-4d0f-833a-f3d0608b00bc.png)
which means currently, the initial boundary will always be 0, which is not ideal (shall not be a big concern though). I am not sure if this is intended. Please let me know if there are some reasons behind this, thanks!