Example #1
0
 def set_layer_name(self, name):
     """
     Update the names of the magnetic parameters with the name of the
     layer if it has not already been set.  This is necessary since we don't
     know the layer name until after we have constructed the magnetism object.
     """
     if self.name == "LAYER":
         for p in flatten(self.parameters()):
             p.name = p.name.replace("LAYER", name)
         self.name = name
Example #2
0
 def set_layer_name(self, name):
     """
     Update the names of the magnetic parameters with the name of the
     layer if it has not already been set.  This is necessary since we don't
     know the layer name until after we have constructed the magnetism object.
     """
     if self.name == "LAYER":
         for p in flatten(self.parameters()):
             p.name = p.name.replace("LAYER", name)
         self.name = name
Example #3
0
 def flattened(self):
     return flatten(self.parameters())