How to use the oommfc.util.setup_vector_parameter function in oommfc

To help you get started, we’ve selected a few oommfc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ubermag / oommfc / oommfc / hamiltonian / zeeman.py View on Github external
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
github ubermag / oommfc / oommfc / hamiltonian / uniaxialanisotropy.py View on Github external
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
github ubermag / oommfc / oommfc / hamiltonian / cubicanisotropy.py View on Github external
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
github ubermag / oommfc / oommfc / hamiltonian / cubicanisotropy.py View on Github external
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