SimVascular / SimVascular/svMultiPhysics

Using only one map for Constitutive_model string to ConstitutiveModelType

Open
#334 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
45
Forks
60
Avg merge
5d 23h
Merged PRs (30d)
11

Description

Problem

There is a map constitutive_model_name_to_type defined from Constitutive_model string to ConstitutiveModelType in consts.cpp/.h which is used by read_files.cpp. Parameters.cpp defines a new map constitutive_model_types which is used by set_material_props.

Solution

Change the code such that all files use the map in consts.cpp and remove the one in Parameters.cpp.

We found a TODO that @ktbolt has put in the code to remove the redundant maps for Constitutive_model string to ConstitutiveModelType (Line 481, Parameters.cpp). We were wondering how you had planned to do it?

Additional context

We were looking for next steps in restructuring the material models in the svMultiPhysics meeting and we agree that one of the main difficulties in implementing new material models is figuring out how the files interact between calling the model from the input file to the function get_pk2cc being called. So, we are looking to streamline that a little bit.

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 comparing constitutive_model_name_to_type in consts.cpp/.h with constitutive_model_types in Parameters.cpp, then inspect their uses in read_files.cpp and set_material_props. Done means all files use the map from consts.cpp and the redundant map in Parameters.cpp is removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.