Skip to content

Commit

Permalink
add missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
James Osborn committed Jun 18, 2024
1 parent 85e8811 commit 969e3ed
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/observables/sources.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import field, comms/comms

proc wallSource*(f: Field, t0: int, v: auto) =
for i in f.l.sites:
let t = f.l.coords[^1][i]
if t == t0:
f{i} := v

proc norm2slice*(f: SomeField, s: int): seq[float] =
#for i in l:
# let t = l.vcoords[3][i][0]
let ns = f.l.physGeom[s]
var c = newSeq[float](ns)
for i in f.sites:
let k = f.l.coords[s][i]
c[k] += f{i}.norm2
threadRankSum c
c

0 comments on commit 969e3ed

Please sign in to comment.