MCPcopy
hub / github.com/tum-pbs/PhiFlow / pad

Method pad

phi/field/_field.py:521–537  ·  view source on GitHub ↗

Alias for `phi.field.pad()`. Pads this `Field` using its extrapolation. Unlike padding the values, this function also affects the `geometry` of the field, changing its size and origin depending on `widths`. Args: widths: Either `int` or `(lower, upper)

(self, widths: Union[int, tuple, list, dict])

Source from the content-addressed store, hash-verified

519 return self.with_geometry(self.geometry.at(position))
520
521 def pad(self, widths: Union[int, tuple, list, dict]) -> 'Field':
522 """
523 Alias for `phi.field.pad()`.
524
525 Pads this `Field` using its extrapolation.
526
527 Unlike padding the values, this function also affects the `geometry` of the field, changing its size and origin depending on `widths`.
528
529 Args:
530 widths: Either `int` or `(lower, upper)` to pad the same number of cells in all spatial dimensions
531 or `dict` mapping dimension names to `(lower, upper)`.
532
533 Returns:
534 Padded `Field`
535 """
536 from ._field_math import pad
537 return pad(self, widths)
538
539 def gradient(self,
540 boundary: Extrapolation = None,

Callers 13

mesh_from_numpyFunction · 0.80
build_facesFunction · 0.80
b_spline_knotsFunction · 0.80
with_boundaryMethod · 0.80
staggered_tensorMethod · 0.80
_dyadic_interpolateFunction · 0.80
bake_extrapolationFunction · 0.80
apply_stencilFunction · 0.80
staggerFunction · 0.80
curlFunction · 0.80
padFunction · 0.80

Calls 1

padFunction · 0.85

Tested by 1