Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 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
aa4fd8c
functions stencil index to petsc index and viceversa
e-moral-sanchez May 8, 2024
678de4a
efficient conversion to PETSc of StencilVectors
e-moral-sanchez May 8, 2024
bf176a2
works for 1D stencil matrix with multiple processes
e-moral-sanchez May 13, 2024
c7ac7ce
correct indexing for 2D stencilmatrix
e-moral-sanchez May 15, 2024
6579478
works 1d,2d,3d stencilmatrix without periodic BC
e-moral-sanchez May 15, 2024
a9e0315
efficient conversion of stencilmatrix to PETSc.Mat for 1,2,3D and pe…
e-moral-sanchez May 16, 2024
1579d31
Fixed conversion from 2D BlockStencilVector to Petsc.Vec
e-moral-sanchez May 17, 2024
a78bb93
fix general case also for stencilvector 2D
e-moral-sanchez May 17, 2024
bb05e72
fixed petsc_to_psydac for BlockVectors
e-moral-sanchez May 21, 2024
4174b66
PETSc conversion works for StencilVector and BlockStencilVector of 1 …
e-moral-sanchez May 21, 2024
d019388
conversion works for StencilMatrix
e-moral-sanchez May 21, 2024
4066746
works for BlockLinearOperators, the blocks of which are Stencilmatrices
e-moral-sanchez May 21, 2024
988ba35
Clean up, docstrings
e-moral-sanchez May 21, 2024
6e3a348
fix bugs
e-moral-sanchez May 22, 2024
448670b
sequential case, docstrings
e-moral-sanchez May 22, 2024
22b7646
cleaning
e-moral-sanchez May 22, 2024
32a6a13
erase forgotten comments
e-moral-sanchez May 22, 2024
4a60cd9
Merge branch 'devel' into improve_mat_topetsc
e-moral-sanchez May 22, 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
df34fe9
fix loop stencil
e-moral-sanchez 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
c8b4c07
forgotten prints
e-moral-sanchez May 27, 2024
4de21ca
add pyccel kernel
e-moral-sanchez May 29, 2024
ce1126a
string for type annotations
e-moral-sanchez May 29, 2024
1a45700
clean up plus fix serial case
e-moral-sanchez May 29, 2024
ba230ba
stop using create_domain() -- wip
campospinto May 31, 2024
685f4a5
use Domain.join() to build non-matching domains
campospinto Jun 2, 2024
842f7fc
clean time measurements
e-moral-sanchez Jun 3, 2024
a3a5341
using temp function for sympde Domain.join
campospinto Jun 4, 2024
220f1cf
adding ref
campospinto Jun 4, 2024
73019d1
call exposed domain and codomain in linalg/basic.py
campospinto Jun 7, 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
25c586b
fix version 12 of macos in tests
e-moral-sanchez 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
9995e21
Fixes for CI failures caused by new macOS runner version and numpy 2.0
kvrigor Jun 19, 2024
802ab87
CI: Temporarily disabled docs deployment since base repo is a fork
kvrigor Jun 19, 2024
8a8138f
Merge pull request #3 from campospinto/ci-fixes-jun2024
campospinto Jun 20, 2024
c3f380c
Merge branch 'devel' into improve_mat_topetsc
e-moral-sanchez Jun 21, 2024
cec4c7a
Update macos version
e-moral-sanchez Jun 21, 2024
63f3228
Disable deploy_docs in documentation.yml
FrederikSchnack Jun 21, 2024
ed0427f
Merge branch 'ci-fixes-jun2024' into non_matching_multipatch
FrederikSchnack Jun 21, 2024
d1b9cb0
Merge pull request #4 from campospinto/ci-fixes-jun2024
campospinto Jun 21, 2024
37f2b10
Merge branch 'devel' into improve_mat_topetsc
e-moral-sanchez Jun 21, 2024
5d5de58
Merge pull request #1 from campospinto/improve_mat_topetsc
campospinto Jun 21, 2024
6265d1c
Merge branch 'devel' into non_matching_multipatch
FrederikSchnack Jun 21, 2024
bdaa788
Merge pull request #5 from campospinto/non_matching_multipatch
campospinto Jun 21, 2024
618020b
Merge branch 'devel' into minor_bug_fix_linalg_basic
campospinto Jun 21, 2024
6e1bc76
Merge pull request #2 from campospinto/minor_bug_fix_linalg_basic
campospinto Jun 23, 2024
65b4b4d
adding failing tests for norm and seminorm
campospinto Jul 19, 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
36 changes: 19 additions & 17 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,23 @@ jobs:
make -C docs clean
make -C docs html
python docs/update_links.py
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'docs/build/html'

deploy_docs:
if: github.event_name != 'pull_request'
needs: build_docs
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
# Disable docs deployment for now as we're in psydac fork repo
# - name: Setup Pages
# uses: actions/configure-pages@v3
# - name: Upload artifact
# uses: actions/upload-pages-artifact@v1
# with:
# path: 'docs/build/html'

# deploy_docs:
# if: github.event_name != 'pull_request'
# needs: build_docs
# runs-on: ubuntu-latest
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# steps:
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v2
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
22 changes: 18 additions & 4 deletions psydac/api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

PSYDAC_BACKEND_GPYCCEL = {'name': 'pyccel',
'compiler': 'GNU',
'flags' : '-O3 -march=native -mtune=native -ffast-math',
'flags' : '-O3 -ffast-math',
'folder' : '__gpyccel__',
'tag' : 'gpyccel',
'openmp' : False}
Expand Down Expand Up @@ -41,8 +41,22 @@
# ...

# Platform-dependent flags
if platform.machine() == 'x86_64':
PSYDAC_BACKEND_GPYCCEL['flags'] += ' -mavx'
if platform.system() == "Darwin" and platform.machine() == 'arm64':
# Apple silicon requires architecture-specific flags (see https://github.com/pyccel/psydac/pull/411)
import subprocess # nosec B404
cpu_brand = subprocess.check_output(['sysctl','-n','machdep.cpu.brand_string']).decode('utf-8') # nosec B603, B607
if "Apple M1" in cpu_brand:
PSYDAC_BACKEND_GPYCCEL['flags'] += ' -mcpu=apple-m1'
else:
# TODO: Support later Apple CPU models. Perhaps the CPU naming scheme could be easily guessed
# based on the output of 'sysctl -n machdep.cpu.brand_string', but I wouldn't rely on this
# guess unless it has been manually verified. Loud errors are better than silent failures!
raise SystemError(f"Unsupported Apple CPU '{cpu_brand}'.")
else:
# Default architecture flags
PSYDAC_BACKEND_GPYCCEL['flags'] += ' -march=native -mtune=native'
if platform.machine() == 'x86_64':
PSYDAC_BACKEND_GPYCCEL['flags'] += ' -mavx'

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

Expand All @@ -53,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