This is the output when I’m printing values of u
and w
(decreased mesh density for sake of convenience) -
t: 0
u: [0.001 0. 0.001 0.00025 0.00075 0.
0.000875 0.000125 0.000875 0. 0.001 0.000125
0.00070833 0.00029167 0.0005 0. 0.00072917 0.00014583
0.00060417 0.00014583 0.000625 0. 0.00085417 0.00027083
0.001 0.0005 0.00085417 0.00039583 0.001 0.000375
0.00075 0.000625 0.0005 0.0005 0.000375 0.00025
0.0004375 0.000375 0.00054167 0.00027083 0.0004375 0.000125
0.00025 0. 0.0003125 0.000125 0.000375 0.
0.00072917 0.00045833 0.000875 0.0005625 0.001 0.00075
0.000875 0.0006875 0.001 0.000625 0.00060417 0.00039583
0.000625 0.0005625 0.00053472 0.00074306 0.00029167 0.00070833
0.00041319 0.00072569 0.00051736 0.00062153 0.00039583 0.00060417
0.00024641 0.00046336 0.0003107 0.00035668 0.0003732 0.00048168
0.00026904 0.00058585 0.00064236 0.00068403 0.00075 0.001
0.00075 0.0008125 0.000875 0.000875 0.001 0.001
0.000875 0.001 0.001 0.000875 0.00064236 0.00087153
0. 0.00025 0.0001232 0.00035668 0.0001875 0.00025
0.000125 0.000125 0. 0. 0.000125 0.
0. 0.000125 0.0005 0.001 0.00051736 0.00087153
0.00039583 0.00085417 0.00025 0.001 0. 0.00075
0. 0.0005 0.0001232 0.00048168 0. 0.000375
0.000625 0.001 0.00014583 0.00072917 0.00014583 0.00060417
0. 0.000625 0.00027083 0.00085417 0.000125 0.000875
0.000375 0.001 0. 0.001 0. 0.000875
0.000125 0.001 ]
w: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0.]
Newton iteration 0: r (abs) = 1.628e+01 (tol = 1.000e-10) r (rel) = 1.000e+00 (tol = 1.000e-09)
t: 1
u: [0.00122984 0.00082161 0.00127491 0.00082161 0.00122984 0.00086668
0.00125238 0.00084415 0.00122984 0.00084415 0.00125238 0.00082161
0.00128243 0.0008742 0.00122984 0.00091176 0.00125613 0.00087044
0.00125613 0.00089298 0.00122984 0.00088922 0.00127867 0.0008479
0.00131999 0.00082161 0.00130121 0.0008479 0.00129745 0.00082161
0.00134252 0.00086668 0.00131999 0.00091176 0.00127491 0.0009343
0.00129745 0.00092303 0.00127867 0.00090425 0.00125238 0.00092303
0.00122984 0.00095683 0.00125238 0.00094556 0.00122984 0.0009343
0.00131247 0.00087044 0.00133126 0.00084415 0.00136506 0.00082161
0.00135379 0.00084415 0.00134252 0.00082161 0.00130121 0.00089298
0.00133126 0.00088922 0.00136381 0.0009055 0.00135755 0.00094932
0.00136068 0.00092741 0.0013419 0.00090863 0.00133877 0.00093054
0.00131338 0.00095748 0.00129415 0.00094589 0.00131668 0.00093462
0.00133546 0.0009534 0.00135317 0.00088609 0.00141013 0.00086668
0.00137633 0.00086668 0.0013876 0.00084415 0.00141013 0.00082161
0.00141013 0.00084415 0.0013876 0.00082161 0.00138697 0.00088609
0.00127491 0.00100191 0.00129415 0.00097969 0.00127491 0.0009681
0.00125238 0.00097937 0.00122984 0.00100191 0.00122984 0.00097937
0.00125238 0.00100191 0.00141013 0.00091176 0.00138697 0.00090863
0.00138384 0.00093054 0.00141013 0.00095683 0.00136506 0.00100191
0.00131999 0.00100191 0.00131668 0.00097969 0.00129745 0.00100191
0.00141013 0.00088922 0.0013613 0.00097561 0.00133877 0.00097561
0.00134252 0.00100191 0.00138384 0.00095308 0.0013876 0.00097937
0.00141013 0.0009343 0.00141013 0.00100191 0.0013876 0.00100191
0.00141013 0.00097937]
w: [0.00122984 0.00082161 0.00127491 0.00082161 0.00122984 0.00086668
0.00125238 0.00084415 0.00122984 0.00084415 0.00125238 0.00082161
0.00128243 0.0008742 0.00122984 0.00091176 0.00125613 0.00087044
0.00125613 0.00089298 0.00122984 0.00088922 0.00127867 0.0008479
0.00131999 0.00082161 0.00130121 0.0008479 0.00129745 0.00082161
0.00134252 0.00086668 0.00131999 0.00091176 0.00127491 0.0009343
0.00129745 0.00092303 0.00127867 0.00090425 0.00125238 0.00092303
0.00122984 0.00095683 0.00125238 0.00094556 0.00122984 0.0009343
0.00131247 0.00087044 0.00133126 0.00084415 0.00136506 0.00082161
0.00135379 0.00084415 0.00134252 0.00082161 0.00130121 0.00089298
0.00133126 0.00088922 0.00136381 0.0009055 0.00135755 0.00094932
0.00136068 0.00092741 0.0013419 0.00090863 0.00133877 0.00093054
0.00131338 0.00095748 0.00129415 0.00094589 0.00131668 0.00093462
0.00133546 0.0009534 0.00135317 0.00088609 0.00141013 0.00086668
0.00137633 0.00086668 0.0013876 0.00084415 0.00141013 0.00082161
0.00141013 0.00084415 0.0013876 0.00082161 0.00138697 0.00088609
0.00127491 0.00100191 0.00129415 0.00097969 0.00127491 0.0009681
0.00125238 0.00097937 0.00122984 0.00100191 0.00122984 0.00097937
0.00125238 0.00100191 0.00141013 0.00091176 0.00138697 0.00090863
0.00138384 0.00093054 0.00141013 0.00095683 0.00136506 0.00100191
0.00131999 0.00100191 0.00131668 0.00097969 0.00129745 0.00100191
0.00141013 0.00088922 0.0013613 0.00097561 0.00133877 0.00097561
0.00134252 0.00100191 0.00138384 0.00095308 0.0013876 0.00097937
0.00141013 0.0009343 0.00141013 0.00100191 0.0013876 0.00100191
0.00141013 0.00097937]
Newton damping parameter: 1.000e+00
Newton iteration 1: r (abs) = 7.765e-14 (tol = 1.000e-10) r (rel) = 4.771e-15 (tol = 1.000e-09)
Newton solver finished in 1 iterations and 1 linear solver iterations.
Newton iteration 0: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 1: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 2: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 3: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 4: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 5: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 6: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 7: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 8: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 9: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 10: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 11: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 12: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 13: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 14: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 15: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 16: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 17: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 18: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 19: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 20: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 21: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 22: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 23: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 24: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 25: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 26: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 27: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 28: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 29: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 30: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 31: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 32: r (abs) = -nan (tol = 1.000e-10) r (rel) =
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
/tmp/ipykernel_2338/2221793411.py in <module>
13 problem = Problem(J, F)
14 solver = CustomSolver()
---> 15 solver.solve(problem, u.vector())
16
17 Du.assign(Du+du)
RuntimeError:
*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
*** fenics-support@googlegroups.com
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error: Unable to solve nonlinear system with NewtonSolver.
*** Reason: Newton solver did not converge because maximum number of iterations reached.
*** Where: This error was encountered inside NewtonSolver.cpp.
*** Process: 0
***
*** DOLFIN version: 2019.2.0.dev0
*** Git changeset: ubuntu
*** -------------------------------------------------------------------------
-nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 33: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 34: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 35: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 36: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 37: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 38: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 39: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 40: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 41: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 42: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 43: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 44: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 45: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 46: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 47: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 48: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 49: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton damping parameter: nan
Newton iteration 50: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
I installed WSL then on Ubuntu terminal executed -
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install fenics
Later I added TSFC by following -