mapping.discrete#
Functions#
|
Classes#
|
|
|
Details#
- class SplineMapping(*args: Any, **kwargs: Any)[source]#
Bases:
BasicCallableMapping
- property name#
- property ldim#
- property pdim#
- build_mesh(grid, npts_per_cell=None, overlap=0)[source]#
Evaluation of the mapping on the given grid.
- Parameters:
- gridList of ndarray
Grid on which to evaluate the fields. Each array in this list corresponds to one logical coordinate.
- npts_per_cell: int, tuple of int or None, optional
Number of evaluation points in each cell. If an integer is given, then assume that it is the same in every direction.
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- mesh: tuple
ldim ldim-D arrays. One for each component.
See also
psydac.fem.tensor.TensorFemSpace.eval_fields
More information about the grid parameter.
- jac_mat_grid(grid, npts_per_cell=None, overlap=0)[source]#
Evaluates the Jacobian matrix of the mapping at the given location(s) grid.
- Parameters:
- gridList of array_like
Grid on which to evaluate the fields
- npts_per_cell: int or tuple of int or None, optional
number of evaluation points in each cell. If an integer is given, then assume that it is the same in every direction.
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- array_like
Jacobian matrix at the location(s) grid.
See also
mapping.SplineMapping.inv_jac_mat_grid
Evaluates the inverse of the Jacobian matrix of the mapping at the given location(s) grid.
mapping.SplineMapping.metric_det_grid
Evaluates the metric determinant of the mapping at the given location(s) grid.
- jac_mat_regular_tensor_grid(grid, overlap=0)[source]#
Evaluates the Jacobian matrix on a regular tensor product grid.
- Parameters:
- gridList of ndarray
List of 2D arrays representing each direction of the grid. Each of these arrays should have shape (ne_xi, nv_xi) where ne_xi is the number of cells in the domain in the direction xi and nv_xi is the number of evaluation points in the same direction.
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- jac_matsndarray
self.ldim + 2
D array of shape(n_x_1, ..., n_x_ldim, ldim, ldim)
.jac_mats[x_1, ..., x_ldim]
is the Jacobian matrix at the location corresponding to(x_1, ..., x_ldim)
.
- jac_mat_irregular_tensor_grid(grid, overlap=0)[source]#
Evaluates the Jacobian matrix on an irregular tensor product grid.
- Parameters:
- gridList of ndarray
List of 1D arrays representing each direction of the grid.
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- jac_matsndarray
self.ldim + 2
D array of shape(n_x_1, ..., n_x_ldim, ldim, ldim)
.jac_mats[x_1, ..., x_ldim]
is the Jacobian matrix at the location corresponding to(x_1, ..., x_ldim)
.
- inv_jac_mat_grid(grid, npts_per_cell=None, overlap=0)[source]#
Evaluates the inverse of the Jacobian matrix of the mapping at the given location(s) grid.
- Parameters:
- gridList of array_like
Grid on which to evaluate the fields
- npts_per_cell: int or tuple of int or None, optional
number of evaluation points in each cell. If an integer is given, then assume that it is the same in every direction.
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- array_like
Inverse of the Jacobian matrix at the location(s) grid.
See also
mapping.SplineMapping.jac_mat_grid
Evaluates the Jacobian matrix of the mapping at the given location(s) grid.
mapping.SplineMapping.metric_det_grid
Evaluates the metric determinant of the mapping at the given location(s) grid.
- inv_jac_mat_regular_tensor_grid(grid, overlap=0)[source]#
Evaluates the inverse of the Jacobian matrix on a regular tensor product grid.
- Parameters:
- gridList of ndarray
List of 2D arrays representing each direction of the grid. Each of these arrays should have shape (ne_xi, nv_xi) where ne_xi is the number of cells in the domain in the direction xi and nv_xi is the number of evaluation points in the same direction.
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- inv_jac_matsndarray
self.ldim + 2
D array of shape(n_x_1, ..., n_x_ldim, ldim, ldim)
.jac_mats[x_1, ..., x_ldim]
is the inverse of the Jacobian matrix at the location corresponding to(x_1, ..., x_ldim)
.
- inv_jac_mat_irregular_tensor_grid(grid, overlap=0)[source]#
Evaluates the inverse of the Jacobian matrix on an irregular tensor product grid.
- Parameters:
- gridList of ndarray
List of 1D arrays representing each direction of the grid.
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- inv_jac_matsndarray
self.ldim + 2
D array of shape(n_x_1, ..., n_x_ldim, ldim, ldim)
.jac_mats[x_1, ..., x_ldim]
is the inverse of the Jacobian matrix at the location corresponding to(x_1, ..., x_ldim)
.
- jac_det_grid(grid, npts_per_cell=None, overlap=0)[source]#
Evaluates the Jacobian determinant of the mapping at the given location(s) grid.
- Parameters:
- gridList of array_like
Grid on which to evaluate the fields
- npts_per_cell: int or tuple of int or None, optional
number of evaluation points in each cell. If an integer is given, then assume that it is the same in every direction.
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- array_like
Jacobian determinant at the location(s) grid.
See also
mapping.SplineMapping.jac_mat_grid
Evaluates the Jacobian matrix of the mapping at the given location(s) grid.
mapping.SplineMapping.inv_jac_mat_grid
Evaluates the inverse of the Jacobian matrix of the mapping at the given location(s) grid.
- jac_det_regular_tensor_grid(grid, overlap=0)[source]#
Evaluates the Jacobian determinant on a regular tensor product grid.
- Parameters:
- gridList of ndarray
List of 2D arrays representing each direction of the grid. Each of these arrays should have shape (ne_xi, nv_xi) where ne_xi is the number of cells in the domain in the direction xi and nv_xi is the number of evaluation points in the same direction.
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- jac_detsndarray
self.ldim
D array of shape(n_x_1, ..., n_x_ldim)
.jac_dets[x_1, ..., x_ldim]
is the Jacobian determinant at the location corresponding to(x_1, ..., x_ldim)
.
- jac_det_irregular_tensor_grid(grid, overlap=0)[source]#
Evaluates the Jacobian determinant on an irregular tensor product grid.
- Parameters:
- gridList of ndarray
List of 1D arrays representing each direction of the grid.
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- jac_detsndarray
self.ldim
D array of shape(n_x_1, ..., n_x_ldim)
.jac_dets[x_1, ..., x_ldim]
is the Jacobian determinant at the location corresponding to(x_1, ..., x_ldim)
.
- property space#
- property fields#
- property control_points#
- class NurbsMapping(*args: Any, **kwargs: Any)[source]#
Bases:
SplineMapping
- build_mesh(grid, npts_per_cell=None, overlap=0)[source]#
Evaluation of the mapping on the given grid.
- Parameters:
- gridList of ndarray
Each array in the list should correspond to a logical coordinate.
- npts_per_cellint, tuple of int or None, optional
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- mesh: tuple
ldim ldim-D arrays. One for each component.
See also
psydac.fem.tensor.TensorFemSpace.eval_fields
More information about the grid parameter.
- jac_mat_regular_tensor_grid(grid, overlap=0)[source]#
Evaluates the Jacobian matrix on a regular tensor product grid.
- Parameters:
- gridList of ndarray
List of 2D arrays representing each direction of the grid. Each of these arrays should have shape (ne_xi, nv_xi) where ne_xi is the number of cells in the domain in the direction xi and nv_xi is the number of evaluation points in the same direction.
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- jac_matsndarray
self.ldim + 2
D array of shape(n_x_1, ..., n_x_ldim, ldim, ldim)
.jac_mats[x_1, ..., x_ldim]
is the Jacobian matrix at the location corresponding to(x_1, ..., x_ldim)
.
- jac_mat_irregular_tensor_grid(grid, overlap=0)[source]#
Evaluates the Jacobian matrix on an irregular tensor product grid.
- Parameters:
- gridList of ndarray
List of 1D arrays representing each direction of the grid.
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- jac_matsndarray
self.ldim + 2
D array of shape(n_x_1, ..., n_x_ldim, ldim, ldim)
.jac_mats[x_1, ..., x_ldim]
is the Jacobian matrix at the location corresponding to(x_1, ..., x_ldim)
.
- inv_jac_mat_regular_tensor_grid(grid, overlap=0)[source]#
Evaluates the inverse of the Jacobian matrix on a regular tensor product grid.
- Parameters:
- gridList of ndarray
List of 1D arrays representing each direction of the grid.
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- inv_jac_matsndarray
self.ldim + 2
D array of shape(n_x_1, ..., n_x_ldim, ldim, ldim)
.jac_mats[x_1, ..., x_ldim]
is the inverse of the Jacobian matrix a at the location corresponding to(x_1, ..., x_ldim)
.
- inv_jac_mat_irregular_tensor_grid(grid, overlap=0)[source]#
Evaluates the inverse of the Jacobian matrix on an irregular tensor product grid.
- Parameters:
- gridList of ndarray
List of 1D arrays representing each direction of the grid.
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- inv_jac_matsndarray
self.ldim + 2
D array of shape(n_x_1, ..., n_x_ldim, ldim, ldim)
.jac_mats[x_1, ..., x_ldim]
is the inverse of the Jacobian matrix at the location corresponding to(x_1, ..., x_ldim)
.
- jac_det_regular_tensor_grid(grid, overlap=0)[source]#
Evaluates the Jacobian determinant on a regular tensor product grid.
- Parameters:
- gridList of ndarray
List of 2D arrays representing each direction of the grid. Each of these arrays should have shape (ne_xi, nv_xi) where ne_xi is the number of cells in the domain in the direction xi and nv_xi is the number of evaluation points in the same direction.
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- jac_detsndarray
self.ldim
D array of shape(n_x_1, ..., n_x_ldim)
.jac_dets[x_1, ..., x_ldim]
is the Jacobian determinant at the location corresponding to(x_1, ..., x_ldim)
.
- jac_det_irregular_tensor_grid(grid, overlap=0)[source]#
Evaluates the Jacobian determinant on a regular tensor product grid.
- Parameters:
- gridList of ndarray
List of 2D arrays representing each direction of the grid. Each of these arrays should have shape (ne_xi, nv_xi) where ne_xi is the number of cells in the domain in the direction xi and nv_xi is the number of evaluation points in the same direction.
- overlapint
How much to overlap. Only used in the distributed context.
- Returns:
- jac_detsndarray
self.ldim
D array of shape(n_x_1, ..., n_x_ldim)
.jac_dets[x_1, ..., x_ldim]
is the Jacobian determinant at the location corresponding to(x_1, ..., x_ldim)
.
- property weights_field#
- property weights#