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

Refactor hierarchy #53

Merged
merged 85 commits into from
Mar 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
8286530
Changes towards refactored model building
kejacobson Mar 5, 2021
fbd4480
Add readme for tacs_only scripts
kejacobson Mar 5, 2021
3c7ca2a
fix spelling of subsystem
kejacobson Mar 5, 2021
087d158
Remove unnecessary use_tacs conditional
kejacobson Mar 5, 2021
2e1809c
Update number of nodes signature
kejacobson Mar 5, 2021
e817789
Add tags to integrated forces
kejacobson Mar 5, 2021
f6601e5
Remove unnecessary import
kejacobson Mar 5, 2021
825c8cd
Tag VLM and set up an aero only example
kejacobson Mar 5, 2021
7a95526
Parallel Group VLM and aerostructural example
kejacobson Mar 6, 2021
72de6c3
remove import from future
kejacobson Mar 6, 2021
f2be50b
Tag coodinate output for TACS
kejacobson Mar 6, 2021
bd584bf
Make vlm+tacs example multipoint
kejacobson Mar 6, 2021
8bdf5ef
call configure from multipoint base class
kejacobson Mar 6, 2021
ad41506
Add parallel option to struct only scenarion and an untested geometry…
kejacobson Mar 6, 2021
00f5025
fstrings to make some strings easier to read
kejacobson Mar 6, 2021
13e048d
Remove unused function
kejacobson Mar 6, 2021
de8ff13
Better scaling for tacs optimization problem
kejacobson Mar 6, 2021
0f0ac43
Single quotes instead of double
kejacobson Mar 6, 2021
6139b98
Update some names
kejacobson Mar 7, 2021
92fae41
Rename parallel multipoint, and xfer to ldxfer
kejacobson Mar 7, 2021
439cfba
Add fun3d version of aero_only
kejacobson Mar 7, 2021
af82267
Move vlm's read mesh function
kejacobson Mar 7, 2021
5e7d675
Add other versions of struct_only. Organize some examples
kejacobson Mar 7, 2021
37915a3
Clean up vlm aero only example
kejacobson Mar 7, 2021
db5e955
Steps towards distributed TACS. Something still wrong internal to TACS?
kejacobson Mar 7, 2021
8c29da4
Renmae aerostructural example dir
kejacobson Mar 7, 2021
330ccfc
Distributed TACS functions for shape by connection to work properly
kejacobson Mar 7, 2021
7775a26
Rename crm directory
kejacobson Mar 8, 2021
ca3003e
More general vlm mesh reader
kejacobson Mar 8, 2021
661ad2d
Remove type hint
kejacobson Mar 8, 2021
f0b550c
Remove print statement in fun3d builder
kejacobson Mar 8, 2021
e954ec9
Use fstring
kejacobson Mar 8, 2021
5cf942c
Update CRM aerostructural example
kejacobson Mar 8, 2021
b11eb2f
Add parallel FSI example script
kejacobson Mar 8, 2021
f5becd5
Move configure ahead of private methods in mphysgroup
kejacobson Mar 8, 2021
44030af
Fix print for parallel VLM run
kejacobson Mar 8, 2021
d06e663
Add comment in struct_only about the "coupling group".
kejacobson Mar 8, 2021
6f9460c
Split scenario components into two methods
kejacobson Mar 9, 2021
b0c1be3
Don't shape TACS dv vector by conn or else it gets split in parallel …
kejacobson Mar 9, 2021
b5355fd
Set block GS solvers in coupling group not scenario
kejacobson Mar 11, 2021
e83e6dd
Merge branch 'refactor_hierarchy' of github.com:kejacobson/mphys into…
kejacobson Mar 11, 2021
f9ad33a
Update tacs check partials
kejacobson Mar 16, 2021
fc469f5
Remove unnecessary comma
kejacobson Mar 16, 2021
ae0aafc
Update TACS integration test
kejacobson Mar 16, 2021
f093134
Updapte meld test. Run two melds to make sure it can work for multipoint
kejacobson Mar 17, 2021
5660c66
Clean up commented out code in tacs test
kejacobson Mar 17, 2021
4a212a1
Turn off n2 in meld test
kejacobson Mar 17, 2021
d0bfae6
Remove meld_check_partials since the test_meld_derivs now does the sa…
kejacobson Mar 17, 2021
f29c394
Update remaining "check" scripts
kejacobson Mar 17, 2021
ff65ba5
Add some docs
kejacobson Mar 19, 2021
28c0812
Add a unit test for the structural scenario
kejacobson Mar 19, 2021
042d77e
Full name for scenario
kejacobson Mar 19, 2021
1b99a80
Proper connection name
kejacobson Mar 19, 2021
277ac6b
Put common methods into a class
kejacobson Mar 19, 2021
9730f15
Add geometry to the main structural scenario
kejacobson Mar 19, 2021
02d4ef6
Subsystem order test to common methods
kejacobson Mar 19, 2021
4efa9f4
Rename aerodynamic scenario. write unit tests for it
kejacobson Mar 19, 2021
a29f24d
More aero unit tests
kejacobson Mar 19, 2021
45a3a36
Make name of n2 file match test case
kejacobson Mar 19, 2021
a79d4f8
Move n2 writing into common methods
kejacobson Mar 19, 2021
49d61d7
Add mphys_group unit tests
kejacobson Mar 19, 2021
c63276a
Add N2 to docs
kejacobson Mar 20, 2021
139206e
Update git ignore
kejacobson Mar 20, 2021
90ee276
Remove debug print
kejacobson Mar 20, 2021
dbf8742
More docs
kejacobson Mar 20, 2021
6aba84a
More docs in the mphys basics section
kejacobson Mar 20, 2021
06dbc6c
Update dummy comps in single discipline unit tests
kejacobson Mar 20, 2021
b1d1f7b
Add unit test for aerostructural scenario
kejacobson Mar 20, 2021
037e091
Add directory to tracking
kejacobson Mar 20, 2021
10649d4
Clarify tests section of readme
kejacobson Mar 20, 2021
35bf3bf
Typo in doc string
kejacobson Mar 20, 2021
36edb1d
More docs
kejacobson Mar 20, 2021
29992f3
Document that builder methods can return none.
kejacobson Mar 20, 2021
2b2144e
Add note to readme about running unit tests before building docs
kejacobson Mar 20, 2021
2dc5dcf
Merge remote-tracking branch 'openmdao/master' into refactor_hierarchy
anilyil Mar 21, 2021
959947c
tacs funcs rev mode - always set internals
kejacobson Mar 30, 2021
8c97d4a
Merge branch 'refactor_hierarchy' of github.com:kejacobson/mphys into…
kejacobson Mar 30, 2021
b1ad35c
Remove stale comment
kejacobson Mar 30, 2021
2abae3d
Write tacs test to run in parallel
kejacobson Mar 30, 2021
8a4182e
Updates for refactored VLM
kejacobson Mar 30, 2021
d125205
Only try to set the coupling solver if the scenario comm exists
kejacobson Mar 30, 2021
cc25b12
Add patch lumper for derivative checking
kejacobson Mar 30, 2021
5f62062
Update the vlm aerostruct optimization example script
kejacobson Mar 30, 2021
7c59632
Tacs derivative fixes for multipoint and parallel
kejacobson Mar 31, 2021
728adad
Set tacs derivative test to 1 proc until OM has serial/distributed va…
kejacobson Mar 31, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@

