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
FE_Q_iso_Q1: varying subdivisions #12838
FE_Q_iso_Q1: varying subdivisions #12838
Conversation
Why can't we just use |
It assumes uniform subdivisions. |
bf55437
to
71ac540
Compare
1.0 - (x - points[index][0]) / | ||
(points[index + 1][0] - | ||
points[index][0])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This division can potentially be expensive, as we might call value
in inner loops. Do you think it would make sense to store a vector of one_over_lengths
to ensure we only do multiplications?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do that later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made the changes. Furthermore, I have added a test.
71ac540
to
dbc4da7
Compare
There was a problem hiding this 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, but let us wait for one more voice.
/rebuild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except for a couple of typos
dbc4da7
to
d122a38
Compare
@Rombur Thanks for the review. I have fixed the typos! |
The aim is:
None: I have introduced the classPiecewiseLinearPolynomial
. But I guess it would be better to introduce the functionality inPiecewisePolynomial
to prevent the need to perform dynamic_casts to the new class. Opinions?