8.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
Note
With a non-zero contact truncation threshold \(\delta\) in the given parameters phys, the force near detachment is not \(-\nabla E\) from any smooth energy \(E\). This is deliberate, and it does no harm for the overdamped dynamics and fracture statistics, but it means the energy is not a Lyapunov function in the cutoff region, and anything energy- or Hessian-based (rigidity, inherent structures, detailed balance) needs care.
- Parameters:
connect (bool) – Whether to compute cell connectivity information. Setting this to
Falsesaves 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
coord_nums: (N,) integer array of coordination numbers 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: