The MPhysGroup¶
The purpose of the MPhysGroup is to implement the mechanics of promoting the MPhys variables by tags.
Subsystems with tagged variables that will be promoted are added with the mphys_add_subsystem()
method.
Subsystems that have variables that should not be promoted can still be added with add_subsystem
The automated promotion of tagged variables is done during the configure phase of OpenMDAO setup.
If you need to use configure
in your CouplingGroup or Scenario group, be sure to call the parent’s configure with
super().configure()
.
The MPhysGroup
is the base class of the Coupling Groups and Scenarios.
While it is important to understand the MPhysGroup’s configure()
and mphys_add_subsystem()
interactions,
any new scenario or coupling group should inherit from Scenario
and CouplingGroup
.
rather than subclassing MPhysGroup directly.
- class mphys.MPhysGroup(**kwargs)[source]¶
A OpenMDAO class for automated promotion of MPhys variables
Set the solvers to nonlinear and linear block Gauss–Seidel by default.
- mphys_add_subsystem(name, subsystem)[source]¶
Adding an mphys subsystem will add the subsystem and then set the group to automatically promote the mphys tagged variables
- configure()[source]¶
Promote the mphys-tagged variables of subsystems added by
mphys_add_subsystem()
Manual Connection of Variables¶
In some instances, the use of automated promotion is not appropriate.
Because the MPhysGroup inherits from the standard OpenMDAO group,
subsystems can be added with the standard add_subsystem
method and connected manually.