Conversation
…iciently evaluated many times on subsets
Member
Author
|
Probably it is nicer if the interpolations are accessible via FESpace.interpolators[AT_NODES] instead of FESSpace[AT_NODES]? |
…now also used for interior Hdiv dofs, new FluxEvaluator evaluates normal/tangential fluxes for Hdiv/Hcurl boundary dofs)
…y NodalInterpolator and ensure_moments! by MomentInterpolator and many custom interpolatioon in non-H1 finite elements by a common new FunctionalInterpolator structure; now every finite element interpolation is a composition of these three interpolating structures
…ctionals in the FunctionInterpolator) that ensure that downstream tests work again
pjaap
reviewed
May 15, 2025
| basis functions of the moments of type FEType_ref and with moments_operator. In the bestapprox mode | ||
| the mass matrix instead is formed from the scalar product of the interior basis functions. | ||
| """ | ||
| function MomentInterpolator(FE::FESpace{Tv, Ti, FEType, APT}, AT::Type{<:AssemblyType}, xgrid = FE.dofgrid; operator = Identity, FEType_ref = :auto, FEType_moments = :auto, moments_operator = operator, moments_dofs = Int[], bestapprox = false, order = 0, coffset::Int = -1, componentwise = true, kwargs...) where {Tv, Ti, FEType <: AbstractFiniteElement, APT} |
Member
There was a problem hiding this comment.
Please reformat to a vertical argument list
| end | ||
|
|
||
| ## check if mass matrix can be computed once or needs to be recomputed on every mesh | ||
| if FEType_ref <: AbstractH1FiniteElement && !(FEType_ref <: AbstractH1FiniteElementWithCoefficients) && FEType_moments <: AbstractH1FiniteElement && moments_operator == Identity |
Member
There was a problem hiding this comment.
something like
Suggested change
| if FEType_ref <: AbstractH1FiniteElement && !(FEType_ref <: AbstractH1FiniteElementWithCoefficients) && FEType_moments <: AbstractH1FiniteElement && moments_operator == Identity | |
| if FEType_ref <: AbstractH1FiniteElement && | |
| !(FEType_ref <: AbstractH1FiniteElementWithCoefficients) && | |
| FEType_moments <: AbstractH1FiniteElement && | |
| moments_operator == Identity |
| AT::Type{<:AssemblyType} = ON_FACES, | ||
| xgrid = FE.dofgrid; | ||
| bonus_quadorder = 0, | ||
| operator = NormalFlux, nfluxes = 0, dofs = [], mean = false, kwargs...) where {Tv, Ti, FEType <: AbstractFiniteElement, APT} |
| H1Pk{2, 2, 5}, | ||
| ] | ||
| ExpectedOrders2D = [0, 1, 0, 0, 1, 1, 1, 2, 2, 3, 4, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5] | ||
| ExpectedOrders2D = [0, 1, 0, 0, 1, 1, 1, 2, 2, 3, 4, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5] |
Member
There was a problem hiding this comment.
This should be replaced by an array of pairs [ FEspace => expected_order ] ... 😄
| println("error2 without kernel = $error2 (result = $result)") | ||
|
|
||
| return max(error1, error2) ≈ 0 | ||
| return max(error1, error2) < 1e-15 |
Member
There was a problem hiding this comment.
true, approx 0 is just = 0.
Note that x ≈ 0 (i.e., comparing to zero with the default tolerances) is equivalent to x == 0
Member
|
Please
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
goal: efficient evaluation of many calls of interpolation on subsets (like in periodic coupling matrix generation)
outcome: completely replaced old point_evaluation!, point_evaluation_broken! by NodalInterpolator and ensure_moments! by MomentInterpolator and many custom interpolatioon in non-H1 finite elements by a common new FunctionalInterpolator structure; now every finite element interpolation is a composition of these three
interpolating structures that should perform much better in the goal scenario, since they keep all necessary data to run an evaluation