Adding svSlicer

Open
#9 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cmake, cpp, docker

Research direction

Start with svSlicer's single main.cpp and the Tools repository's existing build files. Check the Homebrew compiler path, install behavior, and whether the existing svMultiPhysics Docker setup can run the tool. Done means the tool is included, uses Velocity, Pressure, and WSS from svMultiPhysics output, and its installation path works on the tested environment.

Written by the indexing model from the issue text.

Description

enhancement
Use Case

svSlicer (https://github.com/StanfordCBCL/svSlicer) is a repository that takes in 3D results (.vtu file), projects them onto the specified centerline (.vtp file), and averages the results along the points on the centerline to return a .vtp file. This .vtp file can then be postprocessed using vtk in your favorite python script. The whole repository only has one C++ file called main.cpp

I suggest that we add this C++ file to svMultiPhysics. This repository will be useful for comparing 3D model results projected on a centerline with 0D model results, as the lab transitions to more automated methods of BC tuning.

Problem

Currently, svSlicer has only been tested on svSolver's 3D results. I started testing the code using svMultiPhysics. I ran into several issues on my Macbook Pro with M2 Max.

Installation issues:

  1. set(CMAKE_CXX_COMPILER "/usr/local/opt/llvm/bin/clang") does not work with Homebrew installation
  2. cmake --install . gives a Permission denied error
  3. Did not try this on HPC cluster yet, so there remain mysterious issues (or maybe not).

Code issue:

  1. There are no arrays called 'velocity' and 'pressure', so svSlicer will automatically delete those arrays when creating the .vtp file.
Solution

I have solutions to some of these issues. Others remain to be tested by folks.

Installation issues:

  1. Replace the path to “/opt/homebrew/opt/llvm/bin/clang” for those using the Homebrew installation
  2. sudo make install . will allow permission to install
  3. If issues arise, create a Docker (or does the preexisting one for svMultiPhysics work? someone should test this.)

Code issue:

  1. These arrays are now called 'Velocity' and 'Pressure'. Also, 'WSS' is now part of svMultiPhysics. These should be fixed in the main.cpp file.
Alternatives considered

It would be great to discuss!
Also, would it be more useful for this feature to be part of the .xml file or as a standalone option (e.g., running it as "svslicer" alone)?

Additional context

No response

Code of Conduct
  • I agree to follow this project's Code of Conduct and Contributing Guidelines
Dominant language
Python
Stars
13
Forks
10
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SimVascular/Tools

All issues in SimVascular/Tools

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.