Skip to content

Commit

Permalink
Upgrading code on src/matric.c (and exit matrix if out of memory)
Browse files Browse the repository at this point in the history
Initially started due to warning about 'status set but not used'.
Resolve matrix.c:compute_g() warning.

Converted all references in matrix.c/h of using REAL with double.

Insert print functions into debug wrappers, excluded if no debug.

If alloc returns null due to lack of memory then begin reversing
back by releasing used matrix memory (instead of segfaulting).

There's a lot of asserts here! Did a closer look at some of them
and also corrected a couple rows->to->cols. fill-matrix seemed a
little non-symetric with some values returning 0.0 on L/R edges
and values near zero (eg 10-E18) around top/bottoms, plus an odd
reference to should this be epsilon, since the max matrix size is
(25x2+1)x(25x2+1) decided to round any values less than 0.0001 to
0.0 to maintain a more consistent circular Top/Bottom_Left/Right
symetry.

Editted minimum matrix size to 1 since a matrix size of zero does
not make sense to bother working with. Radius probably could have
been changed to anything >= 0.5, but left this minimum unchanged.
  • Loading branch information
JoesCat committed Nov 25, 2024
1 parent 121e9df commit 57afee1
Show file tree
Hide file tree
Showing 3 changed files with 413 additions and 512 deletions.
Loading

0 comments on commit 57afee1

Please sign in to comment.