reset_jacobian = False in NonlinearVariationalSolver crashes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DOLFIN |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Setting the parameter "reset_jacobian" equal to False in a NonlinearVariat
For instance: this snippet:
--
from dolfin import *
mesh = UnitSquare(10, 10)
V = FunctionSpace(mesh, "CG", 1)
u = Function(V)
u.vector()[:] = 1.0
v = TestFunction(V)
f = Expression(
F = u*u*v*dx - f*v*dx
pde = NonlinearVariat
solver = NonlinearVariat
solver.
solver.solve()
plot(u, interactive=True)
--
gives this error:
Solving nonlinear variational problem.
python: /usr/include/
[nyx:10986] *** Process received signal ***
[nyx:10986] Signal: Aborted (6)
[nyx:10986] Signal code: (-6)
[nyx:10986] [ 0] /lib/x86_
[nyx:10986] [ 1] /lib/x86_
[nyx:10986] [ 2] /lib/x86_
[nyx:10986] [ 3] /lib/x86_
[nyx:10986] [ 4] /lib/x86_
[nyx:10986] [ 5] /home/meg/
[nyx:10986] [ 6] /home/meg/
[nyx:10986] [ 7] python(
[nyx:10986] [ 8] python(
[nyx:10986] [ 9] python(
[nyx:10986] [10] python(
[nyx:10986] [11] python(
[nyx:10986] [12] /lib/x86_
[nyx:10986] [13] python() [0x41b9b1]
[nyx:10986] *** End of error message ***
Aborted (core dumped)
Changed in dolfin: | |
status: | New → Confirmed |
I can confirm the bug there is a "!" missing in NonlinearVariat ionalSolver: :solve( ):
// Create Newton solver and set parameters shared_ ptr<NewtonSolve r>(new NewtonSolver( parameters[ "linear_ solver" ],
parameters[ "preconditioner "]));
if (newton_solver || reset_jacobian)
{
// Create Newton solver and set parameters
newton_solver = boost::
}
should be
// Create Newton solver and set parameters shared_ ptr<NewtonSolve r>(new NewtonSolver( parameters[ "linear_ solver" ],
parameters[ "preconditioner "]));
if (!newton_solver || reset_jacobian)
{
// Create Newton solver and set parameters
newton_solver = boost::
}