I am trying to solve PDEs in 3D in fenics (not fenicsX).
The following code
from dolfin import *
from mshr import *
import dolfin.common.plotting as fenicsplot
import numpy as np
from matplotlib import pyplot as plt
res = 8
mesh = UnitCubeMesh(res,res,res)
plot(mesh)
produces this Error message:
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
<ipython-input-30-6bb53f29cf03> in <module>
7 res = 8
8 mesh = UnitCubeMesh(res,res,res)
----> 9 plot(mesh)
/usr/local/lib/python3.6/dist-packages/dolfin/common/plotting.py in plot(object, *args, **kwargs)
436 # Plot
437 if backend == "matplotlib":
--> 438 return _plot_matplotlib(object, mesh, kwargs)
439 elif backend == "x3dom":
440 return _plot_x3dom(object, kwargs)
/usr/local/lib/python3.6/dist-packages/dolfin/common/plotting.py in _plot_matplotlib(obj, mesh, kwargs)
280 else:
281 ax = plt.gca()
--> 282 ax.set_aspect('equal')
283
284 title = kwargs.pop("title", None)
/usr/local/lib/python3.6/dist-packages/matplotlib/axes/_base.py in set_aspect(self, aspect, adjustable, anchor, share)
1279 if (not cbook._str_equal(aspect, 'auto')) and self.name == '3d':
1280 raise NotImplementedError(
-> 1281 'It is not currently possible to manually set the aspect '
1282 'on 3D axes')
1283
NotImplementedError: It is not currently possible to manually set the aspect on 3D axes
I know from other posts, that people suggest to use different Python libraries, like vedo or just use Paraview instead.
Is there really no way to create 3D plots with the native FEniCS installation or Matplotlib?
How can this be the case, if FEniCS is the go-to PDE library? Isn’t solving 3D problems kind of a standard use case of such a library?
latest: Pulling from fenicsproject/stable
c64513b74145: Already exists
01b8b12bad90: Already exists
...
...
4eb92b6670f4: Already exists
Digest: sha256:ea64e15a739da61be9e440261f86f02930d678ff6eb800768347a87e4975759b
Status: Image is up to date for quay.io/fenicsproject/stable:latest
quay.io/fenicsproject/stable:latest
I stopped and restarted the container and I yielded the same error message as in my first post.
What else could I have done wrong?
When i start a container using FEniCS dev version, i still get the error from the first post.
When i run
import dolfin as df
print (df.__version__)
i get
2019.1.0
Is 2019… the latest version? Do I have to remove the stable installation first?
Also: is it not possible to do 3D plots in the stable version? That would be very surprising to me.
The dev:latest should be 2019.2.0.dev. Please add: :latest at the end of your initialization of the docker container, i.e. something along the lines of