Skip to content
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

De Rham sequences w/ knot multiplicity > 1 #339

Merged
merged 45 commits into from
Oct 25, 2023
Merged

Conversation

vcarlier
Copy link
Contributor

@vcarlier vcarlier commented Sep 29, 2023

Enable the use of the de Rham sequence with arbitrary knots multiplicity. With this we mean that the interior knots (all knots in the periodic case) can have a constant multiplicity higher than 1.

List of modifications

  • Changes in core/bsplines.py and core/bsplines_kernels.py :

    • Modify the make_knots function to create an appropriate knot sequence in all cases. In the non periodic case the interior knots are repeated multiplicity times and the boundary knots p+1 times. In the periodic case, interior knots are repeated multiplicity times and we add p+1 knots at each side by periodicity. In all cases the number of knots is (n_cells-1) * multiplicity + 2 * (p+1).
    • Modify functions collocation_matrix and histopolation_matrix to take in account that now in the periodic case the number of basis function is len(knots) - 2 * (p+1) + multiplicity.
    • Modify greville function for the maximum multiplicity case to avoid having the discontinuity points of the spline.
  • Changes in modules psydac.feec.derivatives and psydac.feec.global_projectors to take in account that the ghost regions have size shifts * pads (previously was pads)

  • Changes in psydac.fem.splines: repercussion of the changes in psydac.core.bsplines, adding multiplicity as argument to several functions. Correct the computation of the multiplicity from the knot sequence.

  • Add tests in feec/tests/test_differentiation_matrices.py and feec/tests/test_global_projectors.py with higher multiplicity.

  • Add test in api/tests/tests_api_feec_1d.py, api/tests/tests_api_feec_2d.py, api/tests/tests_api_feec_3d.py with higher multiplicity.

@vcarlier vcarlier linked an issue Sep 29, 2023 that may be closed by this pull request
psydac/api/grid.py Outdated Show resolved Hide resolved
@yguclu yguclu changed the title Fix multiplicity de rham Fix multiplicity de Rham Oct 19, 2023
Copy link
Member

@yguclu yguclu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I have only minor comments

psydac/core/tests/test_bsplines_pyccel.py Outdated Show resolved Hide resolved
psydac/core/tests/test_bsplines_pyccel.py Outdated Show resolved Hide resolved
psydac/feec/global_projectors.py Outdated Show resolved Hide resolved
psydac/feec/tests/test_differentiation_matrices.py Outdated Show resolved Hide resolved
psydac/feec/tests/test_differentiation_matrices.py Outdated Show resolved Hide resolved
psydac/feec/tests/test_global_projectors.py Outdated Show resolved Hide resolved
psydac/feec/tests/test_global_projectors.py Show resolved Hide resolved
psydac/feec/tests/test_global_projectors.py Outdated Show resolved Hide resolved
psydac/feec/tests/test_global_projectors.py Outdated Show resolved Hide resolved
psydac/fem/splines.py Outdated Show resolved Hide resolved
@yguclu
Copy link
Member

yguclu commented Oct 24, 2023

@campospinto Do you have any further comments or questions on this PR?

@yguclu yguclu changed the title Fix multiplicity de Rham Create de Rham sequences with knot multiplicity > 1 Oct 24, 2023
@yguclu yguclu changed the title Create de Rham sequences with knot multiplicity > 1 De Rham sequences w/ knot multiplicity > 1 Oct 24, 2023
@campospinto
Copy link
Collaborator

campospinto commented Oct 25, 2023

@campospinto Do you have any further comments or questions on this PR?

Just one minor suggestion ! Otherwise it looks good, thanks !

@yguclu yguclu merged commit 4c53ac3 into devel Oct 25, 2023
6 checks passed
@yguclu yguclu deleted the fix_multiplicity_DeRham branch October 25, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make FEEC operators work with knot multiplicity > 1
3 participants