SimVascular / SimVascular/svOneDSolver

Add folder structure

Open
#124 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
22
Forks
27
PR merge metrics
No merged PRs in 30d

Description

Problem

Right now, (almost) all the source is contained in one big folder, aptly named "Source".

Solution

Good structure typically involves many files. That helps separate subroutines of the source, which is typically much easier to understand than a few massive files (usually a hallmark of a legacy code base and limited attention to architecture).

As the source is refactored, the number of files tends to grow. It usually becomes necessary to divide the files into groups using a folder structure. Some initial groupings I see are "Options", "Model", "FEM", "VTK", although I still have to better understand the details better to know what the appropriate groupings are.

We should consider updating the cmake to handle multiple source subfolders and moving some of the source into them.

Additional context

Future additional enhancement: Better yet, we should have each subfolder have an "export" folder, so that only exported headers will be available globally. Then, we can have local headers that are only available to that subfolder. This would be the start of a modular achitecture for better encapsulation. However, we would probably want to make all headers available to the unit tests (but that's not necessarily going to be required)

Code of Conduct
  • I agree to follow this project's Code of Conduct and Contributing Guidelines

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.

Research direction

Start by reviewing the current Source folder and the CMake configuration to understand how source files and headers are discovered. Compare the proposed Options, Model, FEM, and VTK groupings with the existing layout; done means the source is organized into agreed subfolders and CMake builds the project successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.