Skip to content

Conversation

@nmnobre
Copy link
Member

@nmnobre nmnobre commented Oct 9, 2025

Hi,

I thought it'd be nice to have some reference for the basis functions we use and build in MFEM.
I'd appreciate if someone could read over this. :) Please do feel free to modify or expand the text as you see fit.

Cheers,
-Nuno

@nmnobre nmnobre force-pushed the basis branch 5 times, most recently from 89e743f to 2d7d6a4 Compare October 9, 2025 21:20
@tzanio tzanio requested a review from mlstowell October 9, 2025 22:21
@nmnobre nmnobre force-pushed the basis branch 2 times, most recently from 459600c to 4227ac3 Compare October 13, 2025 13:28
length partitioning the $[0,1]$ interval,
$x_{i \in {0,...,n}} = (1/2+i)/(n+1)$.

- `IntegratedGLL`: open basis; the basis of order $n$ histopolates all the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be wise to expand on the meaning of "histopolate" or provide a link to an explanation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did both.

[ND](ND_FECollection) and [RT](RT_FECollection) spaces, of the one-dimensional
bases described above. In most cases the user can simply use the provided
defaults, Gauss-Lobatto for H1 spaces, Gauss-Lobatto plus Gauss-Legendre for
ND and RT spaces, and Gauss-Lobatto for L2 spaces. This should not be confused
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the default for L2 is Gauss-Legendre.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈 Embarrassing. I can see from the way I wrote it that my brain was thinking of the right thing, but my hands didn't want to agree... but no excuses, just embarrassing. Thanks for reading this carefully and catching this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to be embarrassed. This is why we proof read for each other. Just a normal part of the process.

@@ -0,0 +1,114 @@
tag-fem:

# Basis Functions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to have a section that describes a bit about the Basis object in MFEM. It's also worth noting that the object provides evaluations of basis functions and their spatial derivatives at a given set of quadrature points

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a paragraph.

ND and RT spaces, and Gauss-Lobatto for L2 spaces. This should not be confused
with the integration rule default, which remains Gauss-Legendre for all cases.

For tensor product elements, e.g. quadrilaterals or hexahedra, the basis
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps mention that serendipity basis can be used with quads/hexes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now mention serendipity elements, with notes for hexahedral elements, the one-dimensional and first order cases.

one-dimensional basis of Chebyshev polynomials of the first kind. The user can
use the [`display-basis` miniapp](tools.md#display-basis) to visualize various
types of basis functions on a single mesh element of their choice.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wedge elements are the tensor product of a triangle and segment, and Pyramids are based on Fuentes et al.'s work: https://doi.org/10.1016/j.camwa.2015.04.027

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've basically reworded this slightly and added it in without expanding much (at all).

Copy link
Member

@mlstowell mlstowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a valuable addition to the web pages. Thank you for contributing.

@tzanio
Copy link
Member

tzanio commented Dec 8, 2025

@nmnobre -- if you can address the remaining comments, we can make this part of the website updates for mfem-4.9

@nmnobre
Copy link
Member Author

nmnobre commented Dec 9, 2025

@nmnobre -- if you can address the remaining comments, we can make this part of the website updates for mfem-4.9

I shall write a bit tomorrow morning then. :)

Copy link
Member

@acfisher acfisher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thanks for helping us with the documentation!

Copy link
Contributor

@helloworld922 helloworld922 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you for writing this.

@tzanio
Copy link
Member

tzanio commented Dec 10, 2025

Thanks, @nmnobre !

@tzanio tzanio changed the base branch from master to mfem-4.9 December 10, 2025 01:21
@tzanio tzanio merged commit 6044a68 into mfem:mfem-4.9 Dec 10, 2025
@nmnobre nmnobre deleted the basis branch December 10, 2025 10:48
@tzanio
Copy link
Member

tzanio commented Dec 10, 2025

FYI, I had to replace the PDF figure with a PNG to render it properly with mkdocs, see 8cfdecb

@nmnobre
Copy link
Member Author

nmnobre commented Dec 10, 2025

Ah, shame, but not a huge deal, we just lose the ability to zoom indefinitely since it was a vector image.
I tested this with Safari, on both a 2560x1600 and a 1920x1080 screen, so I'm curious what your setup is?
Was it the boxes around the plots delineating which bases are nodal/closed/open that looked funny?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants