Module pytop.filters
Filters.
Functions
def helmholtz_filter(u: fenics_adjoint.types.function.Function, R=0.025, solver_parameters: Optional[] = None) ‑> fenics_adjoint.types.function.Function -
Apply the helmholtz filter to the fenics function. This filter directly solves the Helmholtz equation using linear solvers.
Args
u:dolfin_adjoint.Function- Target function.
R:float, optional- Filter radius. Defaults to 0.025.
solver_parameters:Optional[any], optional- Solver parameters. Defaults to None.
Returns
(dolfin_adjoint.Function): Filtered function
def smooth_heviside_filter(u: fenics_adjoint.types.function.Function, beta: float = 10.0, eta: float = 0.5) ‑> fenics_adjoint.types.function.Function-
Apply the smoothed Heaviside filter to the fenics function.
Args
u:dolfin_adjoint.Function- Target function.
beta:float, optional- Smoothing parameter. Defaults to 10.0.
eta:float, optional- Threshold value. Defaults to 0.5.
Returns
(dolfin_adjoint.Function): Filtered function