1

I want to refer to Equation. (10) in http://www.ipol.im/pub/art/2014/103/ .

We consider one dimension and the vector $u\in \mathbb R^n$. For simplicity, we choose $n=3$.

Neumann boundary condition

If we assume the Neumann boundary condition $\nabla u=0$ when $x\in \partial\Omega$, the discrete forward differential operator $D$ is as follows:

$$ D = \begin{bmatrix} -1 & 1 & \\ & -1 & 1 \\ & & 0 \end{bmatrix} $$

$$Du = \begin{cases} u_{i+1} - u_{i} & \text{if} &i < n \\ 0 & \text{if} &i=n \end{cases} $$

Then, the discrete divergence operator is defined by $$ -D^T = \begin{bmatrix} 1 & & \\ -1 & 1 & \\ & -1 & 0 \end{bmatrix} $$

to satisfy the condition that the divergence operator is the adjoint of the gradient operator.

$$-D^T (x) = \begin{cases} u_1 & \text{if} &i=1 \\ u_{i} - u_{i-1} & \text{if} &1 < i < n \\ -u_{i-1} & \text{if} &i=n \end{cases} $$

Dirichlet boundary condition

If we assume that the Dirichlet boundary condition $u(n+1)=0$, the discrete forward differential operator $D$ is as follows:

$$ D = \begin{bmatrix} -1 & 1 & \\ & -1 & 1 \\ & & -1 \end{bmatrix} $$

$$Du = \begin{cases} u_{i+1} - u_{i} & \text{if} &i < n \\ -u_i & \text{if} &i=n \end{cases} $$

Then, the discrete divergence operator is defined by $$ -D^T = \begin{bmatrix} 1 & & \\ -1 & 1 & \\ & -1 & 1 \end{bmatrix} $$

$$-D^T (x) = \begin{cases} u_1 & \text{if} &i=1 \\ u_{i} - u_{i-1} & \text{if} &1 < i < n \\ u_{i}-u_{i-1} & \text{if} &i=n \end{cases} $$


My first question is that Am I right until this? . Because my numerical result seems wrong if I choose Dirichlet boundary condition.

My second question is that if $u(n+1)=v$, how to discretize?

Enlico
  • 315
jakeoung
  • 1,261

0 Answers0