parameters: (self, attr)
docstring: Add an XDMF Attribute (results data set) to each child grid.
docstring_summary: Add an XDMF Attribute (results data set) to each child grid.
docstring_tokens: Add an XDMF Attribute ( results data set ) to each child grid .
function: def add_attribute(self, attr):
          """Add an XDMF Attribute (results data set) to each child grid."""
          for grid in self.grids:
              if (attr.center == "Cell"):
                  if (isinstance(attr, ConditionData) and (grid.name.startswith("RootModelPart.Conditions"))):
                      grid.add_attribute(attr)
                  if (isinstance(attr, ElementData) and (grid.name.startswith("RootModelPart.Elements"))):
                      grid.add_attribute(attr)
              else:
                  grid.add_attribute(attr)
function_tokens: def add_attribute ( self , attr ) : for grid in self . grids : if ( attr . center == "Cell" ) : if ( isinstance ( attr , ConditionData ) and ( grid . name . startswith ( "RootModelPart.Conditions" ) ) ) : grid . add_attribute ( attr ) if ( isinstance ( attr , ElementData ) and ( grid . name . startswith ( "RootModelPart.Elements" ) ) ) : grid . add_attribute ( attr ) else : grid . add_attribute ( attr )