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

Non Matching Multipatch #320

Merged
merged 81 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
d830ae1
add non matching conforming projection operators
FrederikSchnack Jul 14, 2023
a27a062
add some plotting utilities
FrederikSchnack Jul 14, 2023
bbad569
make multipatch examples run
FrederikSchnack Jul 14, 2023
ec10dfd
Use SymPDE development version from GitHub
yguclu Jul 17, 2023
a166d02
allow for non-matching grids in postprocessing
FrederikSchnack Jul 17, 2023
87bbef6
add utils
FrederikSchnack Jul 17, 2023
1a41cd0
adds non-matching domain utilities
FrederikSchnack Jul 18, 2023
e84552a
adds curl-curl test case comparisson
FrederikSchnack Jul 18, 2023
548881a
small changes
FrederikSchnack Jul 24, 2023
b0e64c9
Merge remote-tracking branch 'origin/devel' into non_matching_multipatch
FrederikSchnack Jul 24, 2023
4dbc422
Merge branch 'devel' into non_matching_multipatch
yguclu Jul 25, 2023
b3d1451
add time-domain Maxwell
FrederikSchnack Jul 27, 2023
a806b6d
add time harmonic and time domain maxwell examples
FrederikSchnack Jul 28, 2023
26578f6
add new tests and last example
FrederikSchnack Aug 2, 2023
f68c562
Merge branch 'devel' into non_matching_multipatch
FrederikSchnack Sep 20, 2023
7fbaecf
make Codacy happy
FrederikSchnack Sep 20, 2023
b52041f
add pml example
FrederikSchnack Nov 27, 2023
7f5be32
update non_matching operators and add proposal of tests
FrederikSchnack Nov 27, 2023
1692570
adapt files to new projection
FrederikSchnack Nov 27, 2023
544a237
make codacy happy
FrederikSchnack Nov 28, 2023
7b357bb
add some pml experiments
FrederikSchnack Dec 12, 2023
ebaa9f3
Merge branch 'devel' into non_matching_multipatch
FrederikSchnack Mar 1, 2024
a147990
add docs and readability
FrederikSchnack Mar 5, 2024
c7325da
Merge branch 'devel' into non_matching_multipatch
FrederikSchnack Mar 5, 2024
567ce21
move pml experiments to its own branch
FrederikSchnack Mar 5, 2024
2af29a8
adapt tests
FrederikSchnack Mar 5, 2024
d4fbdbf
change Hodge matrix naming conventions
FrederikSchnack Mar 7, 2024
11a9859
Merge branch 'devel' into non_matching_multipatch
FrederikSchnack Mar 7, 2024
ae90d77
Merge branch 'devel' into non_matching_multipatch
yguclu Mar 19, 2024
05bd083
Merge branch 'devel' into non_matching_multipatch
FrederikSchnack Apr 23, 2024
ff8c1c0
adds revised Hcurl conforming projections and adapts the tests, prior…
FrederikSchnack May 22, 2024
53c1b3c
adapt conforming examples to new projections
FrederikSchnack May 22, 2024
dcc86b1
update non-matching examples
FrederikSchnack May 23, 2024
a853a47
work in comments
FrederikSchnack May 23, 2024
5371468
update tests
FrederikSchnack May 23, 2024
9357bdd
Merge branch 'devel' into non_matching_multipatch
FrederikSchnack May 23, 2024
ba230ba
stop using create_domain() -- wip
campospinto May 31, 2024
685f4a5
use Domain.join() to build non-matching domains
campospinto Jun 2, 2024
a3a5341
using temp function for sympde Domain.join
campospinto Jun 4, 2024
220f1cf
adding ref
campospinto Jun 4, 2024
52fec60
Merge example scripts and get rid of get_source_and_solution_OBSOLETE
FrederikSchnack Jun 10, 2024
4d5f780
clean up multipatch domain utilities
FrederikSchnack Jun 11, 2024
fffe43f
Coarsen test runs and add timedomain dummy run
FrederikSchnack Jun 11, 2024
d417da4
Make codacy happy
FrederikSchnack Jun 12, 2024
a748a4d
fix typo
FrederikSchnack Jun 12, 2024
2bceaf6
Expose multipatch modules to docs
FrederikSchnack Jun 17, 2024
383d341
minor documentation related fixes
jowezarek Jun 17, 2024
a9da50e
sphinx fix
campospinto Jun 18, 2024
7f9b522
functions stencil index to petsc index and viceversa
e-moral-sanchez May 8, 2024
b8bdab9
efficient conversion to PETSc of StencilVectors
e-moral-sanchez May 8, 2024
eba63ff
works for 1D stencil matrix with multiple processes
e-moral-sanchez May 13, 2024
20b7fe7
correct indexing for 2D stencilmatrix
e-moral-sanchez May 15, 2024
f11599d
works 1d,2d,3d stencilmatrix without periodic BC
e-moral-sanchez May 15, 2024
7a2c555
efficient conversion of stencilmatrix to PETSc.Mat for 1,2,3D and pe…
e-moral-sanchez May 16, 2024
4ad477c
Fixed conversion from 2D BlockStencilVector to Petsc.Vec
e-moral-sanchez May 17, 2024
f62385e
fix general case also for stencilvector 2D
e-moral-sanchez May 17, 2024
1256836
fixed petsc_to_psydac for BlockVectors
e-moral-sanchez May 21, 2024
b228eac
PETSc conversion works for StencilVector and BlockStencilVector of 1 …
e-moral-sanchez May 21, 2024
437c38f
conversion works for StencilMatrix
e-moral-sanchez May 21, 2024
80f3e6c
works for BlockLinearOperators, the blocks of which are Stencilmatrices
e-moral-sanchez May 21, 2024
abe2614
Clean up, docstrings
e-moral-sanchez May 21, 2024
21f06dc
fix bugs
e-moral-sanchez May 22, 2024
889619d
sequential case, docstrings
e-moral-sanchez May 22, 2024
ed5abc0
cleaning
e-moral-sanchez May 22, 2024
cddbd38
erase forgotten comments
e-moral-sanchez May 22, 2024
bd2fcd1
fix loop stencil
e-moral-sanchez May 23, 2024
ab228b9
forgotten prints
e-moral-sanchez May 27, 2024
820bd7b
add pyccel kernel
e-moral-sanchez May 29, 2024
3a7c2a7
string for type annotations
e-moral-sanchez May 29, 2024
1778055
clean up plus fix serial case
e-moral-sanchez May 29, 2024
bdc0645
clean time measurements
e-moral-sanchez Jun 3, 2024
a560b90
fix version 12 of macos in tests
e-moral-sanchez Jun 12, 2024
f65b21e
Fixes for CI failures caused by new macOS runner version and numpy 2.0
kvrigor Jun 19, 2024
9172dfc
CI: Temporarily disabled docs deployment since base repo is a fork
kvrigor Jun 19, 2024
45cf90c
Update macos version
e-moral-sanchez Jun 21, 2024
ce4f189
Disable deploy_docs in documentation.yml
FrederikSchnack Jun 21, 2024
6ff11ee
Revert "Disable deploy_docs in documentation.yml"
yguclu Aug 1, 2024
613b077
Revert "CI: Temporarily disabled docs deployment since base repo is a…
yguclu Aug 1, 2024
bc75682
Style cleanup of stencil2IJV_kernels.py
yguclu Jul 31, 2024
8d429c1
Apply some PEP8 recommendations to topetsc.py
yguclu Aug 1, 2024
eaa9854
Merge branch 'devel' into non_matching_multipatch
yguclu Aug 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*.lock
__psydac__/
__*pyccel__/
docs/source/modules/STUBDIR/*

build
*build*
Expand Down
4 changes: 4 additions & 0 deletions docs/source/modules/feec.multipatch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@ feec.multipatch

multipatch.api
multipatch.fem_linear_operators
multipatch.multipatch_domain_utilities
multipatch.non_matching_operators
multipatch.operators
multipatch.plotting_utilities
multipatch.utilities
multipatch.utils_conga_2d
4 changes: 2 additions & 2 deletions psydac/api/discretization.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def get_max_degree_of_one_space(Vh):
Vh : FemSpace
The finite element space under investigation.

Results
Returns
-------
list[int]
The maximum polynomial degre of Vh with respect to each coordinate.
Expand Down Expand Up @@ -133,7 +133,7 @@ def get_max_degree(*spaces):
*spaces : tuple[FemSpace]
The finite element spaces under investigation.

Results
Returns
-------
list[int]
The maximum polynomial degree across all spaces, with respect to each
Expand Down
4 changes: 3 additions & 1 deletion psydac/api/fem.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,9 @@ def allocate_matrices(self, backend=None):
elif use_prolongation:
Ps = [knot_insertion_projection_operator(trs, trs.get_refined_space(ncells)) for trs in trial_fem_space.spaces]
P = BlockLinearOperator(trial_fem_space.vector_space, trial_fem_space.get_refined_space(ncells).vector_space)
for ni,Pi in enumerate(Ps):P[ni,ni] = Pi
for ni,Pi in enumerate(Ps):
P[ni,ni] = Pi

mat = ComposedLinearOperator(trial_space, test_space, mat, P)

self._matrix[i,j] = mat
Expand Down
7 changes: 2 additions & 5 deletions psydac/api/postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,12 +953,9 @@ def _reconstruct_spaces(self):
for subdomain_names, space_dict in subdomains_to_spaces.items():
if space_dict == {}:
continue
ncells_dict = {interior_name: interior_names_to_ncells[interior_name] for interior_name in subdomain_names}
# No need for a a dict until PR about non-conforming meshes is merged
# Check for conformity
ncells = list(ncells_dict.values())[0]
assert all(ncells_patch == ncells for ncells_patch in ncells_dict.values())

ncells = {interior_name: interior_names_to_ncells[interior_name] for interior_name in subdomain_names}

subdomain = domain.get_subdomain(subdomain_names)
space_name_0 = list(space_dict.keys())[0]
periodic = space_dict[space_name_0][2].get('periodic', None)
Expand Down
2 changes: 1 addition & 1 deletion psydac/api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@
'pyccel-intel' : PSYDAC_BACKEND_IPYCCEL,
'pyccel-pgi' : PSYDAC_BACKEND_PGPYCCEL,
'pyccel-nvidia': PSYDAC_BACKEND_NVPYCCEL,
}
}
45 changes: 30 additions & 15 deletions psydac/api/tests/build_domain.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# coding: utf-8

# todo: this file has a lot of redundant code with psydac/feec/multipatch/multipatch_domain_utilities.py
# it should probably be removed in the future

import numpy as np

from sympde.topology import Square, Domain
from sympde.topology import IdentityMapping, PolarMapping, AffineMapping, Mapping

# remove after sympde PR #155 is merged and call Domain.join instead
from psydac.feec.multipatch.multipatch_domain_utilities import sympde_Domain_join

#==============================================================================
# small extension to SymPDE:
class TransposedPolarMapping(Mapping):
Expand All @@ -20,6 +26,7 @@ class TransposedPolarMapping(Mapping):
_ldim = 2
_pdim = 2

# todo: remove this
def create_domain(patches, interfaces, name):
connectivity = []
patches_interiors = [D.interior for D in patches]
Expand Down Expand Up @@ -54,6 +61,8 @@ def flip_axis(name='no_name', c1=0., c2=0.):
)

#==============================================================================

# todo: use build_multipatch_domain instead
def build_pretzel(domain_name='pretzel', r_min=None, r_max=None):
"""
design pretzel-like domain
Expand Down Expand Up @@ -189,23 +198,29 @@ def build_pretzel(domain_name='pretzel', r_min=None, r_max=None):
domain_14,
])

interfaces = [
[domain_1.get_boundary(axis=1, ext=+1), domain_5.get_boundary(axis=1, ext=-1), 1],
[domain_5.get_boundary(axis=1, ext=+1), domain_6.get_boundary(axis=1, ext=1), 1],
[domain_6.get_boundary(axis=1, ext=-1), domain_2.get_boundary(axis=1, ext=-1), 1],
[domain_2.get_boundary(axis=1, ext=+1), domain_7.get_boundary(axis=1, ext=-1), 1],
[domain_7.get_boundary(axis=1, ext=+1), domain_3.get_boundary(axis=1, ext=-1), 1],
[domain_3.get_boundary(axis=1, ext=+1), domain_9.get_boundary(axis=1, ext=-1), 1],
[domain_9.get_boundary(axis=1, ext=+1), domain_4.get_boundary(axis=1, ext=-1), 1],
[domain_4.get_boundary(axis=1, ext=+1), domain_12.get_boundary(axis=1, ext=1), 1],
[domain_12.get_boundary(axis=1, ext=-1), domain_1.get_boundary(axis=1, ext=-1), 1],
[domain_6.get_boundary(axis=0, ext=-1), domain_13.get_boundary(axis=0, ext=1), 1],
[domain_7.get_boundary(axis=0, ext=-1), domain_13.get_boundary(axis=0, ext=-1), 1],
[domain_5.get_boundary(axis=0, ext=-1), domain_14.get_boundary(axis=0, ext=-1), 1],
[domain_12.get_boundary(axis=0, ext=-1), domain_14.get_boundary(axis=0, ext=+1),1],
axis_0 = 0
axis_1 = 1
ext_0 = -1
ext_1 = +1

connectivity = [
[(domain_1, axis_1, ext_1), (domain_5, axis_1, ext_0), 1],
[(domain_5, axis_1, ext_1), (domain_6, axis_1, ext_1), 1],
[(domain_6, axis_1, ext_0), (domain_2, axis_1, ext_0), 1],
[(domain_2, axis_1, ext_1), (domain_7, axis_1, ext_0), 1],
[(domain_7, axis_1, ext_1), (domain_3, axis_1, ext_0), 1],
[(domain_3, axis_1, ext_1), (domain_9, axis_1, ext_0), 1],
[(domain_9, axis_1, ext_1), (domain_4, axis_1, ext_0), 1],
[(domain_4, axis_1, ext_1), (domain_12, axis_1, ext_1), 1],
[(domain_12, axis_1, ext_0), (domain_1, axis_1, ext_0), 1],
[(domain_6, axis_0, ext_0), (domain_13, axis_0, ext_1), 1],
[(domain_7, axis_0, ext_0), (domain_13, axis_0, ext_0), 1],
[(domain_5, axis_0, ext_0), (domain_14, axis_0, ext_0), 1],
[(domain_12, axis_0, ext_0), (domain_14, axis_0, ext_1), 1],
]

# domain = Domain.join(patches, connectivity, name=domain_name)
domain = sympde_Domain_join(patches, connectivity, name=domain_name)

domain = create_domain(patches, interfaces, domain_name)
return domain

Loading
Loading