Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make MaterialProperty::polynomial_order a template parameter #262

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

Rombur
Copy link
Member

@Rombur Rombur commented Mar 1, 2024

Currently when using a polynomial description of the material properties, we assume that we have a polynomial of order four. This is often not the case and we end up wasting a lot of flops. This PR makes the polynomial order a template parameter. The correct order is computed at runtime by doing a first read of the material parameters before calling MaterialProperties. The new template parameter p_order propagates everywhere because we need to template MaterialProperties and almost every class owns a reference to MaterialProperties.

@Rombur
Copy link
Member Author

Rombur commented Mar 1, 2024

Retest this please

Copy link
Collaborator

@stvdwtt stvdwtt left a comment

Choose a reason for hiding this comment

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

Looks good to me, sorry for the delayed review.

@stvdwtt stvdwtt merged commit 52d7a21 into adamantine-sim:master Mar 12, 2024
1 check 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.

None yet

2 participants