-
-
Notifications
You must be signed in to change notification settings - Fork 568
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
Issue 765 compute grad fem #767
Conversation
Codecov Report
@@ Coverage Diff @@
## master #767 +/- ##
==========================================
+ Coverage 98.36% 98.38% +0.01%
==========================================
Files 179 179
Lines 9871 9894 +23
==========================================
+ Hits 9710 9734 +24
+ Misses 161 160 -1
Continue to review full report at Codecov.
|
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!
eqn = pybamm.grad_squared(var) | ||
eqn_disc = disc.process_symbol(eqn) | ||
ans = eqn_disc.evaluate(None, 3 * y ** 2) | ||
self.assertTrue(all(ans > 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.
np.testing.assert_array_less(0, ans) would give more informative failure messages
Description
Added the gradient operation in the finite element method. This has then been used to compute the ohmic heating in the current collector
Fixes #765
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
Key checklist:
$ flake8
$ python run-tests.py --unit
$ cd docs
and then$ make clean; make html
You can run all three at once, using
$ python run-tests.py --quick
.Further checks: