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

mc_work.go

Blame
  • user avatar
    Andrew E. Torda authored
    18a51fe0
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    mc_work.go 909 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)
    }