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

Class GaussianBeamSource

python/source.py:1070–1081  ·  view source on GitHub ↗

Wrapper for GaussianBeam3DSource to warn the user when running 2D simulations that this behavior is deprecated and they should be using GaussianBeam2DSource.

Source from the content-addressed store, hash-verified

1068
1069
1070class GaussianBeamSource(GaussianBeam3DSource):
1071 """
1072 Wrapper for GaussianBeam3DSource to warn the user when running 2D simulations that this behavior is deprecated and they should be using GaussianBeam2DSource.
1073 """
1074
1075 def add_source(self, sim):
1076 if sim.dimensions == 2:
1077 warnings.warn(
1078 "GaussianBeamSource is deprecated for 2D simulations. For more accurate results, use GaussianBeam2DSource instead. In the future, this will be the default behavior.",
1079 DeprecationWarning,
1080 )
1081 super().add_source(sim)
1082
1083
1084class IndexedSource(Source):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected