Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #969 from Kenneth-T-Moore/ken1
Change examples to use "import openmdao.api as om".
- Loading branch information
Showing
168 changed files
with
7,806 additions
and
7,514 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
|
||
import unittest | ||
|
||
from openmdao.api import Problem, Group | ||
import openmdao.api as om | ||
from openmdao.test_suite.build4test import DynComp, create_dyncomps | ||
|
||
|
||
class BM(unittest.TestCase): | ||
"""Setup of models with lots of components""" | ||
|
||
def benchmark_100(self): | ||
p = Problem() | ||
p = om.Problem() | ||
create_dyncomps(p.model, 100, 10, 10, 5) | ||
p.setup(check=False) | ||
p.setup() | ||
p.final_setup() | ||
|
||
def benchmark_500(self): | ||
p = Problem() | ||
p = om.Problem() | ||
create_dyncomps(p.model, 500, 10, 10, 5) | ||
p.setup(check=False) | ||
p.setup() | ||
p.final_setup() | ||
|
||
def benchmark_1K(self): | ||
p = Problem() | ||
p = om.Problem() | ||
create_dyncomps(p.model, 1000, 10, 10, 5) | ||
p.setup(check=False) | ||
p.setup() | ||
p.final_setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
|
||
import unittest | ||
|
||
from openmdao.api import Problem, Group | ||
import openmdao.api as om | ||
from openmdao.test_suite.build4test import DynComp, create_dyncomps, make_subtree | ||
|
||
|
||
class BM(unittest.TestCase): | ||
"""Setup of models with various tree structures""" | ||
|
||
def benchmark_L4_sub2_c10(self): | ||
p = Problem() | ||
p = om.Problem() | ||
make_subtree(p.model, nsubgroups=2, levels=4, ncomps=10, | ||
ninputs=10, noutputs=10, nconns=5) | ||
p.setup(check=False) | ||
p.setup() | ||
p.final_setup() | ||
|
||
def benchmark_L6_sub2_c10(self): | ||
p = Problem() | ||
p = om.Problem() | ||
make_subtree(p.model, nsubgroups=2, levels=6, ncomps=10, | ||
ninputs=10, noutputs=10, nconns=5) | ||
p.setup(check=False) | ||
p.setup() | ||
p.final_setup() | ||
|
||
def benchmark_L7_sub2_c10(self): | ||
p = Problem() | ||
p = om.Problem() | ||
make_subtree(p.model, nsubgroups=2, levels=7, ncomps=10, | ||
ninputs=10, noutputs=10, nconns=5) | ||
p.setup(check=False) | ||
p.setup() | ||
p.final_setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.