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

Method load_chunk_layout

python/simulation.py:2376–2389  ·  view source on GitHub ↗
(self, br, source)

Source from the content-addressed store, hash-verified

2374 self.structure.dump_chunk_layout(fname)
2375
2376 def load_chunk_layout(self, br, source):
2377 if self.structure is None:
2378 raise ValueError(
2379 "Structure must be initialized before loading chunk layout from file '%s'"
2380 % source
2381 )
2382
2383 if isinstance(source, Simulation):
2384 vols = source.structure.get_chunk_volumes()
2385 ids = source.structure.get_chunk_owners()
2386 self.structure.load_chunk_layout(vols, [int(f) for f in ids], br)
2387 else:
2388 ## source is either filename (string)
2389 self.structure.load_chunk_layout(source, br)
2390
2391 def get_load_dump_dirname(
2392 self, dirname: str = None, single_parallel_file: bool = None

Callers 1

_init_structureMethod · 0.95

Calls 2

get_chunk_volumesMethod · 0.80
get_chunk_ownersMethod · 0.80

Tested by

no test coverage detected