← Back to team overview

dolfin team mailing list archive

sigsev in assemble

 

hello,

i have a problem which i don't know how to handle:

i have a nonlinear solver class with a public solve(..) function and a private createProblem() function. In createProblem() i define the functions and forms, a, L.

when i call newtonsolver.solve(*this, uu->vector()) inside createProblem(), just after creating the forms, all is fine.

when i call newtonsolver(*this, uu->vector()) inside the other class function solve(), i get a segmentation fault as

Created solver
Created Problem
Starting Newton solve.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 139904524252896 (LWP 703)]
dolfin::Form::check (this=0xd42350) at /usr/include/boost/shared_ptr.hpp:254

the sigsev is raised when a should be assembled as it calls my
custom void F(...)

somebody knows about what's going on here?
thanks for your help

patrick



ps: below is also the stack from a gdb backtrace:

#0 dolfin::Form::check (this=0xd42350) at /usr/include/boost/shared_ptr.hpp:254 #1 0x00007f3e0f3b092b in dolfin::Assembler::check (a=@0x7f3e0f45d007) at dolfin/fem/Assembler.cpp:355 #2 0x00007f3e0f3b3ca6 in dolfin::Assembler::assemble (A=@0xb41810, a=@0x8, cell_domains=0xb2a8c0, exterior_facet_domains=0x2, interior_facet_domains=0xb2a8c0, reset_tensor=32) at dolfin/fem/Assembler.cpp:93 #3 0x00000000004b6f77 in dolfin::TMSOIMSolver::F (this=0x7fff177c9180, b=@0xb41810, x=@0xd30980) at TMSOIMSolver.cpp:46 #4 0x00007f3e0f4e5d70 in dolfin::NewtonSolver::solve (this=0x7fff177c91c8, nonlinear_problem=@0x7fff177c9180, x=@0xd30980) at dolfin/nls/NewtonSolver.cpp:56 #5 0x00000000004b7756 in dolfin::TMSOIMSolver::solve (this=0x7fff177c9180, fluid=<value optimized out>, f=<value optimized out>) at TMSOIMSolver.cpp:135
#6  0x00000000004cd4f4 in main () at TMSOIM_Model.cpp:73