On Mon, Jun 12, 2017 at 2:53 PM, Roy Stogner <royst...@ices.utexas.edu>
wrote:

>
> On Mon, 12 Jun 2017, David Knezevic wrote:
>
> The approach I'd like to use within each Newton iteration is:
>>> 1. Move the mesh nodes based on the current solution and update the
>>> master/slave pairs
>>> 2. Call mesh_reinit for each GhostingFunctor that has been attached to
>>> the
>>> system
>>> 3. Update the matrix sparsity pattern
>>> 4. Perform the Jacobian/residual assembly using the new sparsity pattern
>>>
>>> I'm not clear on what the best way to deal with step 3 is, so I'd be
>>> interested in any suggestions on this? Are there any existing functions
>>> that would do what I need or would I need to write new code for this?
>>>
>>
>> P.S. Actually, I see that I can do step 3 pretty easily using code based
>> on ImplicitSystem::reinit().
>>
>
> Would you put in an example code after you've got it working?  Aside
> from the instructional value, this seems like the sort of "I didn't
> know that method had non-internal uses" functionality which would be
> easy for us to accidentally regress.
>

Sure, good idea.

Though the issue I'm running into now is that I'm using a PETSc SNES object
to do the nonlinear solve, and it's not clear to me whether or not I can
clear and reinit the Jacobian within a SNES iteration (I'll probably have
to ask on the PETSc list about this). For now I've just turned off the
PETSc error when allocating new non-zeros (which is the "quick and dirty"
way to resolve this issue), and I'll return to the question of how to
correctly allocate the sparsity pattern once I've got everything else
working.

Thanks,
David
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to