# Meaning of variable names in PyFR source code

**URL:** <https://pyfr.discourse.group/t/meaning-of-variable-names-in-pyfr-source-code/713>\
**Category:** Development\
**Created:** [4 November 2022 15:16 UTC](https://pyfr.discourse.group/t/meaning-of-variable-names-in-pyfr-source-code/713 "2022-11-04T15:16:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yubo](https://avatars.discourse-cdn.com/v4/letter/y/d9b06d/32.png) [@Yubo](https://pyfr.discourse.group/u/Yubo)\
**Post date:** [4 November 2022 15:16 UTC](https://pyfr.discourse.group/t/meaning-of-variable-names-in-pyfr-source-code/713/1 "2022-11-04T15:16:16Z")

</div>

Hi Developers,

I am reading the source code of PyFR. But I am confused by the abbreviations of some variables. For example, in `PyFR/pyfr/shapes.py`:

```auto
1. self.upts
2. self.nupts
3. self.qpts
4. self.nqpts
5. self.fpts
6. self.fpts_wts
7. self.nspts
8. npts_coeffs
9. npts_cdenom

```

Hence, I’d like to inquire

1. are there some documents that explain the specific physical meaning of these abbreviations?
2. are there some papers that show the computing process of the `quadrule` and `polybasis` of different shapes.

Looking forward to your reply.

Many thanks,

Yubo

---

<div class="post-metadata">

**Author:** ![WillT](https://avatars.discourse-cdn.com/v4/letter/w/bc79bd/32.png) [@WillT](https://pyfr.discourse.group/u/WillT)\
**Post date:** [4 November 2022 15:28 UTC](https://pyfr.discourse.group/t/meaning-of-variable-names-in-pyfr-source-code/713/2 "2022-11-04T15:28:40Z")

</div>

In answer to your first question no there isn’t a document with this written down (unless you count the code)

upts are solution points  
qpts are quadrature points  
fpts are flux poitns  
spts are shape points

Prefixing with a `n` tells you the number of those points. fpts are the flux point weights. I don’t recognise npts\_coeffs but that is probably because it is an abstracted name that is used in some function. Same with npts\_cdenom. (Although I would guess that cdenom i sthe the demoniator of whatever npts\_coeffs).

Freddie’s paper on finding quadratures is a good place to start ([Redirecting](https://doi.org/10.1016/j.camwa.2015.03.017)). The polynomal basis depends on the eleement type but Hesthaven and Warburton 2008 is a good book for these. Generally for some chpoice of polynomial degrees we evaluate some combination of Jacobi polynomials at the solution points to form a Vandermonde matrix. shape.py is a good place to start as is solver/base/elements.py

---

<div class="post-metadata">

**Author:** ![Yubo](https://avatars.discourse-cdn.com/v4/letter/y/d9b06d/32.png) [@Yubo](https://pyfr.discourse.group/u/Yubo)\
**Post date:** [4 November 2022 15:42 UTC](https://pyfr.discourse.group/t/meaning-of-variable-names-in-pyfr-source-code/713/3 "2022-11-04T15:42:05Z")

</div>

Thank you very much for your reply, WillT. It is really helpful!
