MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / create_interpolation_data

Function create_interpolation_data

python/dolfinx/fem/utils.py:71–99  ·  view source on GitHub ↗

Generate data for interpolating functions on different meshes. Args: V_to: Function space to interpolate into. V_from: Function space to interpolate from. cells: Indices of the cells associated with `V_to` on which to interpolate into. padding: Absolu

(
    V_to: FunctionSpace,
    V_from: FunctionSpace,
    cells: npt.NDArray[np.int32],
    padding: float = 1e-14,
)

Source from the content-addressed store, hash-verified

69
70
71def create_interpolation_data(
72 V_to: FunctionSpace,
73 V_from: FunctionSpace,
74 cells: npt.NDArray[np.int32],
75 padding: float = 1e-14,
76) -> _PointOwnershipData:
77 """Generate data for interpolating functions on different meshes.
78
79 Args:
80 V_to: Function space to interpolate into.
81 V_from: Function space to interpolate from.
82 cells: Indices of the cells associated with `V_to` on which to
83 interpolate into.
84 padding: Absolute padding of bounding boxes of all entities on
85 mesh_to.
86
87 Returns:
88 Data needed to interpolation functions defined on function
89 spaces on the meshes.
90 """
91 return _PointOwnershipData(
92 _create_interpolation_data(
93 V_to.mesh._cpp_object.geometry,
94 V_to.element._cpp_object,
95 V_from.mesh._cpp_object,
96 cells,
97 padding,
98 )
99 )
100
101
102def discrete_curl(V0: FunctionSpace, V1: FunctionSpace) -> _MatrixCSR:

Calls

no outgoing calls