On Jun 24, 2008, at 1:19 PM, Roy Stogner wrote:
> I think I noticed this problem and tried to avoid it in
> petsc_diff_solver.C; you might cut and paste some of that code into
> Ben's solver to see if using my "swap vectors, System::update"
> localization works any better.
Ok - I've tried to implement this, but I must be off somewhere. What
I've done is add a _system refence inside of NonlinearSolver (the same
way there is one in DiffSolver) and then I'm using code like this
inside of __libmesh_petsc_snes_residual:
PetscVector<Number> X_global(x), R(r);
PetscVector<Number>& X_local =
*dynamic_cast<PetscVector<Number>*>(sys.solution.get());
X_global.swap(X_local);
sys.update();
X_global.swap(X_local);
solver->residual (X_global, R);
This seems to work ok in 2D... but in 3D it is generating NAN's for
some reason. Someone please point out my logic troubles...
Derek
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel