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

Method gather_outputs

dedalus/core/subsystems.py:352–362  ·  view source on GitHub ↗

Gather and precondition subproblem data from output-like field list.

(self, fields, out=None)

Source from the content-addressed store, hash-verified

350 return out
351
352 def gather_outputs(self, fields, out=None):
353 """Gather and precondition subproblem data from output-like field list."""
354 # Gather from fields
355 views = self._output_field_views(tuple(fields))
356 for buffer_view, field_view in views:
357 np.copyto(buffer_view, field_view)
358 # Apply left preconditioner to compress outputs
359 if out is None:
360 out = self._compressed_buffer
361 apply_sparse(self.pre_left, self._output_buffer, axis=0, out=out)
362 return out
363
364 def scatter_inputs(self, data, fields):
365 """Precondition and scatter subproblem data out to input-like field list."""

Callers 4

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

Calls 2

_output_field_viewsMethod · 0.95
apply_sparseFunction · 0.85

Tested by

no test coverage detected