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

New hierarchy for Mapping classes #429

Open
wants to merge 228 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 213 commits
Commits
Show all changes
228 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
749bb8d
polar(log_dom) + print_domain works
Sworzzy Jun 17, 2024
eb5bedb
plot_domain(spline_mapping(logical_domain)) works
Sworzzy Jun 17, 2024
b387f4f
nothing to change
Sworzzy Jun 17, 2024
383d341
minor documentation related fixes
jowezarek Jun 17, 2024
a9da50e
sphinx fix
campospinto Jun 18, 2024
309501a
19.06 general _evaluate with lambdify_sympde
Sworzzy Jun 19, 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
5618f80
.gitignore and notebook
Sworzzy 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
4db8dca
simple implementation GeneralLinearOperator
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
a94db57
Merge branch 'devel' into general_linear_operator
e-moral-sanchez Jun 21, 2024
2adf6ad
general linear operator needs toarray, tosparse,transpose method
e-moral-sanchez Jun 23, 2024
6e1bc76
Merge pull request #2 from campospinto/minor_bug_fix_linalg_basic
campospinto Jun 23, 2024
301df8c
modif 27.06
Sworzzy Jun 27, 2024
b4e812a
suppr mapping files
Sworzzy Jun 27, 2024
e28b553
rewrite overriden methods part1
Sworzzy Jul 2, 2024
217eaff
trying to run use_spline_mapping on test_api_feec_2d
Sworzzy Jul 2, 2024
f455ff8
Revert "rewrite overriden methods part1"
Sworzzy Jul 3, 2024
93d5b58
Revert "suppr mapping files"
Sworzzy Jul 3, 2024
5ba63fa
Revert "trying to run use_spline_mapping on test_api_feec_2d"
Sworzzy Jul 3, 2024
41f3373
improve docstrings
e-moral-sanchez Jul 4, 2024
a567199
Merge branch 'devel' into general_linear_operator
e-moral-sanchez Jul 4, 2024
2067c4c
fixed message notimplementederror
e-moral-sanchez Jul 4, 2024
d32bd98
put import outside class
e-moral-sanchez Jul 4, 2024
5c2f462
now fix the errors in psydac/api/tests/test_api/feec/2d.py
Sworzzy Jul 4, 2024
7ffebfd
modif 05/07 v1
Sworzzy Jul 5, 2024
d5177be
modif 05/07 v2
Sworzzy Jul 5, 2024
cc73ebe
trying to see the error in test_api_feec_2d.py
Sworzzy Jul 5, 2024
9fa8538
Revert "modif 05/07 v2"
Sworzzy Jul 5, 2024
7eec057
repaire test_api_feec_2d.py
Sworzzy Jul 5, 2024
a7db338
repairing test_api_feec_2d.py
Sworzzy Jul 5, 2024
8287294
test_2d_multipatch_mapping_maxwell.py passed
Sworzzy Jul 8, 2024
5fc2f05
forgot to add modification to the geometry files (changes to be made …
Sworzzy Jul 8, 2024
0f7a135
test_2d_multipatch_mapping_poisson.py modified successfully
Sworzzy Jul 8, 2024
9dce3ce
test_api_feec_1d.py modified successfully
Sworzzy Jul 8, 2024
c6390ef
test_api_feec_3d.py modified successfully
Sworzzy Jul 8, 2024
b85ec76
set tol to rtol in MINRES
e-moral-sanchez Jul 8, 2024
ddbd456
trying to modify test_build_derham_mapping.py (not working currently)
Sworzzy Jul 8, 2024
c3c1ada
successfully modified postprocessing.py, pushforward.py so that test_…
Sworzzy Jul 8, 2024
1e22b07
modified feec/multipatch/plotting_utilities.py successfully : test_2d…
Sworzzy Jul 8, 2024
330baab
test_pushforward.py modified successfully (passed)
Sworzzy Jul 8, 2024
7df21e0
visual_test_discrete_mapping_2d.py and visual_test_discrete_mapping_3…
Sworzzy Jul 8, 2024
d9edd97
test_c1_projections.py modified successfully, test passed
Sworzzy Jul 8, 2024
204091f
when launching the series of test, test_nodes, test_processing, multi…
Sworzzy Jul 9, 2024
72eacd9
trying to repaire test_geometry
Sworzzy Jul 9, 2024
c5bd39b
trying to build methods for NURBS Mapping
Sworzzy Jul 4, 2024
14838c4
repairing export_nurbs_to_h5
Sworzzy Jul 9, 2024
f01de6f
same
Sworzzy Jul 9, 2024
14e71ad
preparing for psydac meeting
Sworzzy Jul 10, 2024
4966f78
preparing for merge
Sworzzy Jul 10, 2024
dc3562a
psydac meeting
Sworzzy Jul 10, 2024
f85faea
psydac meeting v2
Sworzzy Jul 10, 2024
3041b91
modified names of mapping classes and files, tests not made yet
Sworzzy Jul 11, 2024
10b60fb
changing AbstractMapping to BaseMapping to keep domain undefined mapping
Sworzzy Jul 12, 2024
d76e0a6
tring to add domain undefined mapping
Sworzzy Jul 12, 2024
273ec8f
add features and tests to MatrixFree linear ops
campospinto Jul 12, 2024
9163b3f
tests for matrix free linear ops
campospinto Jul 12, 2024
284f780
commenting imports to igakit
campospinto Jul 12, 2024
aa147c6
update supported python version
campospinto Jul 12, 2024
fa8a8b0
Update continuous-integration.yml
campospinto Jul 12, 2024
1700183
fixing minor bug in example
campospinto Jul 15, 2024
1e53d49
require scipy >= 1.14 in requirements.txt
campospinto Jul 16, 2024
2e898b8
discard tests with python3.8
campospinto Jul 16, 2024
baf0231
avoid minres iteration if converged
campospinto Jul 16, 2024
0bee99c
Update pyproject.toml to use latest sympde version
campospinto Jul 16, 2024
53f335d
Update pyproject.toml to use latest sympde version
campospinto Jul 16, 2024
d21ce02
commenting sympde in pyproject.toml
campospinto Jul 16, 2024
5c29ff0
install dev version of sympde in continuous-integration.yml
campospinto Jul 16, 2024
01da75f
correct continuous-integration.yml
campospinto Jul 16, 2024
82790c6
debugging helmoltz example
campospinto Jul 16, 2024
f06b6e7
fix failing tests
campospinto Jul 16, 2024
0988f76
Merge pull request #7 from campospinto/general_linear_operator
campospinto Jul 19, 2024
d8b397d
Merge branch 'devel' into commenting_igakit
campospinto Jul 19, 2024
ccbe386
comment non-working sympde test
campospinto Jul 20, 2024
9f2717f
convert integral to native python to avoid sympify error
campospinto Jul 20, 2024
dc7aca6
marking xfail test with strange error
campospinto Jul 20, 2024
4735bfc
fixing numpy and sympy sqrt in test
campospinto Jul 20, 2024
4af2be2
mark xfail nurbs geometry tests
campospinto Jul 20, 2024
287fbca
try not restricting Cython version
campospinto Jul 20, 2024
8242b44
Update continuous-integration.yml
campospinto Jul 20, 2024
8cacdcf
Update continuous-integration.yml
campospinto Jul 20, 2024
7db20c7
Update continuous-integration.yml
campospinto Jul 21, 2024
e28e9dd
Update continuous-integration.yml
campospinto Jul 21, 2024
00da37e
Update continuous-integration.yml
campospinto Jul 21, 2024
70764b1
restrict back Cython < 3.0
campospinto Jul 22, 2024
27ae8ef
temp comment of serial tests
campospinto Jul 22, 2024
eb06a74
put back serial tests
campospinto Jul 22, 2024
7abee36
export HDF5_MPI="ON" on separate line
campospinto Jul 22, 2024
deda045
install non editable sympde in CI
campospinto Jul 23, 2024
5bc5c14
CI: Installed sympde-dev after h5py install
kvrigor Jul 23, 2024
9f0a140
CI: Ensure that parallel h5py is installed
kvrigor Jul 23, 2024
fb4bb75
CI: Download and install sympde-dev under /tmp
kvrigor Jul 23, 2024
37f8c7b
CI: Comments on parallel h5py test
kvrigor Jul 23, 2024
bb0a568
commenting failing sympde assert
campospinto Jul 23, 2024
d73c43a
manage to solve the discrete mapping instancing issue : override __ne…
Sworzzy Jul 24, 2024
da1434c
mapping has to be splinemapping, the only one is domain_h.domain.inte…
Sworzzy Jul 24, 2024
ca3cc09
using specific sympde branch for testing
campospinto Jul 24, 2024
016e7cc
putting back a sympde verification
campospinto Jul 24, 2024
8efd1b3
put back old expected solution norm
campospinto Jul 24, 2024
076d508
reverting tests after sympde revert
campospinto Jul 24, 2024
35546ad
unmarking test as xfail
campospinto Jul 24, 2024
fb3d865
use master version of sympde in continuous-integration.yml
campospinto Jul 24, 2024
750ada1
use upper bound python <= 3.12
campospinto Jul 25, 2024
32f8754
uncommenting non-executed code
campospinto Jul 25, 2024
71d71a1
skip geometry tests using igakit
campospinto Jul 25, 2024
c7fccdd
minor cleaning in tests
campospinto Jul 25, 2024
2831be8
fix typo in formula
campospinto Jul 25, 2024
aae0a6d
fix typo in pyproject.toml
campospinto Jul 25, 2024
63c091c
appropriate method for setting mappings for a Domain class
Sworzzy Jul 25, 2024
99df2f8
allow any python 3.12.* versions
campospinto Jul 25, 2024
5075219
skip igakit test rather than commenting it
campospinto Jul 25, 2024
7240cfd
Merge pull request #9 from campospinto/commenting_igakit
campospinto Jul 25, 2024
b4b1ada
Stop testing for python 3.9 in continuous-integration.yml
campospinto Jul 25, 2024
1f3b8aa
merged devel on feature-lagarigue
Sworzzy Jul 26, 2024
ce6e356
first adjustment of the constructor with BaseMapping, now to proceed …
Sworzzy Jul 26, 2024
2ed9431
Merge pull request #15 from campospinto/campospinto-patch-1
campospinto Jul 26, 2024
eff34f9
changing the architecture so that BaseMapping replaces the general Ba…
Sworzzy Jul 29, 2024
f6468de
Because encapsulation changed, changing the set_name for a mapping fr…
Sworzzy Jul 30, 2024
5b36a76
test_api_feec_2d doesn't crash anymore, but bug because results not c…
Sworzzy Jul 31, 2024
17848c0
test_api_feec_2d main finaly runs correctly, with the BaseMapping -> …
Sworzzy Jul 31, 2024
acf084b
deleted the mapping setter for a domain_h.domain.mapping in a domain_…
Sworzzy Aug 6, 2024
8a36505
merge done
Sworzzy Aug 6, 2024
70525ec
repaired bug in test_postprocessing.py, MAPPINGS CAN'T HANDLE SPARSE …
Sworzzy Aug 6, 2024
5ecfd4d
no parallel and no petsc works
Sworzzy Aug 12, 2024
4503d28
final changes
Sworzzy Aug 20, 2024
01e1663
deleted notebook, not usefull
Sworzzy Aug 21, 2024
9becf93
merge with psydac/devel, preparing for PR
Sworzzy Sep 3, 2024
65f5531
deleting .DS_Store
Sworzzy Sep 6, 2024
221a91b
deleted wrong file in previous commit
Sworzzy Sep 6, 2024
e682539
modifying the .gitingore file
Sworzzy Sep 6, 2024
12f2093
use new mapping branch in sympde
campospinto Sep 17, 2024
f351a22
use locally defined CollelaMapping for test
campospinto Sep 17, 2024
3d870dc
Update .gitignore
Sworzzy Sep 17, 2024
f10e1f6
Update psydac/api/ast/glt.py
Sworzzy Sep 17, 2024
7238ba5
trailing whitespace
Sworzzy Sep 18, 2024
015d757
Merge branch 'devel' into feature-lagarrigue
yguclu Sep 23, 2024
e4c26c6
Remove merge junk from pyproject.toml
yguclu Sep 24, 2024
a16f7f8
Remove trailing whitespaces from pyproject.toml
yguclu Sep 24, 2024
eb54321
my last commit
Sworzzy Sep 24, 2024
72c7af5
merging changes
Sworzzy Sep 24, 2024
5176835
fix docs prior to this PR
jowezarek Sep 25, 2024
39fd3a4
include new mapping.utils file docs
jowezarek Sep 25, 2024
5173e2c
fix wrong underline length and Parameter(s)
jowezarek Sep 25, 2024
9f91019
include mpl_toolkits in mock imports
jowezarek Sep 25, 2024
85222f8
Merge branch 'devel' into feature-lagarrigue
yguclu Oct 7, 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
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v2
yguclu marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ __test__/

# pycharm directory
.idea

#macOs
*/.DS_Store
Sworzzy marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion examples/poisson_2d_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable

from sympde.topology.callable_mapping import CallableMapping

from sympde.topology.analytical_mapping import IdentityMapping, PolarMapping
Sworzzy marked this conversation as resolved.
Show resolved Hide resolved
from sympde.topology.analytical_mapping import TargetMapping, CzarnyMapping

Expand Down
2 changes: 2 additions & 0 deletions mesh/generate_pipe.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import numpy as np

raise NotImplementedError("igakit is no longer imported to support python 3.12")

from igakit.cad import circle, ruled, bilinear, join
Sworzzy marked this conversation as resolved.
Show resolved Hide resolved
from psydac.cad.geometry import Geometry, export_nurbs_to_hdf5, refine_nurbs

Expand Down
2 changes: 2 additions & 0 deletions mesh/multipatch/create_magnet.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import numpy as np

raise NotImplementedError("igakit is no longer imported to support python 3.12")

from psydac.cad.multipatch import export_multipatch_nurbs_to_hdf5
Sworzzy marked this conversation as resolved.
Show resolved Hide resolved
from igakit.cad import bilinear
from igakit.cad import circle
Expand Down
6 changes: 3 additions & 3 deletions psydac/api/ast/evaluation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from sympy import symbols, Range
from sympy import Tuple

from sympde.topology import Mapping
from sympde.topology import BaseMapping
from sympde.topology import ScalarFunction
from sympde.topology import SymbolicExpr
from sympde.topology.space import element_of
Expand Down Expand Up @@ -189,8 +189,8 @@ def __new__(cls, space, mapping, name=None,
nderiv=1, is_rational_mapping=None,
backend=None):

if not isinstance(mapping, Mapping):
raise TypeError('> Expecting a Mapping object')
if not isinstance(mapping, BaseMapping):
raise TypeError('> Expecting a BaseMapping object')

obj = SplBasic.__new__(cls, mapping, name=name,
prefix='eval_mapping', mapping=mapping,
Expand Down
5 changes: 3 additions & 2 deletions psydac/api/ast/fem.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@

from sympde.expr import LinearForm, BilinearForm, Functional
from sympde.topology.basic import Boundary, Interface
from sympde.topology import H1SpaceType, HcurlSpaceType, HdivSpaceType, L2SpaceType, UndefinedSpaceType, IdentityMapping
from sympde.topology import H1SpaceType, HcurlSpaceType, HdivSpaceType, L2SpaceType, UndefinedSpaceType
from sympde.topology.space import ScalarFunction, VectorFunction, IndexedVectorFunction
from sympde.topology.derivatives import _logical_partial_derivatives, get_max_logical_partial_derivatives
from sympde.topology.mapping import InterfaceMapping
from sympde.topology.analytic_mappings import IdentityMapping
from sympde.topology.base_mapping import InterfaceMapping
from sympde.calculus.core import is_zero, PlusInterfaceOperator

from psydac.pyccel.ast.core import _atomic, Assign, Import, Return, Comment, Continue, Slice
Expand Down
2 changes: 1 addition & 1 deletion psydac/api/ast/glt.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from sympde.topology import LogicalExpr
from sympde.topology import SymbolicExpr
from sympde.calculus.matrices import SymbolicDeterminant
from sympde.topology import IdentityMapping
from sympde.topology.analytic_mappings import IdentityMapping
Sworzzy marked this conversation as resolved.
Show resolved Hide resolved

from sympde.expr.evaluation import TerminalExpr

Expand Down
16 changes: 8 additions & 8 deletions psydac/api/ast/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from sympde.topology import VectorFunctionSpace
from sympde.topology import IndexedVectorFunction
from sympde.topology import H1SpaceType, L2SpaceType, UndefinedSpaceType
from sympde.topology import Mapping
from sympde.topology import BaseMapping
from sympde.topology import dx1, dx2, dx3
from sympde.topology import get_atom_logical_derivatives
from sympde.topology import Interface
Expand Down Expand Up @@ -395,8 +395,8 @@ class EvalField(BaseNode):
tests : tuple_like (Variable)
The field to be evaluated

mapping : <Mapping>
Sympde Mapping object
mapping : <BaseMapping>
Sympde BaseMapping object

nderiv : int
Maximum number of derivatives
Expand Down Expand Up @@ -542,8 +542,8 @@ class EvalMapping(BaseNode):
q_basis : <GlobalTensorQuadratureTestBasis>
The 1d basis function of the tensor-product space

mapping : <Mapping>
Sympde Mapping object
mapping : <BaseMapping>
Sympde BaseMapping object

components : <GeometryExpressions>
The 1d coefficients of the mapping
Expand Down Expand Up @@ -1046,9 +1046,9 @@ class CoefficientBasis(ScalarNode):
"""
"""
def __new__(cls, target):
ls = target.atoms(ScalarFunction, VectorFunction, Mapping)
ls = target.atoms(ScalarFunction, VectorFunction, BaseMapping)
if not len(ls) == 1:
raise TypeError('Expecting a scalar/vector test function or a Mapping')
raise TypeError('Expecting a scalar/vector test function or a BaseMapping')
return Basic.__new__(cls, target)

@property
Expand Down Expand Up @@ -2029,7 +2029,7 @@ class GeometryAtom(AtomicNode):
"""
"""
def __new__(cls, expr):
ls = list(expr.atoms(Mapping))
ls = list(expr.atoms(BaseMapping))
if not(len(ls) == 1):
raise ValueError('Expecting an expression with one mapping')

Expand Down
4 changes: 2 additions & 2 deletions psydac/api/ast/tests/test_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from sympde.topology import ScalarFunctionSpace
from sympde.topology import elements_of
from sympde.topology import Square
from sympde.topology import Mapping, IdentityMapping
from sympde.topology import BaseMapping, IdentityMapping
from sympde.expr import integral
from sympde.expr import LinearForm
from sympde.expr import BilinearForm
Expand Down Expand Up @@ -69,7 +69,7 @@

# ... abstract model
domain = Square()
M = Mapping('M', domain.dim)
M = BaseMapping('M', domain.dim)

V = ScalarFunctionSpace('V', domain)
u,v = elements_of(V, names='u,v')
Expand Down
14 changes: 7 additions & 7 deletions psydac/api/ast/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from sympde.topology.space import VectorFunction
from sympde.topology.space import IndexedVectorFunction
from sympde.topology.space import element_of
from sympde.topology import Mapping
from sympde.topology import BaseMapping
from sympde.topology import Boundary
from sympde.topology.derivatives import _partial_derivatives
from sympde.topology.derivatives import _logical_partial_derivatives
Expand Down Expand Up @@ -68,10 +68,10 @@ def is_mapping(expr):
if isinstance(expr, _logical_partial_derivatives):
return is_mapping(expr.args[0])

elif isinstance(expr, Indexed) and isinstance(expr.base, Mapping):
elif isinstance(expr, Indexed) and isinstance(expr.base, BaseMapping):
return True

elif isinstance(expr, Mapping):
elif isinstance(expr, BaseMapping):
return True

return False
Expand Down Expand Up @@ -141,8 +141,8 @@ def compute_atoms_expr(atomic_exprs, indices_quad, indices_test,
is_linear : <boolean>
variable to determine if we are in the linear case

mapping : <Mapping>
Mapping object
mapping : <BaseMapping>
BaseMapping object

Returns
-------
Expand Down Expand Up @@ -259,8 +259,8 @@ def compute_atoms_expr_field(atomic_exprs, indices_quad,
test_function : <Symbol>
test_function Symbol

mapping : <Mapping>
Mapping object
mapping : <BaseMapping>
BaseMapping object

Returns
-------
Expand Down
44 changes: 21 additions & 23 deletions psydac/api/feec.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from sympde.topology.mapping import Mapping
from sympde.topology import BaseMapping

from psydac.api.basic import BasicDiscrete
from psydac.feec.derivatives import Derivative_1D, Gradient_2D, Gradient_3D
Expand All @@ -20,16 +20,15 @@ class DiscreteDerham(BasicDiscrete):

Parameters
----------
mapping : Mapping or None
mapping : BaseMapping or None
Symbolic mapping from the logical space to the physical space, if any.

*spaces : list of FemSpace
The discrete spaces of the de Rham sequence.

Notes
-----
- The basic type Mapping is defined in module sympde.topology.mapping.
A discrete mapping (spline or NURBS) may be attached to it.
- The basic type BaseMapping is defined in module sympde.topology.base_mapping

- This constructor should not be called directly, but rather from the
`discretize_derham` function in `psydac.api.discretization`.
Expand All @@ -39,7 +38,7 @@ class DiscreteDerham(BasicDiscrete):
"""
def __init__(self, mapping, *spaces):

assert (mapping is None) or isinstance(mapping, Mapping)
assert (mapping is None) or isinstance(mapping, BaseMapping)
assert all(isinstance(space, FemSpace) for space in spaces)

self.has_vec = isinstance(spaces[-1], VectorFemSpace)
Expand All @@ -55,7 +54,6 @@ def __init__(self, mapping, *spaces):

self._dim = dim
self._mapping = mapping
self._callable_mapping = mapping.get_callable_mapping() if mapping else None

if dim == 1:
D0 = Derivative_1D(spaces[0], spaces[1])
Expand Down Expand Up @@ -141,11 +139,11 @@ def mapping(self):
"""The mapping from the logical space to the physical space."""
return self._mapping

@property
def callable_mapping(self):
"""The mapping as a callable."""
return self._callable_mapping

@mapping.setter
def mapping(self, value):
assert isinstance(value, BaseMapping), "Mapping must be an instance of BaseMapping"
self._mapping = value
@property
def derivatives_as_matrices(self):
"""Differential operators of the De Rham sequence as LinearOperator objects."""
Expand Down Expand Up @@ -203,8 +201,8 @@ def projectors(self, *, kind='global', nquads=None):
P0 = Projector_H1(self.V0)
P1 = Projector_L2(self.V1, nquads)
if self.mapping:
P0_m = lambda f: P0(pull_1d_h1(f, self.callable_mapping))
P1_m = lambda f: P1(pull_1d_l2(f, self.callable_mapping))
P0_m = lambda f: P0(pull_1d_h1(f, self.mapping))
P1_m = lambda f: P1(pull_1d_l2(f, self.mapping))
return P0_m, P1_m
return P0, P1

Expand All @@ -224,14 +222,14 @@ def projectors(self, *, kind='global', nquads=None):
Pvec = Projector_H1vec(self.H1vec, nquads)

if self.mapping:
P0_m = lambda f: P0(pull_2d_h1(f, self.callable_mapping))
P2_m = lambda f: P2(pull_2d_l2(f, self.callable_mapping))
P0_m = lambda f: P0(pull_2d_h1(f, self.mapping))
P2_m = lambda f: P2(pull_2d_l2(f, self.mapping))
if kind == 'hcurl':
P1_m = lambda f: P1(pull_2d_hcurl(f, self.callable_mapping))
P1_m = lambda f: P1(pull_2d_hcurl(f, self.mapping))
elif kind == 'hdiv':
P1_m = lambda f: P1(pull_2d_hdiv(f, self.callable_mapping))
P1_m = lambda f: P1(pull_2d_hdiv(f, self.mapping))
if self.has_vec :
Pvec_m = lambda f: Pvec(pull_2d_h1vec(f, self.callable_mapping))
Pvec_m = lambda f: Pvec(pull_2d_h1vec(f, self.mapping))
return P0_m, P1_m, P2_m, Pvec_m
else :
return P0_m, P1_m, P2_m
Expand All @@ -249,12 +247,12 @@ def projectors(self, *, kind='global', nquads=None):
if self.has_vec :
Pvec = Projector_H1vec(self.H1vec)
if self.mapping:
P0_m = lambda f: P0(pull_3d_h1 (f, self.callable_mapping))
P1_m = lambda f: P1(pull_3d_hcurl(f, self.callable_mapping))
P2_m = lambda f: P2(pull_3d_hdiv (f, self.callable_mapping))
P3_m = lambda f: P3(pull_3d_l2 (f, self.callable_mapping))
P0_m = lambda f: P0(pull_3d_h1 (f, self.mapping))
P1_m = lambda f: P1(pull_3d_hcurl(f, self.mapping))
P2_m = lambda f: P2(pull_3d_hdiv (f, self.mapping))
P3_m = lambda f: P3(pull_3d_l2 (f, self.mapping))
if self.has_vec :
Pvec_m = lambda f: Pvec(pull_3d_h1vec(f, self.callable_mapping))
Pvec_m = lambda f: Pvec(pull_3d_h1vec(f, self.mapping))
return P0_m, P1_m, P2_m, P3_m, Pvec_m
else :
return P0_m, P1_m, P2_m, P3_m
Expand Down
8 changes: 4 additions & 4 deletions psydac/api/fem.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class DiscreteBilinearForm(BasicDiscrete):
The backend used to accelerate the computing kernels of the linear operator.
The backend dictionaries are defined in the file psydac/api/settings.py

symbolic_mapping : Sympde.topology.Mapping, optional
symbolic_mapping : Sympde.topology.BaseMapping, optional
The symbolic mapping which defines the physical domain of the bilinear form.

See Also
Expand Down Expand Up @@ -952,7 +952,7 @@ class DiscreteSesquilinearForm(DiscreteBilinearForm):
The backend used to accelerate the computing kernels of the linear operator.
The backend dictionaries are defined in the file psydac/api/settings.py

symbolic_mapping: Sympde.topology.Mapping
symbolic_mapping: Sympde.topology.BaseMapping
The symbolic mapping which defines the physical domain of the sesqui-linear form.

"""
Expand Down Expand Up @@ -998,7 +998,7 @@ class DiscreteLinearForm(BasicDiscrete):
The backend used to accelerate the computing kernels.
The backend dictionaries are defined in the file psydac/api/settings.py

symbolic_mapping : Sympde.topology.Mapping, optional
symbolic_mapping : Sympde.topology.BaseMapping, optional
The symbolic mapping which defines the physical domain of the linear form.

See Also
Expand Down Expand Up @@ -1408,7 +1408,7 @@ class DiscreteFunctional(BasicDiscrete):
The backend used to accelerate the computing kernels.
The backend dictionaries are defined in the file psydac/api/settings.py

symbolic_mapping : Sympde.topology.Mapping
symbolic_mapping : Sympde.topology.BaseMapping
The symbolic mapping which defines the physical domain of the functional.

See Also
Expand Down
Loading
Loading