-
Notifications
You must be signed in to change notification settings - Fork 102
Moment based reffes - Implementation of scalar Bernstein basis in barycentric coordinates. #1104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Antoinemarteau
wants to merge
24
commits into
gridap:moment-based-reffes
Choose a base branch
from
Antoinemarteau:moment-based-reffes
base: moment-based-reffes
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Moment based reffes - Implementation of scalar Bernstein basis in barycentric coordinates. #1104
Antoinemarteau
wants to merge
24
commits into
gridap:moment-based-reffes
from
Antoinemarteau:moment-based-reffes
Conversation
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
and 1D Monomial basis optimization
de Casteljau indices and iteration needed to be computed and unrolled at compile time
To really optimise this, the tuple of orders should be added in the type parameters of the UniformPolyBases and CompWiseTensorPolyBases, in order to avoid creating the Val(Kd) at runtime and associated runtime dispatch into _evaluate_1d! (but this seems overkill for most usages)
renamed _ps_filter and _qs_filter to _ph_filter and _qh_filter respectively, "h" for Homogeneous.
A dof basis \Sigma is a set of dofs \sigma, and a dof is in V* = {\sigma: V -> R}, not in V** = { p: V* -> R}.
Removed the maximum order K from template parameters of PolynomialBasis to simplify the type signature, added the corresponding field to all concrete subtypes, passed the order by Val to [...]_nd! functions to avoid allocations and runtime dispatch in them (at each evaluation point) added _get_static_parameters(::PolynomialBasis) to let each basis choose their static parameter (Val(K), nothing, others...)
unfortunately _evaluate_nd! and friend do not specialize properly when unpacking a tuple of Val in evaluate! The parameters could also be put in cache, but then return_cache is not independant of the polynomial order anymore (currently it is thanks to _setsize! in evaluate!)
…o moment-based-reffes
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## moment-based-reffes #1104 +/- ##
=======================================================
+ Coverage 85.92% 86.04% +0.12%
=======================================================
Files 211 211
Lines 24347 24568 +221
=======================================================
+ Hits 20920 21140 +220
- Misses 3427 3428 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixed test coverage, fixed singular simplex detection, simplified bernstein_term_id, updated NEWS.md.
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.
The new
BernsteinBasisOnSimplex
implements the Bernstein polynomials in barycentric coordinates in any dimension and order, relative to the coordinates of the reference simplex or of a given simplex. The simplex is assumed polytopal (first geometric order). Gradient and Hessian are supported.I also renamed
UniformPolyBases
toCartProdPolyBasis
, and removed polynomial order from the polynomial basis structs parameters, following discussions with Jordi and Santiago.ATM, it is not possible to define a basis relative to a D-simplex in a domain of dimension > D, this could be done by adding another dimension type parameter, I don't know if this would be useful.