Changes between Initial Version and Version 1 of Ticket #32953, comment 9


Ignore:
Timestamp:
Dec 6, 2021, 10:51:25 AM (14 months ago)
Author:
egourgoulhon
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32953, comment 9

    initial v1  
    88> H = M.scalar_field(chart_functions, name='H')
    99> }}}
    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.
     10This 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.