-
Notifications
You must be signed in to change notification settings - Fork 160
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
Only permit scalars and weighted sums for assign
#2562
Conversation
A quick experiment shows that this can speed things up quite a bit. I've been running the DG advection demo on my branch vs I have a few comments:
|
8f4dfab
to
9c80185
Compare
assign
assign
2929450
to
a0779d1
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.
I think we are mainly just waiting on some things to be fixed for adjoint
ec85c45
to
c1736f4
Compare
c1736f4
to
4e50335
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.
Please check that docs are up to date
Poke me to approve when done |
This commit: - Restricts `assign` to only work for weighted sums of coefficients (plus addition of constants). - Expunges codegen in favour of directly manipulating numpy arrays. - Introduces an `Assigner` class to speed up repeated `assign` calls.
4e50335
to
ad6d7c8
Compare
@ReubenHill I think the docs all look fine. This is ready to go. |
Associated issue: #2556
We also need to merge changes in pyadjoint: dolfin-adjoint/pyadjoint#93.