示例#1
0
 def setUp(self):
     self.nn = 5
     grp = oc.IntegratorGroup()
     grp.add_subsystem('iv', om.IndepVarComp('a', val=1.0))
     phase = oc.PhaseGroup()
     phase.add_subsystem('grp', grp)
     self.p = om.Problem(model=phase)
示例#2
0
 def setUp(self):
     self.nn = 5
     grp = oc.IntegratorGroup()
     grp.add_subsystem('iv', om.IndepVarComp('a', val=1.0))
     phase = oc.PhaseGroup()
     phase.add_subsystem('iv', om.IndepVarComp('duration', val=3.0, units='s'), promotes_outputs=['*'])
     phase.add_subsystem('grp', grp)
     self.p = om.Problem(model=phase)
     self.p.setup()
示例#3
0
    def setUp(self):
        self.nn = 5
        grp1 = IntegratorGroupTestBase(num_nodes=self.nn)
        grp2 = om.Group()
        grp2a = grp2.add_subsystem('a', IntegratorGroupTestBase(num_nodes=self.nn))
        grp2b = grp2.add_subsystem('b', IntegratorGroupTestBase(num_nodes=self.nn))
        phase = oc.PhaseGroup(num_nodes=self.nn)
        phase.add_subsystem('iv', om.IndepVarComp('duration', val=5.0, units='s'), promotes_outputs=['*'])
        phase.add_subsystem('grp1', grp1)
        phase.add_subsystem('grp2', grp2)

        self.p = om.Problem(model=phase)
        self.p.setup(force_alloc_complex=True)