10 | | This declaration of the scalar field `H` is not mathematically correct: it enforces the same coordinate expression `H(x,y)` for all the coordinates `(x,y)` in the manifold's atlas, which cannot be, except for a constant scalar field. Furthermore, it introduces a confusion between `function('H')` and the scalar field `H`. For the sake of clarity, different symbols shall be used. |
| 10 | This declaration of the scalar field `H` is not mathematically correct: it enforces the same coordinate expression `H(x,y)` for all the coordinates `(x,y)` in the manifold's atlas, which cannot be, except for a constant scalar field. Furthermore, it introduces a confusion between `function('H')` and the scalar field `H`. For the sake of clarity, different symbols shall be used. Keep in mind that `function('H')` injects `H` in the global namespace. By running subsequently `H = M.scalar_field(...)`, you overwrite the Python name `H`. This can be unfortunate when you want to further manipulate `function('H')`, like in `substitute_function` for instance. |