Utilities and Interfaces



Decorator for a FUSED base class

fusedwind.interface.check_base_compliance(base, cls)[source]

Do some checks on the I/O compatibility of the class with its base:

  • class (cls) – the base class to be satisfied
  • class – the current class to check

Return a list of inputs in a Component class


Return a list of outputs in a Component class


Return a list of variables in a VariableTree class

class fusedwind.interface.configure_base(base)[source]

Bases: object

decorator that enforces a check that the function first argument instance (i.e. self) is in compliance with the base class.

class fusedwind.interface.implement_base(*args)[source]

Bases: object

Decorator to implements the bases. Can both be used for Components and Assemblies


Returns the class ICompCls(Interface)


class fusedwind.fused_helper.defaultdictree[source]

Bases: collections.defaultdict, fusedwind.fused_helper.dictree

Same as dictree, but with defaultdict as a base

class fusedwind.fused_helper.dictree[source]

Bases: dict

Transform a dictionary into a tree


Creates an openMDAO VariableTree and fills it with the dic content


return a flatten pandas DataFrame of the dictree


Display a Container

fusedwind.fused_helper.draw_graph(self, name='Graph', value=False)[source]

Draw the SVG dot_graph of an OpenMDAO Component/Driver/Assembly instance


Flatten a nested dictionary


Decorator to automatically document the inputs and outputs of an Assembly / Component

fusedwind.fused_helper.init_container(self, **kwargs)[source]

Initialise a container with a dictionary of inputs


Create an interative graph using Ipython widgets


Create an interative graph using Ipython widgets


Create an interative plot using Ipython widgets

fusedwind.fused_helper.lconnect(self, a, b)[source]

lazy_connect function. try to connect the outputs of a to the inputs of b that have the same name.

  • Assembly (self) – The assembly containing the components to connect
  • str (b) – The name of the component output a to connect. If a == ‘’, then self.inputs is used
  • str – The name of the component inputs a to connect. If b == ‘’, then self.outputs is used
fusedwind.fused_helper.list_ios(self, iotype=None)[source]

Only list the I/Os that are not in the base Assembly class

fusedwind.fused_helper.make_graph(self, name='Graph', value=False)[source]

Make the dot_graph of an OpenMDAO Component/Driver/Assembly instance

fusedwind.fused_helper.my_call(self, **kwargs)[source]

Partial function of the Component/Assembly Returns a tree dictionary containing the inputs, outputs and nested result dictionaries from the containers

fusedwind.fused_helper.my_str(var, parent='', value=False)[source]

String representation for generating graphs

fusedwind.fused_helper.out_graph_assembly(self, graph, value=False)[source]

Generate the dot_graph for an Assembly

fusedwind.fused_helper.out_graph_component(self, graph, value=False)[source]

Generate the dot_graph for a component

fusedwind.fused_helper.out_graph_driver(self, graph, value=False)[source]

Generate the dot_graph for a driver

class fusedwind.fused_helper.pandasMDAO(a)[source]

Bases: object

Create a pandas memorizer to a component or an Assembly. Each time the memorizer is run, it will look in the DataFrame if the inputs are already there, if they are it will update the component or assembly with the corresponding outputs, otherwise it will run the component or assembly and append the results to the DataFrame


Decorator to add a pandas memorizer to a component or an assembly