fdrmrc / Polydeal

C++ implementation of Polygonal Discontinuous Galerkin method within the deal.II Finite Element library.
https://fdrmrc.github.io/Polydeal/
Other
0 stars 0 forks source link

New metrics: ´overlap factor´ and ´box ratio´ #100

Closed fdrmrc closed 8 months ago

fdrmrc commented 8 months ago

This PR adds a new metric, which I named "coverage factor" (name can be discussed). It is computed as $\text{CV}(\mathcal{T}) = \frac{\sum_i\text{Vol}(B_i)}{\text{Vol}(\mathcal{T})}$, where $B_i$ us the i-th bounding box, associated to polytope $K_i$.

For a perfect square, here is one result of the examples/metrics.cc benchmark program.

Compute quality metrics for a set of polygonal meshes:
TEST: ***********SQUARE GRID***********
Rtree: 
Number of background cells: 1024
R-tree agglomerates built in 0.000215974 seconds [Wall Clock]
N agglomerates = 16
Uniformity factor:
Min: 1
Max: 1
Average: 1

Circle ratio:
Min: 0.707107
Max: 0.707107
Average: 0.707107

**Coverage factor: 1**
----------------------------------------
Metis: 
Number of background cells: 1024
METIS agglomerates built in 0.0110522 seconds [Wall Clock]
N agglomerates: 16
Uniformity factor:
Min: 0.770884
Max: 1
Average: 0.844103

Circle ratio:
Min: 0.32366
Max: 0.58409
Average: 0.505435

**Coverage factor: 1.32227**
fdrmrc commented 8 months ago

I've added another metric, more local: $$\text{BR}(K)=\frac{|B_K|}{|K|}$$ i.e. the ratio between the measure of the box and the element. That indicates how much the agglomerate is close to the box.