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

Add documentation to DiscreteDerham #349

Merged
merged 92 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from 85 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
6e1000f
added uptating ghost regions before assembling a form and a test show…
Mar 10, 2023
99364d7
correction for the call of backups in the test
Mar 10, 2023
9d9e3d7
added the Hvec projection, and the space on the derham sequence with …
Mar 13, 2023
bb783cb
added the basis projector operators, started to implement some tests
Mar 14, 2023
379c5b7
added tests for the basis projectors, there seems to be a problem in …
Mar 14, 2023
296ac74
basis operators now available, all test passing
Mar 15, 2023
ac91c73
resolving the conflicts
Mar 15, 2023
0ab2737
Merge branch 'devel' into add_Hvec
vcarlier Mar 15, 2023
ec67c87
forgotten add file
Mar 15, 2023
b358b3a
Merge branch 'add_Hvec' of https://github.com/pyccel/psydac into add_…
Mar 15, 2023
064a578
fix for the transpose, added the fix in block linop
Mar 15, 2023
20a64d9
fix in linalg.block, add tests and a fix (probably temporary) when pa…
Mar 16, 2023
867fc96
Fix to able the basis projection operators to be used with femfields …
Mar 22, 2023
31b9cb8
remove ome useless args in dot function of basis projection operator
Mar 31, 2023
c0d8b8d
solving problem with points that could go outside of the domains in p…
Apr 20, 2023
3d1478e
few changes in basis_projectors
May 3, 2023
fda85b7
merge devel in branch
May 3, 2023
6db4a90
few fixes after the merge of devel
May 5, 2023
37fd71b
changes on pull_back for the v_space to match other changes and added…
May 12, 2023
88516fa
Merge branch 'devel' into add_Hvec
May 12, 2023
04c5b82
fix useless stuff for codacity
May 12, 2023
4e45d5b
add the possibility to have a metric to compute the error on the Bico…
May 12, 2023
6cf8855
add nb cells in basis projectors to use eval field regular tensor grid
May 22, 2023
a59ac87
little rectification in basis proj operator
May 26, 2023
ecdaab5
Delete .lock_acquisition.lock
vcarlier May 31, 2023
43c0033
Update test_assembly.py
vcarlier May 31, 2023
d099ad1
optimization : can now set a Basis projection operator with given mat…
Jun 1, 2023
50d223e
optimzed te creation of he basis projection operator in case the coef…
Jun 12, 2023
8146777
add kernels in 1d and 3d, updated kernel docstrings for the femfield …
Jun 14, 2023
495a888
Merge branch 'add_metric_solver' into add_Hvec
Jun 14, 2023
c6691c1
add bc to basis projection, changed the dot product (not really more …
Jun 19, 2023
fb5cc8e
add boundary parameter to prepare the grid in basisProjector
Jun 22, 2023
f8e42c4
add the possibility to customize the grid (cf. Maxwell ssc)
Aug 8, 2023
170c944
few unsaved changes
Sep 4, 2023
d9e3ad9
change typo
Sep 7, 2023
9b65215
merge devel
Sep 8, 2023
2384458
Merge branch 'devel' into add_Hvec
Sep 8, 2023
0ac2099
little fix after merge
Sep 8, 2023
d3bb10e
removed the posibility to impose BC on projectors
Sep 8, 2023
4c60e4c
confusion between nquads and quad_order
Sep 8, 2023
0a3f9f2
cleaning the PR
Sep 8, 2023
a7c453e
keep cleaning
Sep 8, 2023
17c69a0
hope it's clean now
Sep 8, 2023
ca1eed9
add a comment on the symbolic space of Hvec
Sep 11, 2023
16d7475
solving a bug when different number of cells per patch were given. Ad…
Sep 11, 2023
c1232d8
removing the name variable causing the trouble
Sep 11, 2023
d755da5
added a feature to get a name, avoiding the problem with Zero objects
Sep 11, 2023
bbac085
trying to fix
Sep 11, 2023
766e12c
fixing number of derivative computed by default to avoid segfault
Sep 12, 2023
460cc9e
looks like this 1 is needed
Sep 12, 2023
ac92117
add update ghost regions on composed linear op
Sep 18, 2023
e98d9ac
remove leftovers print in basis projectors
Sep 18, 2023
39938b0
add option to update fun to basis projectors
Sep 19, 2023
1e6e336
reuse Blockmatrix in basis projector operator
Sep 20, 2023
0bb7c73
add idot to various subclasses
Sep 21, 2023
9699be3
order list in sumlinearoperator to avoid problems with multiple proce…
Sep 22, 2023
751c497
make KroneckerLinearSolver subclass LinearOperator
jowezarek Sep 27, 2023
4f33eec
allow for different domain and codomain in KroneckerLinearSolver
jowezarek Sep 28, 2023
792e019
fix bug and bad tests
jowezarek Sep 28, 2023
b8068f7
add Kronecker M1 solver to tests
jowezarek Oct 2, 2023
5c9a7ad
Merge branch 'devel' into linearsolver_update
jowezarek Oct 2, 2023
0b36ee6
merge devel
Oct 6, 2023
7e2f391
Merge branch 'devel' into add_Hvec
Oct 6, 2023
cd70922
Merge branch 'linearsolver_update' into add_Hvec
Oct 6, 2023
38dc6d7
enabling custom preconditioning
Oct 10, 2023
47fc88c
clean PR : clean api
Oct 10, 2023
5773489
clean PR : clean fem
Oct 10, 2023
35c42a5
clean PR : clean linalg
Oct 10, 2023
4223d53
some forgotten changes
Oct 10, 2023
43d3626
solve the problem with operator from TensorSpace to TensorSpace
Oct 10, 2023
a85d9f8
cleaning useless variable and adding some more comments
Oct 10, 2023
d1bfea7
remove all basis projector related changes to keep only H_vec stuff
Oct 12, 2023
d747470
add tests for the global projectors + Hvec in any dimension + solved …
Oct 12, 2023
ecb267b
we still need to provide a symbolic space because of sympde
Oct 12, 2023
5e63070
error in parametrization of tests
Oct 12, 2023
af64095
Merge branch 'devel' into add_Hvec
Oct 13, 2023
d713e5f
update name after review
Oct 13, 2023
d3e7b66
forgot one update
Oct 13, 2023
9166d7d
answering Yaman review
Oct 16, 2023
c8b187b
pb in Discrete Derham docstring and useless lines
Oct 16, 2023
1729b1a
change names for pull-push
Oct 16, 2023
5d521ee
update tests and comment on roll edges
Oct 17, 2023
cc2fa3f
add some first comments
Oct 19, 2023
823f7f8
add some documentation to DiscreteDerahm
Oct 25, 2023
3973ce5
little change on dimension
Oct 25, 2023
edd4cca
Merge branch 'devel' into add_Hvec
yguclu Oct 25, 2023
8e2067f
modifications after Martin's review
Oct 30, 2023
49ed53e
changes to fix last discussions
Nov 29, 2023
9460cd8
Merge branch 'devel' into add_Hvec
Nov 29, 2023
95caa9c
Improve docstrings in psydac/api/discretization.py
yguclu Dec 1, 2023
2336051
Improve docstrings in psydac/api/feec.py
yguclu Dec 1, 2023
90647cd
Fix bug in psydac/api/feec.py
yguclu Dec 1, 2023
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
6 changes: 6 additions & 0 deletions psydac/api/discretization.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ def discretize_derham(derham, domain_h, get_H1vec_space = False, *args, **kwargs

**kwargs : list
optional parameters for the space discretization

Returns
-------
: DiscreteDerham
The discrete De Rham sequence containing the discrete spaces,
differential operators and projectors
"""

ldim = derham.shape
Expand Down
37 changes: 37 additions & 0 deletions psydac/api/feec.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,51 +86,88 @@ def __init__(self, mapping, *spaces):
#--------------------------------------------------------------------------
@property
def dim(self):
"""dimension of the physical and logical space"""
yguclu marked this conversation as resolved.
Show resolved Hide resolved
return self._dim

@property
def V0(self):
"""First space of the De Rham sequence : H1 space"""
return self._spaces[0]

@property
def V1(self):
"""Second space of the De Rham sequence :
1d : L2 space
2d : either Hdiv or Hcurl space
3d : Hcurl space"""
return self._spaces[1]

@property
def V2(self):
"""Third space of the De Rham sequence :
2d : L2 space
3d : Hdiv space"""
return self._spaces[2]

@property
def V3(self):
"""Fourth space of the De Rham sequence : L2 space in 3d"""
return self._spaces[3]

@property
def H1vec(self):
"""Vectorial H1 space built has cartesian product of V0"""
vcarlier marked this conversation as resolved.
Show resolved Hide resolved
assert self.has_vec
return self._H1vec

@property
def spaces(self):
"""Spaces of the proper de Rham sequence (excluding Hvec)"""
return self._spaces

@property
def mapping(self):
"""The mapping from the logical space to the physical space of the discrete De Rham."""
vcarlier marked this conversation as resolved.
Show resolved Hide resolved
return self._mapping

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

@property
def derivatives_as_matrices(self):
"""Differential operators of the De Rham sequence as BlockLinearOperator"""
vcarlier marked this conversation as resolved.
Show resolved Hide resolved
return tuple(V.diff.matrix for V in self.spaces[:-1])

@property
def derivatives_as_operators(self):
"""Differential operators of the De Rham sequence as DiffOperator"""
vcarlier marked this conversation as resolved.
Show resolved Hide resolved
return tuple(V.diff for V in self.spaces[:-1])

#--------------------------------------------------------------------------
def projectors(self, *, kind='global', nquads=None):
"""Projectors mapping callable to FemFields of the De Rham sequence.

Parameters
----------

kind : str
Type of the projection : at the moment, only global is accepted and
returns commuting projectors based on interpolation/histopolation
for the De Rham sequence (GlobalProjector objects)

nquads : list(int) | tuple(int)
Number of quadrature points along each direction, to be used in Gauss
quadrature rule for computing the (approximated) degrees of freedom.

Returns
-------
P0, ..., Pn : callables
Projectors that can be called on any callable function that maps
from the physical space to R (scalar case) or R^d (vector case) and
returns a FemField belonging to the i-th space of the De Rham sequence
"""
vcarlier marked this conversation as resolved.
Show resolved Hide resolved

if not (kind == 'global'):
raise NotImplementedError('only global projectors are available')
Expand Down