Skip to content

Add option to select activation function for ChamberSphere - #239

Merged
mrp089 merged 13 commits into
SimVascular:masterfrom
charoheijnen:newchamber
Sep 1, 2026
Merged

Add option to select activation function for ChamberSphere#239
mrp089 merged 13 commits into
SimVascular:masterfrom
charoheijnen:newchamber

Conversation

@charoheijnen

Copy link
Copy Markdown
Contributor

Add option to select activation function for ChamberSphere

Current situation

Currently activation function is hard coded within ChamberSphere. As detailed in #236

Release Notes

  • added option to choose activation funciton to chambersphere block
  • added activaion funtion from chambersphere to activation funciton block

Testing

  • chambersphere test case still runs as previously when choosing double tanh activation funciton with parameters that were in previous test case.

Code of Conduct & Contributing Guidelines

…y of activation funcitons. Added double_tanh activation funciton to activation function file. Changed chamver_sphere.json test case to be able to choose activaiton function. when double_tanh activation funciton was selected test case runs as previously ran.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@KatrinKoesler
KatrinKoesler requested a review from mrp089 July 22, 2026 15:38
@mrp089

mrp089 commented Jul 24, 2026

Copy link
Copy Markdown
Member

@charoheijnen, it looks like the GUI test is throwing an error:

Node 20 is being deprecated. This workflow is running with Node 24 by default.

I think the fix is to bump this up to 24 (or avoid setting a version altogether):

node-version: '20'

@mrp089 mrp089 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, @charoheijnen! See below two comments

Comment thread src/solve/SimulationParameters.cpp Outdated
Comment thread src/solve/SimulationParameters.cpp Outdated

@mrp089 mrp089 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think SimulationParameters can be simplified. See comments.

Comment thread src/solve/SimulationParameters.cpp Outdated
Comment thread src/solve/SimulationParameters.cpp Outdated
@KatrinKoesler

Copy link
Copy Markdown
Collaborator

A bigger overhaul due to the changes in the main repo that had happened in the meantime, which had quite an impact on the changes that had previously been made in this pull request. Ready for re-review (the test files have only changed in order, due to reclassification of ChamberSphere as a chamber not a vessel, not in values!)

@mrp089

mrp089 commented Sep 1, 2026

Copy link
Copy Markdown
Member

Thank you! Can you have a look at my two remaining comments?

@KatrinKoesler

Copy link
Copy Markdown
Collaborator

Now all comments should be fully addressed! I also implemented the has_activation_function flag, from the first comment.

@mrp089

mrp089 commented Sep 1, 2026

Copy link
Copy Markdown
Member

Is has_activation_function even necessary, i.e., are there any chamber blocks that don't have an activation function?

@KatrinKoesler

Copy link
Copy Markdown
Collaborator

There are none currently that don't use an activation function, I don't know if it would ever come to the point that we want to implement one without activation function (i.e. a different kind of activation mechanism)?

@KatrinKoesler

Copy link
Copy Markdown
Collaborator

I can revert that change and leave it so that it is required for any chamber to have an activation function

@mrp089

mrp089 commented Sep 1, 2026

Copy link
Copy Markdown
Member

I think it's reasonable to assume every chamber will have an activation function for now

@mrp089
mrp089 self-requested a review September 1, 2026 20:37

@mrp089 mrp089 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @charoheijnen and @KatrinKoesler!

@mrp089
mrp089 merged commit bfd4a58 into SimVascular:master Sep 1, 2026
10 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

Development

Successfully merging this pull request may close these issues.

3 participants