preCICE v3.1.1
Loading...
Searching...
No Matches
Typedefs | Functions
precice::mapping::impl Namespace Reference

Typedefs

using Vertices = std::vector<mesh::Vertex>
 

Functions

double 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, VerticescreateClustering (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.
 

Typedef Documentation

◆ Vertices

Definition at line 18 of file CreateClustering.hpp.

Function Documentation

◆ createClustering()

std::tuple< double, Vertices > precice::mapping::impl::createClustering ( mesh::PtrMesh inMesh,
mesh::PtrMesh outMesh,
double relativeOverlap,
unsigned int verticesPerCluster,
bool projectClustersToInput )
inline

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.

Parameters
[in]inMeshThe input mesh (input mesh for consistent, output mesh for conservative mappings), on which the clustering is computed. The input parameters verticesPerCluster and projectClustersToInput refer to the inMesh
[in]outMeshThe output mesh (output mesh for consistent, input mesh for conservative mappings),
[in]relativeOverlapValue between zero and one, which steers the relative distance between cluster centers. A value of zero leads to no overlap, a value of one would lead to a complete overlap between clusters.
[in]verticesPerClusterTarget number of vertices per partition.
[in]projectClustersToInputif enabled, moves the cluster centers to the closest vertex of the inMesh
Returns
a tuple for the cluster radius and a vector of vertices marking the cluster centers

Definition at line 304 of file CreateClustering.hpp.

Here is the call graph for this function:

◆ estimateClusterRadius()

double precice::mapping::impl::estimateClusterRadius ( unsigned int verticesPerCluster,
mesh::PtrMesh inMesh,
const mesh::BoundingBox & bb )
inline

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).

Parameters
[in]verticesPerClustertarget number of vertices in each cluster.
[in]inMeshmesh we want to create the clustering on
[in]bbbounding box of the domain. Used to place the random samples in the domain.
Returns
The estimate for the cluster radius.

Definition at line 225 of file CreateClustering.hpp.

Here is the call graph for this function: