I have bumped into a phenomenon in the geometry of jet space $J^r(\mathbb{R}^n,\mathbb{R})$ for $r,n\geq 2$ that I think might help one measure and understand the failure of regularity of functions, perhaps most usefully in the context of non-$C^\infty$ solutions to PDEs in $n$ independent and one dependent variable. But, I'd like to collect some example functions to see if my intuition is correct before proceeding with some difficult constructions.

Here are a couple questions:

What are some interesting functions that have $C^{r-1}$ regularity everywhere in an open set but have $C^r$ regularity on a strict subset (preferably closed, preferably a smooth variety, maybe even preferably discrete points)?

What is a PDE that has a well-known solution in the class (1)?