mammos_mumag.parameters#
Parameters class.
Classes
|
Class storing simulation parameters. |
- class mammos_mumag.parameters.Parameters(size=1e-09, scale=0.0, state=<factory>, m_vect=<factory>, hmag_on=1, hstart=0.0, hfinal=0.0, hstep=0.0, h_vect=<factory>, mstep=1.0, mfinal=-0.8, iter_max=1000, precond_iter=10, tol_fun=1e-10, tol_hmag_factor=1.0, tol_u=1e-10, verbose=0, filepath=None)#
Class storing simulation parameters.
- Parameters:
size (float) – Size of the mesh.
scale (float) – Scale of the mesh.
state (str) – Name of the state. Scripts recognize the strings flower, vortex, twisted, and random. Other strings are interpreted as the default case.
hmag_on (int) – 1 or 0 indicating whether the external field is on (1) or off (0).
hstart (float) – Initial external field.
hfinal (float) – Final external field.
hstep (float) – External field step.
h_vect (list[float]) – External field vector \(\mathbf{h}\).
mstep (float) – TODO
mfinal (float) – TODO
iter_max (int) – Max number of iterations of optimizer. TODO NOT USED AT THE MOMENT.
precond_iter (int) – conjugate gradient iterations for inverse Hessian approximation.
tol_fun (float) – Tolerance of the total energy.
tol_hmag_factor (float) – Factor defining the tolerance for the magnetostatic scalar potential.
tol_u (float) – TODO
verbose (int) – verbosity
filepath (Path | None) – TODO
- h_vect: list[float] = FieldInfo(annotation=list[float], required=False, default_factory=<lambda>, metadata=[MinLen(min_length=3), MaxLen(max_length=3)])#
- m_vect: list[float] = FieldInfo(annotation=list[float], required=False, default_factory=<lambda>, metadata=[MinLen(min_length=3), MaxLen(max_length=3)])#
- read(fname)#
Read parameter file in yaml or p2 format.
Simulation parameters are read and stored.
- Parameters:
- Raises:
NotImplementedError – Wrong file format.
- Return type:
None
- write_p2(fname)#
Write parameter p2 file.