-
Notifications
You must be signed in to change notification settings - Fork 149
AnisotropicDiffusion
We want to be able to discretize the following term,
$ \int \partial_i \Gamma_{ij} \partial_j \phi dV = \sum_f n_i^f \Gamma_{ij} \partial_j \phi A_f $
where
$ \sigma_i^j \partial_i = \partial^j $
Now
$ \partial_i = \sigma_j^i \partial^j $
Therefore our discretized term becomes,
$ \sum_f n_i^f \Gamma_{ij} \sigma_k^j \partial^k \phi A_f $
Now, as an example, let's choose a 2D system, with a tangent vector
$ \sigma = \left(\begin{matrix} n_x & n_y \\ -n_y & n_x \end{matrix} \right) $
and for 3D we can choose arbitrary tangent vectors such that,
$ \sigma = \left(\begin{matrix}n_x & n_y & n_z \\ \frac{-n_y}{\sqrt{1 - n_z^2}} & \frac{n_x}{\sqrt{1 - n_z^2}} & 0 \\ \frac{n_x n_z}{\sqrt{1 - n_z^2}} & \frac{n_z n_y}{\sqrt{1 - n_z^2}} & -\sqrt{1 - n_z^2} \\ \end{matrix} \right) $
As Jon points out, the choice above is bad; when
$ \partial^i = \left(\partial_{n}, \partial_{t_1}, \partial_{t_2} \right) $
where the
normals and the tangents make up the rows of
$ n_x^f \Gamma_{xx} n_x + n_y^f \Gamma_{yy} n_y + n_y^f \Gamma_{yx} n_x + n_x^f \Gamma_{xy} n_y $
for
$ - n_x^f \Gamma_{xx} n_y + n_y^f \Gamma_{yy} n_x - n_y^f \Gamma_{yx} n_y + n_x^f \Gamma_{xy} n_x $
for