Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup the code significantly, and add support for internal conditions and systems #44

Merged
merged 56 commits into from
Sep 10, 2023

Conversation

DanielVandH
Copy link
Member

@DanielVandH DanielVandH commented Sep 3, 2023

Release notes:

New features

  • The only remaining part of the interpolant interface is the new pl_interpolant, but it is still recommended that you use NaturalNeighbours.jl.

  • Inhomogeneous Neumann boundary conditions are supported.

  • Internal conditions can now be specified. InternalConditions can be used to specify these conditions. With this change, Conditions has been defined that merges the two condition types.

  • Systems of PDEs are now supported.

  • More general constraints are now supported for boundary or internal conditions, via the Constrained type, although you will have to do the work yourself converting your problem into a differential-algebraic equation to enforce them.

Breaking changes

  • The FVMGeometry struct has now been simplified to use TriangulationStatistics.jl from DelaunayTriangulation.jl, and so all the old fields such as InteriorInformation have been removed. This shouldn't really affect anything since people should just be using e.g. FVMGeometry(::Triangulation), but it is technically breaking.

  • BoundaryConditions has been rewritten to only store basic information about the boundary conditions. It can still be used as before, but inside FVMProblem it gets wrapped in a Conditions type.

  • params in the BoundaryConditions keyword arguments is now parameters.

  • The storage types for the shape function coefficients (other quantities were previously customised, but they got removed from the previous change) is no longer customisable.

  • Boundary conditions must now be specified as Dudt, Dirichlet, or Neumann, with no more support for other specifications such as :Dirichlet or "Dirichlet". You can also specify a condition as Constrained, as mentioned below in case you want to supplement the associated boundary with some custom constraints using e.g. a differential-algebraic equation.

  • Functions and parameters for boundary conditions must now be provided as Tuples, unlike previously where we also allowed vectors. You can still pass bare functions and parameters if you are just using one.

  • The interpolant interface has been removed and replaced with a simpler pl_interpolate function. See also NaturalNeighbours.jl.

  • The reaction function has been changed to source, so in FVMProblem you need to use source_function=... and source_parameters=... instead of reaction_function=... and reaction_parameters=....

  • The iip_flux argument has been removed in FVMProblem. Instead, all flux functions need to return Tuples representing the vector.

  • The delay function and parameters have been removed in FVMProblem, so you can no longer use delay_function=... and delay_parameters=....

  • The flux functions now always have to return a Tuple of numbers, rather than allowing for in-place functions.

  • To declare a problem as steady, you must now wrap a FVMProblem in a SteadyFVMProblem.

  • The parallel argument of solve now accepts Val(true) or Val(false) rather than true or false.

Other

  • The documentation has been cleaned up significantly, and Literate.jl is now used for the examples.

  • The code has been rewritten.

@codecov
Copy link

codecov bot commented Sep 3, 2023

Codecov Report

Patch coverage: 91.56% and project coverage change: -2.70% ⚠️

Comparison is base (9f39a6a) 94.44% compared to head (4e84b42) 91.74%.

❗ Current head 4e84b42 differs from pull request most recent head 60d7421. Consider uploading reports for the commit 60d7421 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #44      +/-   ##
==========================================
- Coverage   94.44%   91.74%   -2.70%     
==========================================
  Files           8       14       +6     
  Lines         810      703     -107     
==========================================
- Hits          765      645     -120     
- Misses         45       58      +13     
Files Changed Coverage Δ
src/FiniteVolumeMethod.jl 100.00% <ø> (ø)
src/problem.jl 81.95% <81.95%> (-15.85%) ⬇️
src/conditions.jl 84.25% <84.25%> (ø)
src/geometry.jl 92.30% <92.06%> (-0.39%) ⬇️
src/equations/source_contributions.jl 93.18% <93.18%> (ø)
src/equations/dirichlet.jl 93.87% <93.87%> (ø)
src/solve.jl 96.11% <95.60%> (-3.89%) ⬇️
src/equations/triangle_contributions.jl 97.61% <97.61%> (ø)
src/equations/boundary_edge_contributions.jl 98.36% <98.36%> (ø)
src/equations/control_volumes.jl 100.00% <100.00%> (ø)
... and 4 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DanielVandH DanielVandH changed the title Cleanup the code significantly, and add support for internal conditions Cleanup the code significantly, and add support for internal conditions and systems Sep 3, 2023
@DanielVandH DanielVandH linked an issue Sep 10, 2023 that may be closed by this pull request
@DanielVandH DanielVandH merged commit 9666742 into main Sep 10, 2023
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant