Skip to content
Snippets Groups Projects
Select Git revision
  • 6f9b667cbe28f81995418a865facea3085a8ac59
  • master default protected
  • devel
  • adaptive_step_size
4 results

mc_work.go

Blame
  • user avatar
    Andrew E. Torda authored
    Boring changes to make data types simple int's and float64's so that I can use the binding function in fyne. It is otherwise too painful to have to do lots of casts.
    6f9b667c
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    mc_work.go 907 B
    // Aug 2021
    
    package mcwork
    
    import (
    	"flag"
    	"fmt"
    	"os"
    )
    
    // Have to export everything so the graphical interface can get to them
    type McPrm struct {
    	IniTmp, FnlTmp float64   // Initial and final temperatures
    	XIni           []float32 // initial x slice
    	XDlta          float64   // change x by up to +- xDlta in trial moves
    	NStep          int       // number of steps
    	NRun           int       // number of separate runs
    	fOutName       string    // where we write output to
    	fPltName       string    // where we plot to (function values)
    	xPltName       string    // where we plot x trajectories to
    	verbose        bool
    	dummy          bool // for testing. If set, do not do a run
    }
    
    var seed int64 // for random numbers, but each thread gets its own value
    
    // usage
    func usage() {
    	u := `[options] input_parameter_file`
    	fmt.Fprintf(flag.CommandLine.Output(), "usage of %s: %s\n", os.Args[0], u)
    }