7.3.2. pyafv.FiniteVoronoiSimulator.build

FiniteVoronoiSimulator.build(connect=True)[source]

Build the finite Voronoi structure and compute forces, returning a dictionary of diagnostics.

Do the following:
  • Build Voronoi (+ extensions)

  • Get cell connectivity

  • Compute per-cell quantities and derivatives

  • Assemble forces

Parameters:

connect (bool) – Whether to compute cell connectivity information. Setting this to False saves some computation time (though very marginal) when connectivity is not needed.

Returns:

A dictionary containing forces and geometric properties with keys:

  • forces: (N,2) array of forces on cell centers

  • areas: (N,) array of cell areas

  • perimeters: (N,) array of cell perimeters

  • arclens: (N,) array of non-contacting edge (arc) lengths per cell

  • vertices: (M,2) array of all Voronoi + extension vertices

  • edges_type: List-of-lists of edge types per cell (1=straight, 0=circular arc)

  • regions: List-of-lists of vertex indices per cell

  • connections: (K,2) array of connected cell index pairs

Return type:

dict[str, object]