func main() { // options verbose := false show := true // finalise analysis process and catch errors upon exit defer out.End() // start analysis process out.Start("spo754.sim", 0, 0) // all nodes out.Define("all nodes", out.AllNodes()) out.Define("A", out.At{0, 5}) // load results out.LoadResults(nil) // check skipK := true tolK := 1e-17 tolu := 1e-11 tols := 1e-04 var tst testing.T fem.TestingCompareResultsU(&tst, "data/spo754.sim", "spo754.cmp", tolK, tolu, tols, skipK, verbose) // plot out.Splot("Plot") out.Plot("uy", "t", "A", plt.Fmt{C: "r", M: "o"}, -1) out.Draw("", "", show, nil) }
func main() { // options verbose := false // start analysis process out.Start("spo754.sim", 0, 0) // all nodes out.Define("all nodes", out.AllNodes()) out.Define("A", out.At{0, 5}) // load results out.LoadResults(nil) // check skipK := true tolK := 1e-17 tolu := 1e-11 tols := 1e-04 var tst testing.T fem.TestingCompareResultsU(&tst, "spo754.sim", "spo754.cmp", "", tolK, tolu, tols, skipK, verbose) // save plt.SetForPng(0.8, 400, 200) out.Splot("Plot") out.Plot("uy", "t", "A", plt.Fmt{C: "r", M: "o"}, -1) out.Draw("/tmp", "spo754.png", false, nil) }
func main() { // catch errors var tst testing.T defer func() { if mpi.Rank() == 0 { if err := recover(); err != nil { io.PfRed("ERROR: %v\n", err) } if tst.Failed() { io.PfRed("test failed\n") } } mpi.Stop(false) }() mpi.Start(false) // start global variables and log analysis := fem.NewFEM("data/bh16.sim", "", true, true, false, true, true, 0) // run simulation err := analysis.Run() if err != nil { tst.Error("Run failed\n") return } // check skipK := true tolK := 1e-12 tolu := 1e-15 tols := 1e-12 fem.TestingCompareResultsU(&tst, "data/bh16.sim", "cmp/bh16.cmp", "", tolK, tolu, tols, skipK, true) }
func main() { // catch errors var tst testing.T defer func() { if mpi.Rank() == 0 { if err := recover(); err != nil { io.PfRed("ERROR: %v\n", err) } if tst.Failed() { io.PfRed("test failed\n") } } mpi.Stop(false) }() mpi.Start(false) // start global variables and log if !fem.Start("data/spo751.sim", true, true) { tst.Error("Start failed\n") return } // make sure to flush log defer fem.End() // run simulation if !fem.Run() { tst.Error("Run failed\n") return } // check skipK := true tolK := 1e-17 tolu := 1e-12 tols := 1e-14 fem.TestingCompareResultsU(&tst, "data/spo751.sim", "cmp/spo751.cmp", tolK, tolu, tols, skipK, true) }