[petsc-users] Augmented Lagrangian examples?

Matthew Knepley knepley at gmail.com
Mon Aug 10 14:26:15 CDT 2015


On Mon, Aug 10, 2015 at 11:05 AM, Justin Chang <jychang48 at gmail.com> wrote:

> Matt,
>
> So inside these TAO routines, if I wanted to include the boundary values,
> would I follow the approaches in functions like
> DMPlexComputeResidual/Jacobian_Internal? I assume I need something like:
>
> DMGetLocalVector(dm,xlocal);
> DMPlexInsertBoundaryValues(xlocal,...);
> ** use xlocal to compute equality constraints/jacobian **
> DMRestoreLocalVector(dm,xlocal);
>

Yes.


> The Jacobian and equality constraints that I want to assemble are not the
> same as the DM matrix use for the entire problem. I am guessing I will need
> to use a different DS for the DM because, for example the stokes problem
> with TH elements, I want to assemble an equality jacobian of size (no. of
> cells) by (no. of velocity dofs), and an equality constraints vector of
> size (no. of cells). How would I go about doing a problem like this?
>

Okay, now we get into some choices I made in Plex. The original version I
wrote could assemble rectangular matrices. This
was a huge complication that no one took advantage of, so I got rid of it.
Now I just assemble the entire problem, and if you
want pieces of it, I pull them out using MatGetSubmatrix(). I still believe
this is the cleanest thing to do.

Maybe you could schematically tell me what you want to do.

  Thanks,

    Matt


> Thanks,
> Justin
>
>
> On Mon, Aug 10, 2015 at 10:01 AM, Matthew Knepley <knepley at gmail.com>
> wrote:
>
>> On Mon, Aug 10, 2015 at 9:56 AM, Justin Chang <jychang48 at gmail.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> 1) I ran across this paper:
>>>
>>> http://web.stanford.edu/~egawlik/pdf/GaMuSaWi2012.pdf
>>>
>>> and was wondering if there are any current TAO examples that do this.
>>>
>>> also
>>>
>>> 2) If I integrate this into an FEM (from DMPlex) I will need to assemble
>>> an equality jacobian matrix and constraint vector. But the element-wise
>>> constraints that I need to compute (e.g., the divergence) needs all degrees
>>> of freedom within the element closure including the essential BCs DMPlex
>>> removes from the global matrix/vector. So how can I work around this and/or
>>> access said removed terms inside a TAO routine?
>>>
>>
>> Those are not really dofs, they are boundary values, so they are not in
>> the global system. The local vectors have
>> the boundary values, so you can calculate the correct constraint eqns to
>> put in the global system.
>>
>>    Matt
>>
>>
>>> Thanks,
>>> Justin
>>>
>>
>>
>>
>> --
>> What most experimenters take for granted before they begin their
>> experiments is infinitely more interesting than any results to which their
>> experiments lead.
>> -- Norbert Wiener
>>
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150810/a5ae7c0b/attachment.html>


More information about the petsc-users mailing list