[petsc-users] Passive DM Variables
Nicholas Arnold-Medabalimi
narnoldm at umich.edu
Mon Aug 29 10:24:51 CDT 2022
Yes, this is exactly what I was looking for. Thank you all.
On Mon, Aug 29, 2022 at 8:02 AM Matthew Knepley <knepley at gmail.com> wrote:
> On Sun, Aug 28, 2022 at 12:44 PM Nicholas Arnold-Medabalimi <
> narnoldm at umich.edu> wrote:
>
>> Hi
>>
>> I'm working on a finite volume implementation using DMPlex. I was
>> wondering what the best-considered way to add cell variables to the DM that
>> we don't want to be part of the ksp/snes solve. As far as I can tell, if I
>> add an extra section with those, they will still be part of the F and U
>> vectors in the solver callbacks (to be expected). But my impression is that
>> that will just inflate the system size even if they have an F=0? Or is the
>> solver able to notice variables that are not dependent for the solve.
>>
>> Alternatively, I have been just making a separate DM with those but that
>> feels a bit clunky especially if any mesh refinement occurs.
>>
>
> Mark is correct. We have been using a two DM strategy. You can attach this
> auxiliary data using
>
> https://petsc.org/main/docs/manualpages/DM/DMSetAuxiliaryVec/
>
> The idea is that you define a layout for your extra information using a
> new DM, then create a Vec for it, and attach it to the DM. This
> can be pulled out by any callback function, and the DM can be pulled out
> of the vector. In the Plex pointwise functions for residual
> and Jacobian, auxiliary data is automatically interpolated to the
> quadrature points as well.
>
> Is this what you were looking for?
>
> Thanks,
>
> Matt
>
>
>> Any advice would be much appreciated.
>>
>> Thanks
>> Nicholas
>>
>> --
>> Nicholas Arnold-Medabalimi
>>
>> Ph.D. Candidate
>> Computational Aeroscience Lab
>> University of Michigan
>>
>
>
> --
> 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
>
> https://www.cse.buffalo.edu/~knepley/
> <http://www.cse.buffalo.edu/~knepley/>
>
--
Nicholas Arnold-Medabalimi
Ph.D. Candidate
Computational Aeroscience Lab
University of Michigan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220829/0ad06dbd/attachment.html>
More information about the petsc-users
mailing list