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

Method gather_inputs

dedalus/core/subsystems.py:340–350  ·  view source on GitHub ↗

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

(self, fields, out=None)

Source from the content-addressed store, hash-verified

338 return tuple(views)
339
340 def gather_inputs(self, fields, out=None):
341 """Gather and precondition subproblem data from input-like field list."""
342 # Gather from fields
343 views = self._input_field_views(tuple(fields))
344 for buffer_view, field_view in views:
345 np.copyto(buffer_view, field_view)
346 # Apply right preconditioner inverse to compress inputs
347 if out is None:
348 out = self._compressed_buffer
349 apply_sparse(self.pre_right_pinv, self._input_buffer, axis=0, out=out)
350 return out
351
352 def gather_outputs(self, fields, out=None):
353 """Gather and precondition subproblem data from output-like field list."""

Callers 2

stepMethod · 0.80
stepMethod · 0.80

Calls 2

_input_field_viewsMethod · 0.95
apply_sparseFunction · 0.85

Tested by

no test coverage detected