Dear All,

First, I'd like to thank you guys for Libmesh, great job!

Encouraged by the examples, I started to write and run (successfully!) some 
codes for linear elasticity (both static and dynamic cases). Now I'm trying to 
solve a nonlinear problem using Newton-Raphson iterations. The Hessian 
is explicit so I just need to build at each iteration a certain matrix A and 
rhs 
F depending on the solution from the previous iteration. The idea is: given 
u_old, solve v such that

<A(u_old) v, w> = <F(u_old), w>  for all w

and then the new solution is u_new = u_old + v.

The first iteration runs ok, but the second iteration stops during the call 
to solve(), throwing the message:
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably 
memory access out of range

Debugging with gdb, I only get that the error is produced during the execution
of "libMesh::PetscLinearSolver<double>::solve( ..." 

I'm using the LinearImplicitSystem class to solve the problem. I think that may 
be,
something is zero or null after the first iteration, hence we would need to 
"clear" 
or "reinit" the system class. 
In this example I did not use clear, reinit nor close (the last for matrices 
and vectors)... 
because from the examples it is not very clear for me the way to use it.

So, I would really appreciate if someone could explain why, how and when 
we should use the "clear", "reinit" and "close" member functions (and 
eventually others, if necessary) in order to properly rebuild the matrix and 
the rhs.

Thanks.
Joaquin.


                                          
------------------------------------------------------------------------------
5 Ways to Improve & Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to