Reputation: 53
I wanted to modify my problem and broke it down to some groups. None of the groups have solvers attached to it. So they are just groups (composed of few components) that make it easy for the user to differentiate various parts of the product. (each being a group).
I am confused with the IndepVarComp() and Metadata (declared in the initialization) So far I have always used a single group and a single IndepVarComp() where the outputs were always the design variables. If I continue this approach I could use metadata and pass large dictionaries i.e self.options.declare('aa', types=dict).
But looking at other codes based on openmdao, they seem to use indepvarcomp as if it is the metadata (ie. they dont change during iterations.and they are used as a component inside that group)
Could you guide me if one or the other is right way to
Upvotes: 1
Views: 58
Reputation: 5710
IndepVarComp outputs should be used for any output that could conceivably be a design variable or a parameter that you might wish to change in your run script.
Metadata should be used for anything that is explicitly intended to be constant. It is intended to be set once during instantiation and then not changed after the fact.
Upvotes: 1