Skip to content
Projects

Grading

The equations of patchwork.mesh.grading, declared on the code that implements them and checked by the tests.

graded_nodes

functionsource

The nodes of [lower, upper] whose cells follow the size spacing.

count
s(x)=∫x0xdξΔx(ξ),N=max⁡(1,round⁡s(x1))s(x) = \int_{x_0}^{x} \frac{d\xi}{\Delta x(\xi)}, \qquad N = \max\big(1, \operatorname{round} s(x_1)\big)
nodes
s(xi)=iN s(x1),i=0,…,Ns(x_i) = \frac{i}{N}\, s(x_1), \qquad i = 0, \dots, N
Assumes
  • Δx>0\Delta x > 0; between the given (x,Δx)(x, \Delta x) pairs linear, beyond them constant
  • ss integrated by the trapezoidal rule on a fine sampling and inverted linearly; the cells follow Δx\Delta x to a factor s(x1)/Ns(x_1) / N, and two neighbours differ by about Δx′\Delta x'
  • with nodes required at given positions, every stretch between them on its own