mphys.egg-info/*
docs/build/doctrees
docs/_build
*__pycache__
build/
dist/

# input files
tests/input_files/*.xyz
tests/input_files/*.xyz

.ropeproject
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"restructuredtext.confPath": "${workspaceFolder}/docs",
"python.formatting.provider": "autopep8",
"python.formatting.autopep8Args": [
"--max-line-length",
"100",
"--experimental"
]
}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ or for a development version
pip install -e .
```

## Building the Docs
The documentation includes N2 diagrams from the unit tests. Before building the docs, go into `tests/unit_tests` and run `python -m unittest`.
Then go into the `docs` directory and run `make html`.


## Tests
The test are written to use the testflo framework because it allows us to run tests with multiple cores.
To run the tests you will need.

### Integration Tests
These python packages
```
adflow
Expand Down
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
Expand Down
Empty file added docs/_exts/__init__.py
Empty file.
76 changes: 76 additions & 0 deletions docs/_exts/embed_bibtex.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@

import sys
import importlib

from docutils import nodes

import sphinx
from docutils.parsers.rst import Directive

from sphinx.writers.html import HTMLTranslator
from sphinx.writers.html5 import HTML5Translator
from sphinx.errors import SphinxError


class bibtex_node(nodes.Element):
pass


def visit_bibtex_node(self, node):
pass


def depart_bibtex_node(self, node):
"""
This function creates the formatting that sets up the look of the blocks.
The look of the formatting is controlled by _theme/static/style.css
"""
if not isinstance(self, (HTMLTranslator, HTML5Translator)):
self.body.append("output only available for HTML\n")
return

html = """
<div class="cell border-box-sizing code_cell rendered">
<div class="output_area"><pre>{}</pre></div>
</div>""".format(node["text"])

self.body.append(html)


class EmbedBibtexDirective(Directive):
"""
EmbedBibtexDirective is a custom directive to allow a Bibtex citation to be embedded.

.. embed-bibtex::
openmdao.solvers.linear.petsc_ksp
PETScKrylov


The 2 arguments are the module path and the class name.

What the above will do is replace the directive and its args with the Bibtex citation
for the class.

"""

required_arguments = 2
optional_arguments = 0
has_content = True

def run(self):
module_path, class_name = self.arguments
mod = importlib.import_module(module_path)
obj = getattr(mod, class_name)()

if not hasattr(obj, 'cite') or not obj.cite:
raise SphinxError("Couldn't find 'cite' in class '%s'" % class_name)

return [bibtex_node(text=obj.cite)]


def setup(app):
"""add custom directive into Sphinx so that it is found during document parsing"""
app.add_directive('embed-bibtex', EmbedBibtexDirective)
app.add_node(bibtex_node, html=(visit_bibtex_node, depart_bibtex_node))

return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
Loading