prisms-center / phaseField

PRISMS-PF: An Open-Source Phase-Field Modeling Framework
https://prisms-center.github.io/phaseField/
Other
229 stars 120 forks source link

Using `[[maybe_unused]]` for `q_point_loc` #217

Closed landinjm closed 2 months ago

landinjm commented 3 months ago

Adding the [[maybe_unused]] attribute can suppress compiler warnings if variables are not used (since c++17).

https://github.com/prisms-center/phaseField/blob/5f4829aa30fc3e637f57f353e4179ea5d8f1446e/include/matrixFreePDE.h#L268-L276

We can use this for q_point_loc to suppress some the warnings since it won't always be used in whatever PDE the user decides on.

One thing to note is that this will require somewhat recent compilers since it's from the c++ 2017 standard.