Skip to content

puncturedfem.LocalHarmonic

Harmonic function on a mesh cell.

The harmonic function is represented by its Dirichlet trace. A harmonic function has a harmonic conjugate on simply connected mesh cells. On multiply connected mesh cells, the harmonic conjugate does not generally exist, but the harmonic function can be decomposed into a "conjugable part" and a sum of logarithmic terms.

In order to compute the L^2 inner product of two harmonic functions, we compute a biharmonic function whose Laplacian is taken to be the given harmonic function. The biharmonic function is represented by its Dirichlet trace.

The weighted normal derivative of the harmonic function is also computed, and stored in self.trace.w_norm_deriv, and likewise for the biharmonic function.

Attributes:

Name Type Description
trace DirichletTrace

Dirichlet trace of the local harmonic function.

psi DirichletTrace

Dirichlet trace of the conjugable part of the local harmonic function.

conj_trace DirichletTrace

Dirichlet trace of the harmonic conjugate of the local harmonic function.

log_coef list[float]

Coefficients of the logarithmic terms in the harmonic conjugate.

biharmonic_trace Optional[DirichletTrace]

Dirichlet trace of the biharmonic part of the local harmonic function.

__add__(other)

Add two local harmonic functions.

Parameters:

Name Type Description Default
other LocalHarmonic

The other local harmonic function.

required

Returns:

Type Description
LocalHarmonic

The sum of the two local harmonic functions.

__init__(trace, nyst)

Initialize the local harmonic function.

Parameters:

Name Type Description Default
trace DirichletTrace

Dirichlet trace of the local harmonic function.

required
nyst Optional[NystromSolver]

Nystrom solver for the mesh cell.

required

__mul__(other)

Multiply the local harmonic function by a scalar.

Parameters:

Name Type Description Default
other Union[int, float]

The scalar.

required

Returns:

Type Description
LocalHarmonic

The product of the local harmonic function and the scalar.

__rmul__(other)

Multiply the local harmonic function by a scalar.

Parameters:

Name Type Description Default
other Union[int, float]

The scalar.

required

Returns:

Type Description
LocalHarmonic

The product of the local harmonic function and the scalar.

__sub__(other)

Subtract two local harmonic functions.

Parameters:

Name Type Description Default
other LocalHarmonic

The other local harmonic function.

required

Returns:

Type Description
LocalHarmonic

The difference of the two local harmonic functions.

__truediv__(other)

Divide the local harmonic function by a scalar.

Parameters:

Name Type Description Default
other Union[int, float]

The scalar.

required

Returns:

Type Description
LocalHarmonic

The division of the local harmonic function by the scalar.

set_trace(trace)

Set the Dirichlet trace of the local harmonic function.