예제 #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
예제 #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
예제 #3
0
파일: splines.py 프로젝트: RONNCC/bumps
 def flattened(self):
     return flatten(self.parameters())