petsc4py.PETSc.DMInterpolation#
- class petsc4py.PETSc.DMInterpolation#
Bases:
object
Interpolation on a mesh.
Methods Summary
create
([comm])Create a
DMInterpolation
context.destroy
()Destroy the
DMInterpolation
context.evaluate
(dm, x[, v])Calculate interpolated field values at the interpolation points.
Return the coordinates of each interpolation point.
getDim
()Return the spatial dimension of the interpolation context.
getDof
()Return the number of fields interpolated at a point.
Return a
Vec
which can hold all the interpolated field values.restoreVector
(vec)Restore a Vec which can hold all the interpolated field values.
setDim
(dim)Set the spatial dimension for the interpolation context.
setDof
(dof)Set the number of fields interpolated at a point.
setUp
(dm[, redundantPoints, ignoreOutsideDomain])Compute spatial indices for point location during interpolation.
Methods Documentation
- create(comm=None)#
Create a
DMInterpolation
context.Collective.
See also
- destroy()#
Destroy the
DMInterpolation
context.Collective.
See also
Source code at petsc4py/PETSc/DMUtils.pyx:35
- Return type:
- evaluate(dm, x, v=None)#
Calculate interpolated field values at the interpolation points.
Collective.
- Parameters:
- Return type:
See also
- getCoordinates()#
Return the coordinates of each interpolation point.
Collective.
The local vector entries correspond to interpolation points lying on this process, according to the associated DM.
See also
Source code at petsc4py/PETSc/DMUtils.pyx:74
- Return type:
- getDim()#
Return the spatial dimension of the interpolation context.
Not collective.
See also
Source code at petsc4py/PETSc/DMUtils.pyx:92
- Return type:
- getDof()#
Return the number of fields interpolated at a point.
Not collective.
See also
Source code at petsc4py/PETSc/DMUtils.pyx:106
- Return type:
- getVector()#
Return a
Vec
which can hold all the interpolated field values.Collective.
This vector should be returned using
restoreVector
.See also
Source code at petsc4py/PETSc/DMUtils.pyx:186
- Return type:
- restoreVector(vec)#
Restore a Vec which can hold all the interpolated field values.
Collective.
- Parameters:
vec (Vec) – A vector capable of holding the interpolated field values.
- Return type:
See also
- setDim(dim)#
Set the spatial dimension for the interpolation context.
Not collective.
See also
- setDof(dof)#
Set the number of fields interpolated at a point.
Not collective.
See also
- setUp(dm, redundantPoints=False, ignoreOutsideDomain=False)#
Compute spatial indices for point location during interpolation.
Collective.
- Parameters:
dm (DM) – The DM for the function space used for interpolation.
redundantPoints (bool) – If
True
, all processes are passing in the same array of points. Otherwise, points need to be communicated among processes.ignoreOutsideDomain (bool) – Ignore points outside of the domain if
True
; otherwise, return an error.
- Return type:
See also