CliMA / ClimaCore.jl

CliMA model dycore
https://clima.github.io/ClimaCore.jl/dev
Apache License 2.0
87 stars 8 forks source link

Better naming for quadrature rules and user-defined polynomial degree #163

Open valeriabarra opened 3 years ago

valeriabarra commented 3 years ago

Can we consider renaming GLL, LGL, and GL, LG. These, or their long-but-abbreviated-forms, Gauss-Lobatto and Gauss, respectively, (not sure why in their long forms the poor Legendre is dropped), are more widely used in the Finite Element communities.

Also, can we consider allowing the user to specify not only the total number of quadrature points to use, but also the polynomial degree (usually denoted by p)? I know the two are related, but it is often of interest to run h-refinement (ie, mesh refinement), p-refinement (ie, polynomial degree refinement), or a combination of the two, ie, hp-refinement studies, for convergence or performance-benchmarking purposes. So it would be a quantity handy to have instead of having to derive it from the number of quadrature points (especially if one wants to run several experiments with different under/exact/over-integration strategies).

In this regard, one might want to specify a separate name for the number of finite element nodes (one more of the polynomial degree, perhaps P = p+1, numP = p+1, N = p+1, or numN = p+1). For the distinction between finite element nodes and quadrature (or integration) points, you can see this reference , Section 8.1.5. Thanks.

bischtob commented 3 years ago

This makes sense to me.

simonbyrne commented 3 years ago

Can we consider renaming GLL, LGL, and GL, LG. These, or their long-but-abbreviated-forms, Gauss-Lobatto and Gauss, respectively, (not sure why in their long forms the poor Legendre is dropped), are more widely used in the Finite Element communities.

While doing this, it would make sense to give them the longer names (e.g. LegendreGauss, and define appropriate aliases (const LG = LegendreGauss).

Also, can we consider allowing the user to specify not only the total number of quadrature points to use, but also the polynomial degree (usually denoted by p)? I know the two are related, but it is often of interest to run h-refinement (ie, mesh refinement), p-refinement (ie, polynomial degree refinement), or a combination of the two, ie, hp-refinement studies, for convergence or performance-benchmarking purposes. So it would be a quantity handy to have instead of having to derive it from the number of quadrature points (especially if one wants to run several experiments with different under/exact/over-integration strategies).

In this regard, one might want to specify a separate name for the number of finite element nodes (one more of the polynomial degree, perhaps P = p+1, numP = p+1, N = p+1, or numN = p+1). For the distinction between finite element nodes and quadrature (or integration) points, you can see this reference , Section 8.1.5. Thanks.

We could do this via keyword constructors, i.e. LegendreGauss(degree=3) would be equivalent to LG(npoints=4).