OpenPisco.Structured.StructuredLevelsetBase module#
- class OpenPisco.Structured.StructuredLevelsetBase.StructuredLevelsetBase(other=None, support=None)[source]#
Bases:
LevelSetBase
- GetElementsVolumicFractions(phi=None)[source]#
Get the element-wise volumic fractions located inside the domain implicitly defined by a levelset function.
By convention, the inside corresponds to the nonpositive values of the levelset function.
- Parameters
levelset (np.ndarray) – A node-based levelset function interpreted as the signed distance close to the interface.
- Returns
Element-based field.
- Return type
np.ndarray
- GetVolumeOfNegativePartbyElement(phi=None)[source]#
Get the element-wise volumic located inside the domain implicitly defined by a levelset function.
By convention, the inside corresponds to the nonpositive values of the levelset function.
- Parameters
levelset (np.ndarray) – A node-based levelset function interpreted as the signed distance close to the interface.
- InterfaceIntegral(field)[source]#
The value of the surface integral applied to the trace of a scalar-valued field defined on the whole design domain.
- Reinitialize(length=None)[source]#
Reinitialize the levelset function as a signed distance.
The levelset function guaranteed to be a signed distance function at least at a distance of length from the interface.
- Parameters
length (real, optional) – Sufficient length of redistanciation, expressed as an absolute distance from the interface (the default is 4 * self.GetDxMin())
Notes
Solve the evolution equation: d(phi)/dt + sign(phi0)(|grad(phi)|-1) = 0 on a pseudo-time interval corresponding to the specified length, using the property that the velocity is uniformly equal to one.