The level set method tracking an interface defined by the zero contour of the
level set function phi which defines the signed distance of a point x from the
interface. The contour phi(x)=0 defines the interface.
It is assumed that phi(x)<0 defines the volume of interest,
phi(x)>0 the outside world.
|
|
__advect(self,
dt)
Advects the level set function in the presence of a velocity field. |
|
|
|
|
__init__(self,
phi,
reinit_max=10,
reinitialize_after=20,
smooth=2.0,
useReducedOrder=False)
Sets up the level set method. |
|
|
|
|
__makeInterface(self,
phi,
smoothing_width)
Creates a smooth interface from -1 to 1 over the length
2*h*smoothing_width where -1 is used where the level set is negative
and 1 where the level set is 1. |
|
|
|
|
|
|
|
getAdvectionSolverOptions(self)
Returns the solver options for the interface advective. |
|
|
|
|
getDomain(self)
Returns the domain. |
|
|
|
|
getH(self)
Returns the mesh size. |
|
|
|
|
getLevelSetFunction(self)
Returns the level set function. |
|
|
|
|
getReinitializationSolverOptions(self)
Returns the options of the solver for the reinitialization |
|
|
|
|
getTimeStepSize(self,
velocity)
Returns a new dt for a given velocity using the Courant condition. |
|
|
|
|
getVolume(self)
Returns the volume of the phi(x)<0 region. |
|
|
|
|
makeCharacteristicFunction(self,
contour=0,
phi=None,
positiveSide=True,
smoothing_width=None)
Makes a smooth characteristic function of the region phi(x)>contour if
positiveSide and phi(x)<contour otherwise. |
|
|
|
|
update(self,
dt)
Sets a new velocity and updates the level set function. |
|
|
|
|
update_parameter(self,
param_neg=-1,
param_pos=1,
phi=None,
smoothing_width=None)
Creates a smoothed function with param_neg where phi<0 and
param_pos where phi>0 which is smoothed over a length
smoothing_width across the interface. |
|
|
|
|
update_parameter_sharp(self,
param_neg=-1,
param_pos=1,
phi=None)
Creates a function with param_neg where phi<0 and param_pos
where phi>0 (no smoothing). |
|
|
|
|
update_phi(self,
velocity,
dt)
Updates phi under the presence of a velocity field. |
|
|