jlchan / StartUpDG.jl

Initializes and sets up reference elements and physical meshes for DG.
MIT License
27 stars 9 forks source link

Fix cut-cell `MeshData` type instability for geometric terms #143

Closed jlchan closed 1 year ago

jlchan commented 1 year ago

We store rxJ, sxJ, ryJ, syJ in a single SMatrix, which assumes one homogeneous type for all the entries. Previously, we used FillArrays.Fill,FillArrays.Ones, and FillArrays.Zeros to represent different geometric terms on cut cell meshes. Since FillArrays.Ones and Zeros are a distinct type from FillArrays.Fill, using these different types to represent rxJ, sxJ, ... results in a type instability when accessing entries of md.rstxyzJ

We now use a single array type (FillArrays.Fill`) to represent all geometric terms on cut-cell meshes, which avoids this.

codecov[bot] commented 1 year ago

Codecov Report

Merging #143 (0976367) into main (46b58bb) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #143   +/-   ##
=======================================
  Coverage   97.71%   97.71%           
=======================================
  Files          25       25           
  Lines        3022     3022           
=======================================
  Hits         2953     2953           
  Misses         69       69           
Impacted Files Coverage Δ
src/cut_cell_meshes.jl 98.06% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more