Class used to calculate the volumes of intersection between the elements of two 3D meshes. More...
Public Member Functions | |
Interpolation3D () | |
Interpolation3D (const InterpolationOptions &io) | |
template<class MyMeshType , class MatrixType > | |
int | interpolateMeshes (const MyMeshType &srcMesh, const MyMeshType &targetMesh, MatrixType &result, const char *method) |
Class used to calculate the volumes of intersection between the elements of two 3D meshes.
INTERP_KERNEL::Interpolation3D::Interpolation3D | ( | ) |
Default constructor
Referenced by Interpolation3D().
INTERP_KERNEL::Interpolation3D::Interpolation3D | ( | const InterpolationOptions & | io | ) |
References interpolateMeshes(), and Interpolation3D().
int INTERP_KERNEL::Interpolation3D::interpolateMeshes | ( | const MyMeshType & | srcMesh, | |
const MyMeshType & | targetMesh, | |||
MatrixType & | result, | |||
const char * | method | |||
) |
Calculates the matrix of volumes of intersection between the elements of srcMesh and the elements of targetMesh. The calculation is done in two steps. First a filtering process reduces the number of pairs of elements for which the calculation must be carried out by eliminating pairs that do not intersect based on their bounding boxes. Then, the volume of intersection is calculated by an object of type Intersector3D for the remaining pairs, and entered into the intersection matrix.
The matrix is partially sparse : it is a vector of maps of integer - double pairs. It can also be an INTERP_KERNEL::Matrix object. The length of the vector is equal to the number of target elements - for each target element there is a map, regardless of whether the element intersects any source elements or not. But in the maps there are only entries for those source elements which have a non-zero intersection volume with the target element. The vector has indices running from 0 to (nb target elements - 1), meaning that the map for target element i is stored at index i - 1. In the maps, however, the indexing is more natural : the intersection volume of the target element i with source element j is found at matrix[i-1][j].
srcMesh | 3-dimensional source mesh | |
targetMesh | 3-dimesional target mesh, containing only tetraedra | |
result | matrix in which the result is stored |
Referenced by ParaMEDMEM::InterpolationMatrix::addContribution(), and Interpolation3D().