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

Add initial 3d dune-copasi simulation support #937

Merged
merged 1 commit into from Feb 15, 2024
Merged

Conversation

lkeegan
Copy link
Member

@lkeegan lkeegan commented Jan 30, 2024

  • add Mesh3d class
    • Uses CGAL to convert segmented ImageStack to tetrahedral mesh
    • Provides vectors of vertices and tetrahedra for each compartment
    • Provides grid in gmsh .msh version 2 format that dune can import
    • setCompartmentMaxCellVolume allows the max size of tetrahedra to be set for each compartment
  • ModelGeometry
    • Now has both a Mesh and a Mesh3d
    • With 1 z-slice, Mesh is used and Mesh3d is null
    • With >1 z-slices, Mesh3d is used and Mesh is null
    • add getIsMeshValid() which tells you if the model has a valid mesh
  • DuneGrid
    • makeDuneGrid now templated on MeshType which can be Mesh or Mesh3d
    • generates a 2d dune grid of triangles from a Mesh as before
    • generates a 3d dune grid of tetrahedrons from a Mesh3d
  • DuneFunction
    • extend to 3d
    • re-enable 2d tiff part of dunefunction test
  • DuneConverter
    • Uses mesh3d & 3d ini file if mesh3d is not null, otherwise previous 2d ini file & mesh
  • DuneSim
    • move most dune-copasi code into impl header and template on number of dimensions
  • Add 3d example models
    • very-simple-model-3d
    • gray-scott-3d
  • Update build system
    • ensure scotch libs are linked in the correct order in core/CMakeLists.txt
    • add scotch to installed core dependencies
    • make dune::copasi a public dependency of core
    • add -fvisibility=hidden to compile flags
    • update codecov cli & explicitly pass token
    • sme_deps -> 2024.02.01
    • manylinux -> 2024.02.01
    • use Python 3.12 in CI

Copy link

codecov bot commented Jan 30, 2024

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Comparison is base (42ec4f0) 89.06% compared to head (519bf7a) 89.17%.

Files Patch % Lines
core/mesh/src/mesh3d.cpp 92.26% 14 Missing ⚠️
core/simulate/src/dunesim_impl.hpp 97.84% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #937      +/-   ##
==========================================
+ Coverage   89.06%   89.17%   +0.11%     
==========================================
  Files         143      151       +8     
  Lines       13854    14120     +266     
==========================================
+ Hits        12339    12592     +253     
- Misses       1515     1528      +13     
Flag Coverage Δ
cli 23.13% <48.55%> (-0.27%) ⬇️
core 50.77% <95.86%> (+0.82%) ⬆️
gui 68.52% <49.22%> (-1.13%) ⬇️
mainwindow 41.74% <51.33%> (-0.60%) ⬇️
sme 28.73% <45.77%> (-0.38%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@lkeegan lkeegan force-pushed the mesh3d_conversions branch 7 times, most recently from 6bca1a0 to 81beae9 Compare February 1, 2024 14:23
@lkeegan lkeegan changed the title WIP Add initial 3d meshing support Add initial 3d dune-copasi simulation support Feb 1, 2024
@lkeegan lkeegan force-pushed the mesh3d_conversions branch 9 times, most recently from e7d051f to 0681f9c Compare February 7, 2024 15:51
@lkeegan lkeegan force-pushed the mesh3d_conversions branch 4 times, most recently from 6f2f502 to adb80e1 Compare February 15, 2024 14:34
- add `Mesh3d` class
  - Uses CGAL to convert segmented ImageStack to tetrahedral mesh
  - Provides vectors of vertices and tetrahedra for each compartment
  - Provides grid in gmsh .msh version 2 format that dune can import
  - setCompartmentMaxCellVolume allows the max size of tetrahedra to be set for each compartment
- ModelGeometry
  - Now has both a Mesh and a Mesh3d
  - With 1 z-slice, Mesh is used and Mesh3d is null
  - With >1 z-slices, Mesh3d is used and Mesh is null
  - add `getIsMeshValid()` which tells you if the model has a valid mesh
- DuneGrid
  - makeDuneGrid now templated on MeshType which can be Mesh or Mesh3d
  - generates a 2d dune grid of triangles from a Mesh as before
  - generates a 3d dune grid of tetrahedrons from a Mesh3d
- DuneFunction
  - extend to 3d
  - re-enable 2d tiff part of dunefunction test
- DuneConverter
  - Uses mesh3d & 3d ini file if mesh3d is not null, otherwise previous 2d ini file & mesh
- DuneSim
  - move most dune-copasi code into impl header and template on number of dimensions
- Add 3d example models
  - very-simple-model-3d
  - gray-scott-3d
- Update build system
  - ensure scotch libs are linked in the correct order in core/CMakeLists.txt
  - add scotch to installed core dependencies
  - make dune::copasi a public dependency of core
  - add `-fvisibility=hidden` to compile flags
  - update codecov cli & explicitly pass token
  - sme_deps -> 2024.02.01
  - manylinux -> 2024.02.01
  - use Python 3.12 in CI
Copy link

sonarcloud bot commented Feb 15, 2024

@lkeegan lkeegan merged commit 34a054c into main Feb 15, 2024
18 checks passed
@lkeegan lkeegan deleted the mesh3d_conversions branch February 15, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant