adamantine-sim / adamantine

Software to simulate heat transfer for additive manufacturing
https://adamantine-sim.github.io/adamantine/
Other
31 stars 9 forks source link

Make MaterialProperty::polynomial_order a template parameter #262

Closed Rombur closed 3 months ago

Rombur commented 4 months ago

Currently when using a polynomial description of the material properties, we assume that we have a polynomial of order four. This is often not the case and we end up wasting a lot of flops. This PR makes the polynomial order a template parameter. The correct order is computed at runtime by doing a first read of the material parameters before calling MaterialProperties. The new template parameter p_order propagates everywhere because we need to template MaterialProperties and almost every class owns a reference to MaterialProperties.

Rombur commented 4 months ago

Retest this please