func SetSolver(typ int) { // free previous solver, if any if stepper != nil { stepper.Free() } switch typ { default: util.Fatalf("SetSolver: unknown solver type: %v", typ) case BACKWARD_EULER: stepper = new(BackwardEuler) case EULER: stepper = new(Euler) case HEUN: stepper = new(Heun) case BOGAKISHAMPINE: stepper = new(RK23) case RUNGEKUTTA: stepper = new(RK4) case DORMANDPRINCE: stepper = new(RK45DP) } solvertype = typ }
func defRegionId(id int) { if id < 0 || id > NREGION { util.Fatalf("region id should be 0 -%v, have: %v", NREGION, id) } checkMesh() }