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

Method load_structure

python/simulation.py:2318–2332  ·  view source on GitHub ↗

Loads a structure from the file `fname`.

(self, fname: str = None, single_parallel_file: bool = True)

Source from the content-addressed store, hash-verified

2316 )
2317
2318 def load_structure(self, fname: str = None, single_parallel_file: bool = True):
2319 """
2320 Loads a structure from the file `fname`.
2321 """
2322 if self.structure is None:
2323 raise ValueError(
2324 "Structure must be initialized before loading structure from file '%s'"
2325 % fname
2326 )
2327 self.structure.load(fname, single_parallel_file)
2328 if verbosity.meep > 0:
2329 print(
2330 "Loaded structure from file: %s (%s)"
2331 % (fname, str(single_parallel_file))
2332 )
2333
2334 def dump_fields(self, fname: str = None, single_parallel_file: bool = True):
2335 """

Callers 2

_init_structureMethod · 0.95
loadMethod · 0.95

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected