MCPcopy Create free account
hub / github.com/DedalusProject/dedalus / add_file_handler

Method add_file_handler

dedalus/core/evaluator.py:60–75  ·  view source on GitHub ↗

Create a file handler and add to evaluator.

(self, filename, parallel=None, **kw)

Source from the content-addressed store, hash-verified

58 return self.add_handler(SH)
59
60 def add_file_handler(self, filename, parallel=None, **kw):
61 """Create a file handler and add to evaluator."""
62 if parallel is None:
63 if self.dist.comm.size == 1:
64 parallel = 'gather'
65 else:
66 parallel = FILEHANDLER_PARALLEL_DEFAULT
67 if parallel == 'gather':
68 FileHandler = H5GatherFileHandler
69 elif parallel == 'virtual':
70 FileHandler = H5VirtualFileHandler
71 elif parallel == 'mpio':
72 FileHandler = H5ParallelFileHandler
73 else:
74 raise ValueError(f"Parallel method '{parallel}' not recognized.")
75 return self.add_handler(FileHandler(filename, self.dist, self.vars, **kw))
76
77 def add_handler(self, handler):
78 """Add a handler to evaluator."""

Calls 1

add_handlerMethod · 0.95

Tested by 7

test_cartesian_outputFunction · 0.64
test_cartesian_outputFunction · 0.64
test_polar_outputFunction · 0.64
test_spherical_outputFunction · 0.64