Issue while doing FEniCS tutorial: LinearVariationalSolver has no attribute default_parameters


44
views
0
18 days ago by
When I try to run the ft10_poisson_extended.py program from the FEniCS tutorial, if I select the options with numbers 0-3, I get this error:

Traceback (most recent call last):
  File "ft10_poisson_extended.py", line 759, in <module>
     demos[nr]()
  File "ft10_poisson_extended.py", line 563, in demo_structured_mesh (these two change based on which option, this is option 3)
     u = solver(kappa, f, u_D, nx, ny, 1, linear_solver='direct')
  File "ft10_poisson_extended.py", line 57, in solver
     prm = LinearVariationalSolver.default_parameters
AttributeError: type object 'dolfin.cpp.fem.LinearVariationalSolver' has no attribute 'default_parameters'

I have no idea how to fix this. If it matters, I am running FEniCS using conda while using ssh to run it on a Linux machine in the lab (my laptop is Windows, so can't install FEniCS on conda.) The only parts of the example code I changed were commenting out all the plotting because it makes it have errors while I'm running it through ssh, and changing "nr = input('Pick a demo: ')" to "nr = int(input('Pick a demo: ')) because it was complaining nr was a string. I also had to comment out importing boxfield because conda said it couldn't import it and I couldn't find a solution on Google, which caused an issue on options 4 and 5... but at least I know the issue there.

I really don't know much about coding or computers in general, this has been my first experience learning how to use the terminal on my computer at all, so a simple explanation would be much appreciated. Thank you

Edit: I also have the issue that in multiple programs it's told me "AttributeError: 'dolfin.cpp.la.PETScVector' object has no attribute 'array'" and I have no idea how to get around this, so help would be appreciated
Community: FEniCS Project
Please login to add an answer/comment or follow this question.

Similar posts:
Search »