volumential.function_extension#
Function extension with regularity constraints.
This module owns the extension operators that continue a function given on a
2D curved domain to the surrounding box, together with the Goursat-type
sumpy kernels the biharmonic extension is written in.
\(L^2\): extend with constant value
\(C^0\): harmonic extension
\(C^1\): biharmonic extension
- volumential.function_extension.setup_cl_ctx(ctx=None, queue=None)[source]#
Return an OpenCL context, taken from ctx, queue, or created.
- volumential.function_extension.setup_command_queue(ctx=None, queue=None)[source]#
Return a command queue, reusing queue when one is given.
- volumential.function_extension.setup_array_context(actx=None, ctx=None, queue=None)[source]#
Return an array context, reusing actx when one is given.
- volumential.function_extension.get_normal_vectors(queue, density_discr, loc_sign=-1)[source]#
Return the boundary normals pointing away from the extension domain.
- Parameters:
loc_sign –
-1for the interior side (the discretization’s own normal),+1for the exterior side (its negation).
- volumential.function_extension.get_tangent_vectors(queue, density_discr, loc_sign)[source]#
Return the boundary tangents, oriented with the domain on the left.
- volumential.function_extension.get_path_length(queue, density_discr)[source]#
Return the arclength of the boundary curve.
- volumential.function_extension.get_arclength_parametrization_derivative(queue, density_discr, where=None)[source]#
Return x’(s), y’(s). s Follows the same direction as the parametrization. (Remark: t is the reference-to-global parametrization of the discretization).
- volumential.function_extension.compute_constant_extension(queue, target_discr, qbx, density_discr, constant_val=0, actx=None)[source]#
Constant extension.
- volumential.function_extension.compute_harmonic_extension(queue, target_discr, qbx, density_discr, f, loc_sign=1, target_association_tolerance=0.05, gmres_tolerance=1e-14, actx=None, representation_mode='auto')[source]#
Harmonic extension.
- Parameters:
loc_sign – Indicates the domain for extension, which equals the negation of the loc_sign for the original problem.
representation_mode – One of “auto”, “s_plus_d”, “d_only”. “auto” uses D-only for interior extension (loc_sign=-1) and S+D otherwise.
- class volumential.function_extension.ComplexLogKernel(dim=None)[source]#
Bases:
ExpressionKernelThe Goursat kernel \(\log |z| / (4 \pi)\).
- init_arg_names = ('dim',)#
- is_complex_valued = True#
- has_efficient_scale_adjustment = True#
- mapper_method = 'map_expression_kernel'#
The name of the mapper method called for the kernel.
- class volumential.function_extension.ComplexLinearLogKernel(dim=None)[source]#
Bases:
ExpressionKernelThe Goursat kernel \(-\bar{z} \log |z| / (4 \pi)\).
- init_arg_names = ('dim',)#
- is_complex_valued = True#
- has_efficient_scale_adjustment = False#
- mapper_method = 'map_expression_kernel'#
The name of the mapper method called for the kernel.
- class volumential.function_extension.ComplexLinearKernel(dim=None)[source]#
Bases:
ExpressionKernelThe Goursat kernel \(-z / (8 \pi)\).
- init_arg_names = ('dim',)#
- is_complex_valued = True#
- has_efficient_scale_adjustment = True#
- mapper_method = 'map_expression_kernel'#
The name of the mapper method called for the kernel.
- class volumential.function_extension.ComplexFractionalKernel(dim=None)[source]#
Bases:
ExpressionKernelThe Goursat kernel \(-i \bar{z} / (4 \pi z)\).
- init_arg_names = ('dim',)#
- is_complex_valued = True#
- has_efficient_scale_adjustment = False#
- mapper_method = 'map_expression_kernel'#
The name of the mapper method called for the kernel.
- volumential.function_extension.get_extension_bie_symbolic_operator(loc_sign=1)[source]#
Return the symbolic Stokes BIE operator used by the extension.
- Parameters:
loc_sign –
-1for interior Dirichlet,+1for exterior Dirichlet.
- volumential.function_extension.compute_biharmonic_extension(queue, target_discr, qbx, density_discr, f, fx, fy, target_association_tolerance=0.05, enforce_affine_match=False, actx=None, loc_sign=1)[source]#
Biharmoc extension. Currently only support 2D domains.
- Parameters:
loc_sign – Side for extension evaluation, following the same convention used by pytential layer potentials.
+1evaluates the exterior side and-1evaluates the interior side.enforce_affine_match – If True, perform a boundary least-squares affine correction.