Repository navigation
Expand file tree
/
Copy pathwaves.go
More file actions
66 lines (54 loc) · 1.59 KB
/
Copy pathwaves.go
File metadata and controls
66 lines (54 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright (c) 2026, The WaveReality Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
_ "embed"
"cogentcore.org/core/core"
"cogentcore.org/core/math32"
_ "cogentcore.org/lab/yaegilab"
"github.com/WaveReality/waves/wavesim"
)
//go:generate core generate
//go:embed icon.svg
var icon string
func main() {
core.AppIcon = icon
// threed := false
threed := true
// these support 1D or 3D:
// eqs := wavesim.Wave
// eqs := wavesim.WaveC
// eqs := wavesim.WaveCDir
// eqs := wavesim.KleinGordon
// eqs := wavesim.Schrodinger
// 3D only:
// eqs := wavesim.Maxwell
// eqs := wavesim.KleinGordonC
// eqs := wavesim.Dirac
// eqs := wavesim.Weyl
eqs := wavesim.Electroweak
// eqs := wavesim.Spinfield
t1sz := 512
// t3sz := 128
t3sz := 64
// note: max 3d size is slightly above 400^3 for KGParticles
// Total memory size in floats: 4,157,747,712 GB: 16,630,990,848 num vars: 32 buf cap: 21,474,836,480
// nbufs = 10, total vars = 16 -- could squeeze neigh vars to get 12
// and actually just push nvars higher given prior experience.
// actually runs in reasonable time on the macbook at that size!
size := math32.Vec3i(int32(t1sz), 1, 1)
if threed {
size.Set(int32(t3sz), int32(t3sz), int32(t3sz))
}
// ctrPos := math32.Vec3(-1, -1, -1)
// ctrInt := math32.Vec3i(-1, -1, -1)
wavesim.Run(
func(sim *wavesim.Sim) {
sim.Config.Equation = eqs
sim.Params.ThreeD.SetBool(threed)
sim.ViewInitFunc = wavesim.ViewInitFour
sim.Config.Size = size
},
func(sim *wavesim.Sim) {})
}