Skip to content
Snippets Groups Projects
Commit 1b485e5a authored by imcovangent's avatar imcovangent
Browse files

Added and tested interactive VISTOMS in SSBJ example scripts.

Former-commit-id: 38323dba06ada29b51fe0cbe1416298fbffb7fa9
parent e225948b
No related branches found
No related tags found
No related merge requests found
Pipeline #192817 canceled
...@@ -7,6 +7,8 @@ import numpy as np ...@@ -7,6 +7,8 @@ import numpy as np
from kadmos.graph import FundamentalProblemGraph, load from kadmos.graph import FundamentalProblemGraph, load
# Settings for logging # Settings for logging
from kadmos.graph.mixin_vistoms import vistoms_start
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG) logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG)
# List of MDA definitions that can be wrapped around the problem # List of MDA definitions that can be wrapped around the problem
...@@ -21,10 +23,12 @@ mdao_definitions = ['unconverged-MDA-GS', # 0 ...@@ -21,10 +23,12 @@ mdao_definitions = ['unconverged-MDA-GS', # 0
'converged-DOE-GS-FF', # 8 'converged-DOE-GS-FF', # 8
'converged-DOE-GS-LH', # 9 'converged-DOE-GS-LH', # 9
'converged-DOE-GS-MC'] # 10 'converged-DOE-GS-MC'] # 10
all_graphs = []
# Settings for scripting # Settings for scripting
mdao_definitions_loop_all = True # Option for looping through all MDAO definitions mdao_definitions_loop_all = True # Option for looping through all MDAO definitions
mdao_definition_id = 6 # Option for selecting a MDAO definition (in case mdao_definitions_loop_all=False) mdao_definition_id = 6 # Option for selecting a MDAO definition (in case mdao_definitions_loop_all=False)
start_interactive_vistoms = True # Option to start an interactive VISTOMS at the end
# Settings for loading and saving # Settings for loading and saving
kb_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../knowledgebases') kb_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../knowledgebases')
...@@ -92,6 +96,7 @@ function_order = ['Structures', 'Aerodynamics', 'Propulsion', 'Performance', ...@@ -92,6 +96,7 @@ function_order = ['Structures', 'Aerodynamics', 'Propulsion', 'Performance',
# Create a DSM and a VISTOMS visualization of the RCG # Create a DSM and a VISTOMS visualization of the RCG
rcg.create_dsm('RCG_extended', include_system_vars=True, destination_folder=pdf_dir, function_order=function_order) rcg.create_dsm('RCG_extended', include_system_vars=True, destination_folder=pdf_dir, function_order=function_order)
rcg.vistoms_create(vistoms_dir, function_order=function_order) rcg.vistoms_create(vistoms_dir, function_order=function_order)
all_graphs.append(rcg)
# On to the wrapping of the MDAO architectures # On to the wrapping of the MDAO architectures
# Get iterator (all or single one) # Get iterator (all or single one)
...@@ -190,6 +195,7 @@ for mdao_definition in mdao_definitions: ...@@ -190,6 +195,7 @@ for mdao_definition in mdao_definitions:
version='0.1', version='0.1',
pretty_print=True, pretty_print=True,
integrity=True) integrity=True)
all_graphs.append(fpg)
# Get Mdao graphs # Get Mdao graphs
mdg, mpg = fpg.impose_mdao_architecture() mdg, mpg = fpg.impose_mdao_architecture()
...@@ -216,5 +222,9 @@ for mdao_definition in mdao_definitions: ...@@ -216,5 +222,9 @@ for mdao_definition in mdao_definitions:
version='0.1', version='0.1',
pretty_print=True, pretty_print=True,
integrity=True) integrity=True)
all_graphs.append((mdg, mpg))
logging.info('Done!') logging.info('Done!')
if start_interactive_vistoms:
vistoms_start(all_graphs, file_dir='ssbj/VISTOMS_mda_interactive')
...@@ -224,4 +224,4 @@ for mdao_definition in mdao_definitions: ...@@ -224,4 +224,4 @@ for mdao_definition in mdao_definitions:
logging.info('Done!') logging.info('Done!')
if start_interactive_vistoms: if start_interactive_vistoms:
vistoms_start(all_graphs, file_dir='ssbj/VISTOMStest') vistoms_start(all_graphs, file_dir='ssbj/VISTOMS_mdo_interactive')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment