ddg.optimize.he.functionals.dirichlet_energy module

class ddg.optimize.he.functionals.dirichlet_energy.DirichletEnergy(surface, attr_name, attr_dimension=None, boundary_cells={})[source]

Bases: HalfEdgeFunctional

Computes the combinatorial Dirchlet energy of a half-edge surface.

evaluate(x)[source]

Evaluation function of the functional

Parameters:
x: numpy.ndarray of shape (n, d)

Variables of the minimization process, where n is the number of interior cells, and d=attr_dimension. The n interior cells are ordered according to the attribute given by interior_cell_index_attr_name. The values of the attribute on the boundary cells need to be retrieved directly from the surface.

Returns:
float

Value of the functional

property interior_cells

Method to distinguish the interior cells of the surface from the specified boundary cells. Equal to the complement of boundary_cells attribute in the surface.