mumax / 3

GPU-accelerated micromagnetic simulator
Other
447 stars 150 forks source link

How to incorporate a new energy script. #238

Closed gabrieldavidchaves closed 4 years ago

gabrieldavidchaves commented 4 years ago

Hello all,

I want to create a script to provide an additional output. The file would be very similar to engine/zeeman.go. I need to know what is the procedure to link this new script to the rest of MUMAX, that is, where should I let the installer know that I intend to incorporate new code to the general program.

Thank you all in advance,

Gabriel Chaves

JeroenMulkers commented 4 years ago

Try running go install -v github.com/mumax/3/cmd/mumax3

gabrieldavidchaves commented 4 years ago

I am sorry, but I may not have been clear in my question.

Suppose I have written a file Zeeman2.go, In which I write an energy term For example, the energy density of the field itself B^2/mu0.

So... this should be as easy as to modify Zeeman.go and recompile the source code. But I need to link my code to the rest of mumax... and my question is how to do that link.

In oommf you do that by writing C++ code and placing it in the /local/ folder. The OOMMF builder detects your file, compiles it and makes it accessible to the rest of the system.

My question is how to do that in Mumax3.

Thank you again!

JeroenMulkers commented 4 years ago

Running go install github.com/mumax/3/cmd/mumax3 should suffice (assuming that you wrote the file correctly).

gabrieldavidchaves commented 4 years ago

Thank you! I managed to run a simple test. Best, Gabriel

On Thu, Sep 5, 2019 at 9:15 PM Jeroen Mulkers notifications@github.com wrote:

Running go install github.com/mumax/3/cmd/mumax3 should suffice (assuming that you wrote the file correctly).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mumax/3/issues/238?email_source=notifications&email_token=AJWGXPZA7CVPJ4VOJGGCWNDQIFLF7A5CNFSM4IT4B4U2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6ANWKA#issuecomment-528538408, or mute the thread https://github.com/notifications/unsubscribe-auth/AJWGXP4BZ7VG6HKJGJWI6NTQIFLF7ANCNFSM4IT4B4UQ .

-- Gabriel D. Chaves-O'Flynn Adjunct Instructor