The Grid class does not consider the magnet properties passed by the magnets parameter during initialisation.
The calls to builder.create_model in Grid.setup_model and Grid.__call__ need self.femag.magnets as second parameter to fix that issue. If that second parameter is missing, builder.create_magnet, wich is called by builder.create_model, will use the default values m.remanenc = 1.2 and m.relperm = 1.05
The
Grid
class does not consider the magnet properties passed by themagnets
parameter during initialisation.The calls to
builder.create_model
inGrid.setup_model
andGrid.__call__
needself.femag.magnets
as second parameter to fix that issue. If that second parameter is missing,builder.create_magnet
, wich is called bybuilder.create_model
, will use the default values m.remanenc = 1.2 and m.relperm = 1.05121
f.write('\n'.join(builder.create_model(model, self.femag.magnets) +
247
builder.create_model(model, self.femag.magnets) +