MCPcopy Create free account
hub / github.com/NanoComp/meep / IndexedSource

Class IndexedSource

python/source.py:1084–1105  ·  view source on GitHub ↗

created a source object using (SWIG-wrapped mp::srcdata*) srcdata.

Source from the content-addressed store, hash-verified

1082
1083
1084class IndexedSource(Source):
1085 """
1086 created a source object using (SWIG-wrapped mp::srcdata*) srcdata.
1087 """
1088
1089 def __init__(self, src, srcdata, amp_arr, needs_boundary_fix=False):
1090 self.src = src
1091 self.num_pts = len(amp_arr)
1092 self.srcdata = srcdata
1093 self.amp_arr = amp_arr
1094 self.needs_boundary_fix = needs_boundary_fix
1095
1096 def add_source(self, sim):
1097 sim.fields.register_src_time(self.src.swigobj)
1098 sim.fields.add_srcdata(
1099 self.srcdata,
1100 self.src.swigobj,
1101 self.num_pts,
1102 self.amp_arr,
1103 self.needs_boundary_fix,
1104 )
1105 return

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected