• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OpenMDAO / dymos / 16605512492

29 Jul 2025 07:27PM UTC coverage: 93.547% (-0.1%) from 93.677%
16605512492

push

github

web-flow
Hull problem Rework (#1201)

* Changed Hull problem to solve a more simpler version of the problem

* Updated docs to match the test case

* reworked hull problem to use a parameter

* updated docs

* Changed latest workflow to numpy 2.2

* fixed scipy to a 1.15

* putopsparse to 2.13.1

* petsc to 3.23

* unpinned all version except PetSc

11 of 11 new or added lines in 2 files covered. (100.0%)

83 existing lines in 6 files now uncovered.

33776 of 36106 relevant lines covered (93.55%)

4.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

73.08
/dymos/examples/hyper_sensitive/hyper_sensitive_ode.py
UNCOV
1
import numpy as np
×
UNCOV
2
import openmdao.api as om
×
3

4

UNCOV
5
class HyperSensitiveODE(om.ExplicitComponent):
×
6

UNCOV
7
    def initialize(self):
×
8
        self.options.declare('num_nodes', types=int)
4✔
9

UNCOV
10
    def setup(self):
×
11
        nn = self.options['num_nodes']
4✔
12

13
        # inputs
14
        self.add_input('x', val=np.zeros(nn), desc='state')
4✔
15
        self.add_input('xL', val=np.zeros(nn), desc='cost_state')
4✔
16

17
        self.add_input('u', val=np.zeros(nn), desc='control')
4✔
18

19
        self.add_output('x_dot', val=np.zeros(nn), desc='state rate', units='1/s')
4✔
20
        self.add_output('L', val=np.zeros(nn), desc='Lagrangian', units='1/s')
4✔
21

22
        # Setup partials
23
        self.declare_partials(of='x_dot', wrt='x', rows=np.arange(nn), cols=np.arange(nn), val=-1)
4✔
24
        self.declare_partials(of='x_dot', wrt='u', rows=np.arange(nn), cols=np.arange(nn), val=1)
4✔
25

26
        self.declare_partials(of='L', wrt='x', rows=np.arange(nn), cols=np.arange(nn))
4✔
27
        self.declare_partials(of='L', wrt='u', rows=np.arange(nn), cols=np.arange(nn))
4✔
28

UNCOV
29
    def compute(self, inputs, outputs):
×
30
        x = inputs['x']
4✔
31
        u = inputs['u']
4✔
32

33
        outputs['x_dot'] = -x + u
4✔
34
        outputs['L'] = (x ** 2 + u ** 2) / 2
4✔
35

UNCOV
36
    def compute_partials(self, inputs, jacobian):
×
37
        x = inputs['x']
4✔
38
        u = inputs['u']
4✔
39

40
        jacobian['L', 'x'] = x
4✔
41
        jacobian['L', 'u'] = u
4✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc