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

Method change_layout

dedalus/core/field.py:651–662  ·  view source on GitHub ↗

Change data to specified layout.

(self, layout)

Source from the content-addressed store, hash-verified

649 copyto(self.data, old_data)
650
651 def change_layout(self, layout):
652 """Change data to specified layout."""
653 layout = self.dist.get_layout_object(layout)
654 # Transform to specified layout
655 if self.layout.index < layout.index:
656 while self.layout.index < layout.index:
657 #self.domain.distributor.increment_layout(self)
658 self.towards_grid_space()
659 elif self.layout.index > layout.index:
660 while self.layout.index > layout.index:
661 #self.domain.distributor.decrement_layout(self)
662 self.towards_coeff_space()
663
664 def towards_grid_space(self):
665 """Change to next layout towards grid space."""

Callers 15

__getitem__Method · 0.95
allgather_dataMethod · 0.95
gather_dataMethod · 0.95
allreduce_data_normMethod · 0.95
test_jacobi_convertFunction · 0.95
test_convert_scalarFunction · 0.95
test_convert_vectorFunction · 0.95
test_convert_scalarFunction · 0.95
test_convert_vectorFunction · 0.95

Calls 3

towards_grid_spaceMethod · 0.95
towards_coeff_spaceMethod · 0.95
get_layout_objectMethod · 0.80

Tested by 15

test_jacobi_convertFunction · 0.76
test_convert_scalarFunction · 0.76
test_convert_vectorFunction · 0.76
test_convert_scalarFunction · 0.76
test_convert_vectorFunction · 0.76
test_skew_explicitFunction · 0.64
test_trace_explicitFunction · 0.64
test_transpose_explicitFunction · 0.64