frontend

package
v0.0.0-...-a20b597 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2015 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Overview

This package provides a front-end to drive the MuMax2 simulation engine. The front-end executes an input file written in a scripting language like python and makes it communicate with the engine.

Index

Constants

View Source
const (
	INFIFO        = "in.fifo"   // FIFO filename for mumax->subprocess text-based function calls.
	OUTFIFO       = "out.fifo"  // FIFO filename for mumax<-subprocess text-based function calls.
	HANDSHAKEFILE = "handshake" // Presence of this file indicates subprocess initialization OK.
	PORT          = "0"
	SERVERADDR    = "localhost"
	EOM           = "<<< End of mumax message >>>"

	NOTRUNNING  = 0   // CLIENT IS NOT RUNNING
	RUNNING     = 1   // CLIENT IS RUNNING
	TERMINATE   = 255 // CLIENT ASKS MUMAX2 TO TERMINATE ALL THE CLIENTS
	EXIT        = 254 // CLIENT ASKS MUMAX2 TO EXIT, ENSURING THAT ALL OTHER JOBS HAVE BEEN DONE
	LOGFILENAME = "hotspin.log"
)
View Source
const (
	WELCOME = `
 hotspin v0.1.0114α by Mykola Dvornik (DyNaMat, Ghent University, Belgium)
`
	LOGFILE  = "hotspin.log"
	SENDMAIL = "\n------\nIf you believe this is a bug, please file an issue on https://github.com/godsic/hotspin/issues. Be sure to include the log file \"" + LOGFILE + "\n------\n"
)
View Source
const BUFSIZE = 4096

IO buffer size

Variables

This section is empty.

Functions

func AddMethods

func AddMethods(methods map[string]reflect.Value, receiver_ interface{})

Adds all public methods of receiver to map INTERNAL, but needed by package apigen

func ConvertCase

func ConvertCase(funcName string) string

converts a function name in Go-style casing to the case we want in the API

func GetLatestVersionNumber

func GetLatestVersionNumber(url string) (version int)

Read a text file on a webserver that should contain a single string representing an integer.

func GetOutputDir

func GetOutputDir(inputFile string) string

return the output directory

func Main

func Main()

Mumax2 main function

func RemoveDirContent

func RemoveDirContent(outputDir string) filepath.WalkFunc

func ServeClient

func ServeClient(inputfile string, ClientPath string)

Gets the response from the client and starts the slave server

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) Init

func (c *Client) Init(inputfile string, outputDir string)

func (*Client) Run

func (c *Client) Run()

Start interpreter sub-command and communicate over fifos in the output dir.

func (*Client) RunSlave

func (c *Client) RunSlave()

Do not start interpreter subprocess but wait for commands on Stdin. Used when mumax is the subprocess.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL