-
Notifications
You must be signed in to change notification settings - Fork 165
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
add unit test for biharmonic #394
Conversation
Thanks for your contribution! |
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.
test/equation/test_biharmonic.py
Outdated
# compute fourth order derivative | ||
for var_i in (x, y): | ||
for var_j in (x, y): | ||
expected_result += hessian(hessian(u, var_i), var_j) | ||
if dim == 3: | ||
for var_i in (x, y, z): | ||
for var_j in (x, y, z): | ||
expected_result += hessian(hessian(u, var_i), var_j) |
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.
dim=3的时候,51-53行代码也会被执行,然后又执行了55-57行,这样显然是不对的,改成下面这样
# compute expected result
expected_result = -q / D
vars = (x, y)
if dim == 3:
vars += (z, )
for var_i in vars:
for var_j in vars:
expected_result += hessian(hessian(u, var_i), var_j)
Signed-off-by: jjyaoao <jjyaoao@126.com>
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.
LGTM
add unit test for biharmonic
PR types
Others
PR changes
Others
Describe
add unit test for
biharmonic