# [petsc-users] How to construct DMPlex of cells with different topological dimension?

Matthew Knepley knepley at gmail.com
Wed Nov 3 06:14:46 CDT 2021

```On Wed, Nov 3, 2021 at 4:20 AM TARDIEU Nicolas via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> Dear all,
>
> As a practitioner of structural mechanics, I modestly wish to support
> Yuan's argument. Model mixing, and consequently finite element dimension
> mixing, is (perhaps unfortunately) an inescapable practice of this
> engineering field. This has consequences not only on the nature of the
> meshes we use but also on the quasi-systematic recourse to linear relations
> (also named multipoints constraints, MPC) between the degrees of freedom of
> the different models (for example, linking a shell to a 3D part requires to
> write kinematic connections between displacements and rotations).
> DMPlex handling such meshes would be a really great contribution for the
> structural mechanics community.
>

Nicolas,

>From my point of view, this is supported, so it would be good to understand
what you do not think is supported:

1) Multiple models

This is supported in the sense that you can use any data layout, and
assemble any system you want into it. You can use
beams along edges and shells on faces if you want. I have examples of
different equations in different pieces of the domain.

2) Mesh with pieces hanging off

This is supported in the sense that you can input such a mesh. You
have to describe it completely, but it can be input and iterated over.

3) Mesh Interpolation

If you only want to input vertices _and_ you want to input different
dimensional objects, you will have to write code. There is no way to guess
what you mean from a collection of vertices. You could

a) Directly  call GetRawFaces() to do the interpolation per cell
before input (seems easier)

b) Rewrite the interpolation loop to check whether cell types have
been set and just call the appropriate interpolation if they have

I guess you are arguing that I should add the code for 3). Most people I
have interacted with use a mesh generator to make the meshes, so
I concentrated on importing those formats. Can meshes like these be made
with those generators?

Thanks,

Matt

> Best regards,
> Nicolas
>
>
> Ce message et toutes les pièces jointes (ci-après le 'Message') sont
> établis à l'intention exclusive des destinataires et les informations qui y
> figurent sont strictement confidentielles. Toute utilisation de ce Message
> non conforme à sa destination, toute diffusion ou toute publication totale
> ou partielle, est interdite sauf autorisation expresse.
>
> Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de
> le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou
> partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de
> votre système, ainsi que toutes ses copies, et de n'en garder aucune trace
> sur quelque support que ce soit. Nous vous remercions également d'en
> avertir immédiatement l'expéditeur par retour du message.
>
> Il est impossible de garantir que les communications par messagerie
> électronique arrivent en temps utile, sont sécurisées ou dénuées de toute
> erreur ou virus.
> ____________________________________________________
>
> This message and any attachments (the 'Message') are intended solely for
> the addressees. The information contained in this Message is confidential.
> Any use of information contained in this Message not in accord with its
> purpose, any dissemination or disclosure, either whole or partial, is
> prohibited except formal approval.
>
> If you are not the addressee, you may not copy, forward, disclose or use
> any part of it. If you have received this message in error, please delete
> it and all copies from your system and notify the sender immediately by
> return message.
>
> E-mail communication cannot be guaranteed to be timely secure, error or
> virus-free.
>

--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their