Turn linear mesh into equivalent higher order mesh

43 views
Skip to first unread message

Teo Collin

unread,
Apr 7, 2022, 12:14:00 PM4/7/22
to deal.II User Group
Hello all, 

Suppose I have read in a linear mesh of quads or hexes (via gmsh). How could I create a higher order mesh that represents exactly the same mesh (i.e the elements will be linear but represented with polynomials)? Is there an easy way or step-x someone can point me to?

I am not trying to actually solve anything on a curved mesh yet but I just want to see the impact of increasing the polynomial order of the mesh representation.

Thanks in advance.

Wolfgang Bangerth

unread,
Apr 7, 2022, 12:22:04 PM4/7/22
to dea...@googlegroups.com
Teo:
Are you asking how to increase the polynomial degree of the *mapping* or of
the *finite element*?

As long as your mesh has straight edges, increasing the polynomial degree of
the mapping isn't going to make a difference: The mesh remains the same, and
so the solution remains the same whether or not you represent the straight
edge by linear polynomials or polynomials of higher order. But if you increase
the polynomial degree of the finite element, you can of course expect smaller
errors on the same mesh.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Teo Collin

unread,
Apr 7, 2022, 12:46:37 PM4/7/22
to deal.II User Group
I am asking about the mapping. I know it won't make a difference in terms of the accuracy of my solution, but it will make a difference in terms of time/flops/memory/etc, which is what I want to see.

Wolfgang Bangerth

unread,
Apr 7, 2022, 1:02:29 PM4/7/22
to dea...@googlegroups.com
On 4/7/22 10:46, Teo Collin wrote:
> **
>
> I am asking about the mapping. I know it won't make a difference in terms of
> the accuracy of my solution, but it will make a difference in terms of
> time/flops/memory/etc, which is what I want to see.

Then all you have to do is define a mapping class, and use it everywhere you
do integrals. Take a look at step-10 and -11, for example.

Teo Collin

unread,
Apr 7, 2022, 1:27:46 PM4/7/22
to deal.II User Group
Thanks for your response! I've taken a look at those and I agree it changes the computation of the integrals to use the correct mapping, but I don't see how it changes the mesh representation. Does it? Or do I need to do something else?

I feel like what I want is closer to step-49 - ideally I'd like to use the transform of a mesh, but with the identify transform and a higher order representation for the new mesh.

Wolfgang Bangerth

unread,
Apr 7, 2022, 3:43:34 PM4/7/22
to dea...@googlegroups.com
On 4/7/22 11:27, Teo Collin wrote:
> Thanks for your response! I've taken a look at those and I agree it changes
> the computation of the integrals to use the correct mapping, but I don't see
> how it changes the mesh representation. Does it? Or do I need to do something
> else?

You need to describe the *geometry*. The mesh by itself only has the vertex
locations. step-53 and others are the right starting points to learn how you
can describe curved geometries; MappingQ(k) then does polynomial interpolation
of these curved geometries.
Reply all
Reply to author
Forward
0 new messages