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

Method scatter_inputs

dedalus/core/subsystems.py:364–371  ·  view source on GitHub ↗

Precondition and scatter subproblem data out to input-like field list.

(self, data, fields)

Source from the content-addressed store, hash-verified

362 return out
363
364 def scatter_inputs(self, data, fields):
365 """Precondition and scatter subproblem data out to input-like field list."""
366 # Undo right preconditioner inverse to expand inputs
367 apply_sparse(self.pre_right, data, axis=0, out=self._input_buffer)
368 # Scatter to fields
369 views = self._input_field_views(tuple(fields))
370 for buffer_view, field_view in views:
371 np.copyto(field_view, buffer_view)
372
373 def scatter_outputs(self, data, fields):
374 """Precondition and scatter subproblem data out to output-like field list."""

Callers 4

stepMethod · 0.80
stepMethod · 0.80
solveMethod · 0.80
newton_iterationMethod · 0.80

Calls 2

_input_field_viewsMethod · 0.95
apply_sparseFunction · 0.85

Tested by

no test coverage detected