Skip to content

Conversation

@JBludau
Copy link
Collaborator

@JBludau JBludau commented Oct 22, 2025

This is a first template for how a the Multiforce model can be changed so it accepts a unspecified number of models.

It requires some meta-template tinkering and some work still:

@streeve
Copy link
Collaborator

streeve commented Nov 13, 2025

Forgot we'll need to bump the Cabana hash in the CI/README

@JBludau
Copy link
Collaborator Author

JBludau commented Nov 14, 2025

@streeve can we run the CI on this? I think it is at least in a state where it can work

Copy link
Collaborator

@streeve streeve left a comment

Choose a reason for hiding this comment

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

This is great; I think the only real question is whether we want to add more testing before merge. @pabloseleson do you have a clear idea of a binary material test system that we can easily check forces/energies for in a similar way we currently do single materials (could be a separate PR)?

KOKKOS_ASSERT( firstType < NumBaseModels );
KOKKOS_ASSERT( secondType < NumBaseModels );

return firstType != secondType;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

how about a ternary? I think it is easier to read:

return (firstType != secondType) ? 1 : 0;

Copy link
Collaborator

Choose a reason for hiding this comment

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

Up to you

@JBludau JBludau closed this Dec 19, 2025
@JBludau JBludau force-pushed the revisit_ForceModelMulti branch from 457b0e0 to 4e891e9 Compare December 19, 2025 19:18
@JBludau
Copy link
Collaborator Author

JBludau commented Dec 19, 2025

again?

@JBludau
Copy link
Collaborator Author

JBludau commented Dec 19, 2025

git wanting to go on holiday
I found out it is actually related to my fork pulling updates for all branches and therefore deleting the diff

@JBludau JBludau reopened this Dec 19, 2025
@JBludau JBludau force-pushed the revisit_ForceModelMulti branch from e577ed9 to 9d847b1 Compare December 19, 2025 19:48
@JBludau JBludau force-pushed the revisit_ForceModelMulti branch from 9d847b1 to 858b01b Compare December 19, 2025 20:20
@JBludau JBludau mentioned this pull request Dec 21, 2025
4 tasks
@streeve streeve mentioned this pull request Dec 30, 2025
13 tasks
static_assert(
(std::conjunction_v<
std::is_same<typename ParameterPackType::template value_type<
Indices>::model_tag,
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could instead check force_tag which is slightly more restrictive. Or we can check both to be more certain if things change in the future

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am for being more restrictive ... it is easier to loosen the restrictions later than to tighten them. And these asserts are mainly for our own protection

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.

2 participants