Folder "ufl" and "ufl_legacy"

Dear all,

I installed Fenicsx last year and then uninstalled it and installed Fenics. However, in my computer, I found both folders “ufl” and “ufl_legacy”. I guess that the folder “ufl” belongs to Fenicsx, and it was not automatically removed when I uninstalled Fenicsx. So should I remove the folder “ufl” manually? I am afraid that the folder “ufl” will affect my Fenics code.

Thank you very much in advance.

This depends on how you installed dolfinx and dolfin. As long as you consistently use libraries that use ufl_legacy there shouldn’t be any problems.

I installed Fenicsx and Fenics both using Ubuntu command like this “sudo apt-get install xxxx”, and uninstalled Fenicsx using “sudo apt-get remove Fenicsx”. I found that many functions and classes in “ufl_legacy” can be used without “import ufl_legacy”, and there are many functions with the same names in “ufl” and “ufl_legacy”. So when I want to use a function in “ufl_legacy”, the function with the same name in “ufl” may be called, I guess.

It is only called if you import ufl and not ufl_legacy. As long as you are consistent everything should be fine

1 Like