1 | initial version |

I am not sure the curl of a vector field is well defined on a 2-dimensional manifold. The reference you mention actually deals with vector fields in $\mathbb{R}^3$. In dimension 2, one could define the curl by taking the Hodge dual of the exterior derivative of the 1-form that is associated to the vector field by metric, i.e. define $\mathrm{curl}\ v = *(\mathrm{d}v^\flat)$; this would lead a scalar field (not a vector field!) and I am not sure this is very useful.

2 | No.2 Revision |

I am not sure the curl of a vector field is well defined on a 2-dimensional manifold. The reference you mention actually deals with vector fields in $\mathbb{R}^3$. In dimension 2, one could define the curl by taking the Hodge dual of the exterior derivative of the 1-form that is associated to the vector field by metric, i.e. define
$\mathrm{curl}\ v = *(\mathrm{d}v^\flat)$; this would lead a scalar field (not a vector field!) and I ~~am not sure ~~don't know if this is very useful.

If you really need it, you can define a Python function like this:

```
def curl(v):
if dim(v.domain()) == 2:
g = v.domain().metric()
return v.down(g).exterior_derivative().hodge_dual(g)
else:
return v.curl()
```

Then

```
v = E.vector_field(name='v')
v[:] = [-x, y^2]
cv = curl(v)
print(cv)
cv.expr()
```

yields

```
Scalar field on the 2-dimensional Riemannian manifold E
0
```

A nonzero curl is obtained as follows:

```
v[:] = -y , x
curl(v).expr()
```

It results in

```
2
```

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.