On Fri, Jul 15, 2011 at 5:37 PM, Joaquin Mura <[email protected]> wrote: > > 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( ..."
We'd need to see the code itself to pinpoint the error, but it sounds to me like you're writing a custom Newton iteration, similar to what's done in ex13? > 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. The general rule of working with PetscVectors is that they need to be close()'d after any function that calls VecSetValues() internally, so PetscVector::set() and add() are the main ones. A similar statement applies to the use of PetscMatrix. Unless you are doing adaptivity, you should not need to call EquationSystems::reinit() directly, but an example of that is given in ex10. -- John ------------------------------------------------------------------------------ 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-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
