Go to the source code of this file.
|
double | precice::mapping::impl::estimateClusterRadius (unsigned int verticesPerCluster, mesh::PtrMesh inMesh, const mesh::BoundingBox &bb) |
| Computes an estimate for the cluster radius, which results in approximately verticesPerCluster vertices inside of each cluster. The algorithm generates random samples in the domain and queries the verticesPerCluster nearest-neighbors from the mesh index tree. The cluster radius is then estimated through the distance between the center vertex (random sample) and the vertex the furthest away from the center (being on the edge of the cluster).
|
|
std::tuple< double, Vertices > | precice::mapping::impl::createClustering (mesh::PtrMesh inMesh, mesh::PtrMesh outMesh, double relativeOverlap, unsigned int verticesPerCluster, bool projectClustersToInput) |
| Creates a clustering as a collection of Vertices (representing the cluster centers) and a cluster radius, as required for the partition of unity mapping. The algorithm estimates a cluster radius based on the input parameter verticesPerCluster (see also estimateClusterRadius above, which is directly used by the function). Afterwards, the algorithm creates a cartesian-like grid of center vertices, where the distance of the centers is defined through the relativeOverlap and the cluster radius. The parameter projectClustersToInput moves the cartesian center vertices to the closest vertex from the input mesh, which is useful in case of very irregular meshes or shell-shaped meshes. The algorithm also removes potentially empty cluster, i.e., clusters which would have either no vertex from the inMesh or from the outMesh . See also tagEmptyClusters.
|
|