simulkade / FVTool

Finite volume toolbox for Matlab/Octave
http://fvt.simulkade.com
BSD 2-Clause "Simplified" License
97 stars 56 forks source link

Vectorize #26

Closed LioSergent closed 2 years ago

LioSergent commented 2 years ago

Oups, meant to open merge request on my fork....

simulkade commented 1 year ago

Oh, I see! Don't worry. Let me know when it's done. I usually work with matlab cell arrays when I model multicomponent transport. I have never tried to test them for computational costs. It is nice to have a cleaner syntax.

On Fri, 29 Jul 2022, 14:33 Lionel Sergent, @.***> wrote:

@.**** commented on this pull request.

In Solvers/solvePDE.m https://github.com/simulkade/FVTool/pull/26#discussion_r933196540:

@@ -1,7 +1,9 @@ -function phi = solvePDE(MS, M, RHS, varargin) -%SOLVEPDE solves the linear system M x \phi = RHS and returns the value of -%\phi reshaped based on the structure of the MeshStructure variable. The -%default solver is the matlab '\' linear solver +function phi = solvePDE(MS, M, RHS, guess, solver_opts)

Hey ! Sorry I messed up the pull request, I wanted to toy around with github thinking I was only playing with my fork (I mean my repo). Most of the changes I'm making are really not ready to be used by anyone else but me haha ! Most of it is either:

  • toying around (like the new SolvePDE), or,
  • trying abstractions like the CalculableStruct or CellTable. I actually somewhat doubt those are good ideas. They allow for nice code lines in some places (like switching between mass and molar fractions, calculating properties in general...), and allow for relatively clean inspection; but also bring a fair share of problems, like calculation time, unsafe mutating... If I end up finding a way that makes those abstractions feel right, and I can find a nice condensed example on how to use them, I can try to make an actual pull request. But I'm not there yet.

— Reply to this email directly, view it on GitHub https://github.com/simulkade/FVTool/pull/26#discussion_r933196540, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOLLRQNCRZI5KJ7ULK66A3VWPFQLANCNFSM5473ITXQ . You are receiving this because you commented.Message ID: @.***>