Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _script(self):
Hmif, Hname = ou.setup_vector_parameter(self.H, 'ze_H')
mif = ''
mif += Hmif
mif += '# FixedZeeman\n'
mif += 'Specify Oxs_FixedZeeman {\n'
mif += f' field {Hname}\n'
mif += '}\n\n'
return mif
def _script(self):
k1mif, k1name = ou.setup_scalar_parameter(self.K1, 'ua_K1')
umif, uname = ou.setup_vector_parameter(self.u, 'ua_u')
mif = ''
mif += k1mif
mif += umif
mif += '# UniaxialAnisotropy\n'
mif += 'Specify Oxs_UniaxialAnisotropy {\n'
mif += f' K1 {k1name}\n'
mif += f' axis {uname}\n'
mif += '}\n\n'
return mif
def _script(self):
k1mif, k1name = ou.setup_scalar_parameter(self.K1, 'ca_K1')
u1mif, u1name = ou.setup_vector_parameter(self.u1, 'ca_u1')
u2mif, u2name = ou.setup_vector_parameter(self.u2, 'ca_u2')
mif = ''
mif += k1mif
mif += u1mif
mif += u2mif
mif += '# CubicAnisotropy\n'
mif += 'Specify Oxs_CubicAnisotropy {\n'
mif += f' K1 {k1name}\n'
mif += f' axis1 {u1name}\n'
mif += f' axis2 {u2name}\n'
mif += '}\n\n'
return mif
def _script(self):
k1mif, k1name = ou.setup_scalar_parameter(self.K1, 'ca_K1')
u1mif, u1name = ou.setup_vector_parameter(self.u1, 'ca_u1')
u2mif, u2name = ou.setup_vector_parameter(self.u2, 'ca_u2')
mif = ''
mif += k1mif
mif += u1mif
mif += u2mif
mif += '# CubicAnisotropy\n'
mif += 'Specify Oxs_CubicAnisotropy {\n'
mif += f' K1 {k1name}\n'
mif += f' axis1 {u1name}\n'
mif += f' axis2 {u2name}\n'
mif += '}\n\n'
return mif