Skip to content

Commit d7b8d43

Browse files
authored
even nicer math
1 parent f22bfad commit d7b8d43

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lapy/diffgeo.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -665,12 +665,12 @@ def get_flipped_area(triax):
665665
def tet_compute_gradient(tet, vfunc):
666666
r"""Compute gradient of a vertex function f (for each tetra).
667667
668-
For a tetrahedron (vi,vj,vk,vh) with volume V we have:
668+
For a tetrahedron :math:`(v_i, v_j, v_k, v_h)` with volume V we have:
669669
670670
.. math::
671-
grad(f) &= [ (f_j - f_i) (vi-vk) \times (vh-vk) \\
672-
& + (f_k - f_i) (vi-vh) \times (vj-vh) \\
673-
& + (f_h - f_i) (vk-vi) \times (vj-vi) ] / (6 V).
671+
grad(f) = \left[ & (f_j - f_i) (v_i-v_k) \times (v_h-v_k) \\
672+
& + (f_k - f_i) (v_i-v_h) \times (v_j-v_h) \\
673+
& + (f_h - f_i) (v_k-v_i) \times (v_j-v_i) \right] / (6 V).
674674
675675
Parameters
676676
----------

0 commit comments

Comments
 (0)