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

Feature: check_total_derivatives #306

Merged
merged 9 commits into from
Jul 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Here is a list of things that have not yet been fully developed in 2.x:
* Parallel Finite Difference
* File-wrapping utilities
* File variables
* Total Derivatives checking
* Group Finite Difference
* Complex Step approximation for Component/Group derivatives
* Parallel Adjoint and Parallel Forward derivative calculation performance speedup
Expand Down
14 changes: 7 additions & 7 deletions openmdao/components/tests/test_deprecated_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from openmdao.api import Problem, IndepVarComp, Component, Group, NewtonSolver, NonLinearRunOnce
from openmdao.api import ScipyIterativeSolver as ScipyGMRES
from openmdao.devtools.testutil import assert_rel_error
from openmdao.devtools.testutil import assert_rel_error, TestLogger


class Paraboloid(Component):
Expand Down Expand Up @@ -224,7 +224,7 @@ def test_simple_explicit(self):
assert_rel_error(self, J[('comp.f_xy', 'py.y')][0][0], 11.0, 1e-5)

# Check partials
data = prob.check_partials(out_stream=None)
data = prob.check_partials()

for key1, val1 in iteritems(data):
for key2, val2 in iteritems(val1):
Expand Down Expand Up @@ -266,7 +266,7 @@ def test_simple_explicit_apply(self):
assert_rel_error(self, J[('comp.f_xy', 'py.y')][0][0], 11.0, 1e-5)

# Check partials
data = prob.check_partials(out_stream=None)
data = prob.check_partials()

for key1, val1 in iteritems(data):
for key2, val2 in iteritems(val1):
Expand Down Expand Up @@ -311,7 +311,7 @@ def test_simple_implicit(self):
assert_rel_error(self, J[('comp.z', 'p1.x')][0][0], -1.77777777, 1e-5)

# Check partials
data = prob.check_partials(out_stream=None)
data = prob.check_partials()

for key1, val1 in iteritems(data):
for key2, val2 in iteritems(val1):
Expand Down Expand Up @@ -386,7 +386,7 @@ def test_simple_implicit_self_solve(self):
assert_rel_error(self, J[('comp.z', 'p1.x')][0][0], -1.77777777, 1e-5)

# Check partials
data = prob.check_partials(out_stream=None)
data = prob.check_partials()

for key1, val1 in iteritems(data):
for key2, val2 in iteritems(val1):
Expand Down Expand Up @@ -433,7 +433,7 @@ def test_simple_implicit_resid(self):
assert_rel_error(self, J[('comp.z', 'p1.x')][0][0], -1.77777777, 1e-5)

# Check partials
data = prob.check_partials(out_stream=None)
data = prob.check_partials()

for key1, val1 in iteritems(data):
for key2, val2 in iteritems(val1):
Expand Down Expand Up @@ -479,7 +479,7 @@ def test_simple_implicit_apply(self):
assert_rel_error(self, J[('comp.z', 'p1.x')][0][0], -1.77777777, 1e-5)

# Check partials
data = prob.check_partials(out_stream=None)
data = prob.check_partials()

for key1, val1 in iteritems(data):
for key2, val2 in iteritems(val1):
Expand Down
4 changes: 2 additions & 2 deletions openmdao/components/tests/test_exec_comp.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def test_simple_array_model(self):
prob.set_solver_print(level=0)
prob.run_model()

data = prob.check_partials(out_stream=None)
data = prob.check_partials()

assert_rel_error(self, data['comp'][('y','x')]['abs error'][0], 0.0, 1e-5)
assert_rel_error(self, data['comp'][('y','x')]['abs error'][1], 0.0, 1e-5)
Expand All @@ -199,7 +199,7 @@ def test_simple_array_model2(self):
prob.set_solver_print(level=0)
prob.run_model()

data = prob.check_partials(out_stream=None)
data = prob.check_partials()

assert_rel_error(self, data['comp'][('y','x')]['abs error'][0], 0.0, 1e-5)
assert_rel_error(self, data['comp'][('y','x')]['abs error'][1], 0.0, 1e-5)
Expand Down
2 changes: 1 addition & 1 deletion openmdao/components/tests/test_meta_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def test_derivatives(self):
prob['x'] = 0.125
prob.run_model()

data = prob.check_partials(out_stream=None)
data = prob.check_partials()

Jf = data['mm'][('f', 'x')]['J_fwd']
Jr = data['mm'][('f', 'x')]['J_rev']
Expand Down