[petsc-users] [petsc4py] DMPlex and DT class

Valerio Barnabei valerio.barnabei at uniroma1.it
Wed May 30 08:12:26 CDT 2018


Jed, Matt,
Thank you for your kind answers.
I will soon write you back with a more precise (and concise) description of
the space time method we intend to implement in our code, and maybe have
further confrontation on this subject.
Your knowledge and experience is really precious to me.

Thank you again.

Valerio

2018-05-30 14:47 GMT+02:00 Matthew Knepley <knepley at gmail.com>:

> On Wed, May 30, 2018 at 5:45 AM, Valerio Barnabei <
> valerio.barnabei at uniroma1.it> wrote:
>
>> Hello again,
>> I have a few questions about DT and DMPlex in general, not exclusively
>> related to petsc4py implementation: in fact at the current state of my
>> project, which is still being set up, I can choose either to program with
>> C++ or python.
>>
>> -So far, we used PETSc indirectly through libmesh interface. We have a
>> fully working FEM code for FSI problems, and that's our starting point for
>> further research. We're currently interested in developing our own,
>> lighter, simpler interface for the same class of problems, by simply
>> cutting out libmesh, and directly accessing to PETSc. We are strongly
>> determined to implement the "space-time variational formulation of
>> incompressible flows" by Tezduyar and Takizawa (eventually you can find
>> theory informations in https://www.worldscientific.co
>> m/doi/abs/10.1142/S0218202512300013). In this approach the 3D problem
>> becomes a 4D problem including the time dimension, as well discretized with
>> it's own temporal basis functions, resulting in a sequence of time slabs
>> (spatial meshes of a space-time slab is the deformed versions of each
>> other). Unfortunately, as I already mentioned, I'm not quite confident with
>> DT and DMPlex, and even reading examples has not helped my understanding.
>> Do you think DT and DMPlex can handle this kind of 4D representation, or
>> do you think this is incompatible with the current state of that classes?
>>
>
> Too easy answer: yes
>
> More nuanced answer: I am not an expert in this area. I agree with Jed
> that representing it fully is probably not what you want. Usually these
> 4D things are tensor products. Its not hard to do this in Plex (I do it in
> PyLith), but the discretization support is somewhat clunky for this. The
> truly beautiful way to do this is implemented in Firedrake (which uses
> Plex underneath). I want to incorporate it, but have not had any time.
>
> Bottom line: DT is not going to do this out of box. However, in order to
> do it, you would need all the pieces in DT, judging by the way its done
> in Firedrake: https://www.geosci-model-dev.net/9/3803/2016/
>
>
>> -If DMPlex and DT could handle the above mentioned model, do you think we
>> could get any help in implementing the python interface for petsc4py?
>>
>
> Yes, its not that hard to wrap stuff. The reason its not already done is
> that DT has a bunch of arrays passing in the interface, and that is
> still not automatic in 2018.
>
>
>> -If DMPlex and DT could NOT handle the above mentioned model, do you
>> think they can be adapted to achieve that purpose? If they can be adapted,
>> is it a huge, deep modification of those classes, to the point it is not
>> worth even trying?
>>
>
> I think the adaptation is not a research effort, since everything has
> already been worked out. I think its definitely an MS project level of
> difficulty
> in the programming and verification.
>
>
>> I apologize for my verbose mail, I'm available for further explanation if
>> required.
>>
>
> No problem. The questions are interesting.
>
>   Thanks,
>
>     Matt
>
>
>> Best regards,
>> Valerio Francesco Barnabei
>>
>>
>> 2018-05-30 9:38 GMT+02:00 Valerio Barnabei <valerio.barnabei at uniroma1.it>
>> :
>>
>>> Thank you Matt,
>>> I've read some of your works and  I'm interested in your approach. I
>>> would like to keep in touch with you, both to consider the option to make
>>> python interfaces for DT class, and to have a deeper understanding of
>>> Sieve.
>>>
>>> Best regards,
>>> Valerio Francesco Barnabei
>>>
>>> Il 29 mag 2018 23:22, "Matthew Knepley" <knepley at gmail.com> ha scritto:
>>>
>>> On Tue, May 29, 2018 at 1:14 PM, Valerio Barnabei <
>>> valerio.barnabei at uniroma1.it> wrote:
>>>
>>>> Hello,
>>>> I'm trying to figure how to translate snes/ex12, snes/ex56, snes/ex62,
>>>> snes/ex77 in python using petsc4py. Unfortunately I'm having trouble
>>>> finding something analogue to the DT class of C++ PETSc, to call methods
>>>> like PetscFECreateDefault and similar.
>>>> Is this something that can be achieved using petsc4py?
>>>> I mean, is there something included in DM, DMDA or DMPlex that takes
>>>> care of the discretization of a generic value field that I'm missing? (As
>>>> far as I can see and understand, no DT class is implemented in petsc4py)
>>>> I hope i explained myself, unfortunately I'm still a new user.
>>>>
>>>
>>> Hi Valerio,
>>>
>>> There are no Python interfaces for DT because it is all experimental
>>> code. We have not yet agreed that this is
>>> the correct way to do things, so its all my own C experimentation. I
>>> could help you understand it to make Python
>>> interfaces if you wanted to.
>>>
>>>   Thanks,
>>>
>>>     Matt
>>>
>>>
>>>> Thanks in advance for your help.
>>>>
>>>> Best regards,
>>>> Valerio
>>>>
>>>> ___________________________________________
>>>> *Il tuo 5 diventa 1000*
>>>> Fai crescere la tua università
>>>> Dona il 5 per mille alla Sapienza
>>>> Codice fiscale: *80209930587*
>>>> https://www.uniroma1.it/it/pagina/fai-crescere-la-tua-univer
>>>> sita-con-il-cinque-mille
>>>>
>>>>
>>>
>>>
>>> --
>>> 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.caam.rice.edu/~mk51/>
>>>
>>>
>>>
>>
>> ___________________________________________
>> *Il tuo 5 diventa 1000*
>> Fai crescere la tua università
>> Dona il 5 per mille alla Sapienza
>> Codice fiscale: *80209930587*
>> https://www.uniroma1.it/it/pagina/fai-crescere-la-tua-univer
>> sita-con-il-cinque-mille
>>
>>
>
>
> --
> 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.caam.rice.edu/~mk51/>
>

-- 
___________________________________________
*Il tuo 5 diventa 1000*
Fai 
crescere la tua università
Dona il 5 per mille alla Sapienza
Codice 
fiscale: *80209930587*

https://www.uniroma1.it/it/pagina/fai-crescere-la-tua-universita-con-il-cinque-mille 
<https://www.uniroma1.it/it/pagina/fai-crescere-la-tua-universita-con-il-cinque-mille>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180530/aaa49ea9/attachment.html>


More information about the petsc-users mailing list