Hello everyone, I am a newcomer to FEniCS.
I encountered serious version issues while learning FEniCS.
I studied FEniCS from a paper that is very important to me, which used the MeshView.create function.
The paper also used PyTorch, so I set up both FEniCS and PyTorch environments with conda.
However, it seems that the highest version of FEniCS supported by conda is only 2019.1.0, but the crucial MeshView.create appears to be in the 2019.2.0.dev0 version.
I have tried for a long time but found no way to upgrade FEniCS to 2019.2.0.dev0 version through the conda virtual environment.
Is there any feasible method?
By the way, I installed FEniCS in a non-virtual environment, and it supports MeshView.create in the 2019.2.0.dev0 version,
but I do not want to install too many dependencies in a non-virtual environment (there are many complex dependencies in the paper, including PyTorch).
Is there any way to install the 2019.2.0.dev0 version of FEniCS in a virtual environment? Preferably Conda, I need MeshView.create.
Any help would be greatly appreciated.
Best regards.
Thank you for your prompt reply. I used the command you provided, conda install -c conda-forge -c conda-forge/label/fenics-dev fenics-dolfin mpich, but I can still only install version 2019.1.0 of Fenics, even with a brand new virtual environment.
Therefore, I used the command conda search -c conda-forge fenics-dolfin --info and manually installed fenics-dolfin 2019.2.0.dev0 and its dependencies with conda install https://conda.anaconda.org/conda-forge/label/fenics-dev/linux-64/fenics-dolfin-2019.2.0.dev20240219-py39hfa0d945_0.conda. Finally, I was able to use the MeshView function.
However, there are two strange issues that are troubling me.
Issue 1: In the following code, my PyCharm IDE underlines self, x, on_boundary with a squiggly line and gives a warning that the signature of the method ‘InnerBoundary.inside()’ does not match the signature of the base method in class ‘SubDomain’. I want to find the usage of the base method inside, but PyCharm indicates that it cannot find usage in the project files. Nevertheless, the code runs without errors. As a beginner, I am deeply troubled by this.
class InnerBoundary(SubDomain):
def inside(self, x, on_boundary):
return on_boundary and near(sqrt(x[0] ** 2 + x[1] ** 2), R_in)
Issue 2: I am facing serious compatibility issues with my mshr installation. In my version of fenics-dolfin 2019.2.0.dev0, it seems incompatible with mshr version 2019.1.0, resulting in the error ImportError: libboost_filesystem.so.1.82.0: cannot open shared object file: No such file or directory. My versions of boost-cpp and libboost are 1.84.0, and installing a lower version of boost is not feasible, as fenics-dolfin 2019.2.0.dev0 requires libboost >=1.84.0,<1.85.0a0. If I use fenics version 2019.1.0 and install libboost version 1.78, mshr works, but then the MeshView function is not available.
As a beginner, I am facing numerous challenges. If you could assist me, I would be deeply grateful.
This warning is triggered by static code analysis tools to let you know that there might be an issue, as the original dispatch method has a different signature and because SubDomain is using *args and **kwargs internally. This doesn’t necessarily indicate an error, as you saw. You can ignore that warning.
I have given up on installing mshr in FEniCS 2019.2.0.dev0, although it worked well in 2019.1.0.
I still hope that others can successfully install a specific version of FEniCS, and if problems arise, they might have to resort to the tedious manual installation of dependencies. I hope others won’t encounter such issues.
Meanwhile, with your help, this code can perfectly eliminate the warning:
class InnerBoundary(SubDomain):
def inside(self, *args):
x, on_boundary = args
return on_boundary and near(sqrt(x[0] ** 2 + x[1] ** 2), R_in)
Lastly, Thank you again, helpful community member ! I believe my issue has been resolved.
Hi I’m struggling to install FEniCS 2019.2.0.dev0 into conda, runing in Ubuntu. I have followed all the directions and hints written in this post and I haven’t found a way, could you share your exact procedure to do it?
I know it’s late in the discussion and their interest in the topic have waned, but I’m curious…
I tried to use the 2019.2.0.dev version in a conda environment, and after applying that command in a conda environment, I encountered a problem with dolfin import.
Did you have any problems with the import process?