From 71cfe86a53d45391ba816d8f9bb18c0bc6a19491 Mon Sep 17 00:00:00 2001 From: Christian Merdon Date: Tue, 10 Jun 2025 16:49:16 +0200 Subject: [PATCH] fixed docstrings of lazy_interpolate! --- src/lazy_interpolate.jl | 47 +++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/src/lazy_interpolate.jl b/src/lazy_interpolate.jl index 9b945d06..ba1702c9 100644 --- a/src/lazy_interpolate.jl +++ b/src/lazy_interpolate.jl @@ -1,29 +1,44 @@ """ ```` function lazy_interpolate!( - target::FEVectorBlock{T1,Tv,Ti}, - source::FEVectorBlock{T2,Tv,Ti}; - operator = Identity, - postprocess = nothing, - xtrafo = nothing, - items = [], - not_in_domain_value = 1e30, - eps = 1e-13, - use_cellparents::Bool = false) where {T1,T2,Tv,Ti} + target::FEVectorBlock{T1, Tv, Ti}, + source, + operators = [(1, Identity)]; + postprocess! = standard_kernel, + xtrafo! = nothing, + items = [], + resultdim = get_ncomponents(eltype(target.FES)), + not_in_domain_value = 1.0e30, + start_cell = 1, + only_localsearch = false, + use_cellparents::Bool = false, + eps = 1.0e-13, + kwargs...) where {T1, Tv, Ti} ```` -Interpolates (operator-evaluations of) the given finite element function into the finite element space assigned to the target FEVectorBlock. -(Currently not the most efficient way as it is based on the PointEvaluation pattern and cell search. If CellParents -are available in the grid components of the target grid, these parent cell information can be used to improve the -search. To activate this put 'use_cellparents' = true). By some given kernel function that is conforming to the interface +Interpolates (operator-evaluations of) the given FEVector source (or an array of FEVectorBlocks) +into the (finite element space assigned to) the `target` FEVectorBlock. +By the given `postprocess!` function that is conforming to the interface - kernel!(result, input, qpinfo) + postprocess!(result, input, qpinfo) -the operator evaluation (=input) can be further postprocessed. The qpinfo argument -allows to access information at the current quadrature point. +the operator evaluations (=input) can be further manipulated (default is unmodified input). The qpinfo argument +allows to access information at the current quadrature point. The `xtrafo!` function with the interface + + xtrafo!(x_source, x) + +maps coordinates x from the target grid to coordinates in the source grid in case the grids +(the default is the identity). If `x_source` cannot be found in the source_grid the value +`not_in_domain_value` is used as a function value. With the `items` arguments the +target cells for the interpolation can be restricted. Note: discontinuous quantities at vertices of the target grid will be evaluated in the first found cell of the source grid. No averaging is performed. With eps the tolerances of the cell search via ExtendableGrids.CellFinder can be steered. + +Note 2: This is not the most efficient way (therefore lazy) as it is based on the PointEvaluation pattern and cell search (with +tolerance `eps`). +If CellParents are available in the grid components of the target grid, parent cell information can be used to (slightly) improve the +search. To activate this put `use_cellparents` = true. """ function lazy_interpolate!( target::FEVectorBlock{T1, Tv, Ti},