Broken FEEC projections on polar domains - #576
alisa-kirkinskaia wants to merge 224 commits into
Conversation
…into polar_splines_alisa
- Remove polar_mapping and use_logical_sol options - Change the analytical solution - Avoid Laplacian() for right hand side - Add disk radius as parse argument
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
yguclu
left a comment
There was a problem hiding this comment.
Thanks for the latest changes @alisa-kirkinskaia!
| mapping : sympde.topology.mapping.Mapping | ||
| Mapping used by the solver. It is either the analytical mapping or | ||
| its spline approximation. Initialized by calling ``build_geometry``. |
There was a problem hiding this comment.
Does the PSYDAC class SplineMapping currently subclass the SymPDE class Mapping? @campospinto
| mapping : sympde.topology.mapping.Mapping | ||
| Mapping used by the solver. It is either the analytical mapping or | ||
| its spline approximation. Initialized by calling ``build_geometry``. | ||
|
|
||
| analytical_mapping : sympde.topology.mapping.Mapping | ||
| Original analytical mapping from the logical to the physical domain. | ||
|
|
||
| domain : sympde.topology.Domain | ||
| Physical domain associated with ``mapping``. Initialized by | ||
| calling ``build_geometry``. |
There was a problem hiding this comment.
Are the double tick marks around build_geometry and mapping really needed? I would expect single ticks to be sufficient
| :code | ||
| $(\partial^2_{xx} + \partial^2_{yy}) \phi(x,y) = -\rho(x,y)$ | ||
|
|
||
| """ |
There was a problem hiding this comment.
Excellent, thanks! Could you please mention the new module psydac.utilities.operators in the file CHANGELOG.md?
There was a problem hiding this comment.
Have you checked that this script still runs after removing the local class Laplacian? I think you are missing an import statement
There was a problem hiding this comment.
I ran it with the wrong parameters, so it was not trying to use the Laplacian class. Now after adding the import statement, I am running with -m -l parameters. However, it seems to be stuck for a very long time and never finish. This is not because of my changes though, because the same happens if I revert the commit.
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
This PR implements broken FEEC projections for the$C^0$ and $C^1$ sequences in 2D (conga_projections.py). The formulas for the projections can be found on pages 19-23 of the arXiv preprint https://arxiv.org/pdf/2505.15996.
Main additions
Broken FEEC polar projections
psydac.feec.polar.conga_projections.LinearOperatorsubclassesC0PolarProjection_V0/1/2acting on the coefficients of scalar- or vector-valued tensor-product splines defined on the logical domain. The tensor-product splines are projected onto the subspacesLinearOperatorsubclassesC1PolarProjection_U0/1/2acting on the coefficients of scalar- or vector-valued tensor-product splines defined on the logical domain. The tensor-product splines are projected onto the subspacesdotmethods of the new projection operators correctly execute in parallel for arbitrary domain decompositions in both the angular and radial dimensions.Tests
tosparsemethods against reference matrix operatorsdotandtosparsemethodsPoisson and Maxwell examples
psydac/feec/polar/examples/poisson_2d.pyfor solving manufactured Poisson problems on polar mapped domains. The script supports disk, target, and Czarny domains, analytical or spline mappings, and different treatments of the polar singularity (polar-spec, polar-std, C0conga, and C1conga).psydac/feec/polar/examples/maxwell_2d.py. The script provides two field configurations defined inpsydac/feec/polar/examples/analytical_solutions.py:CircularCavitySolution: Time-harmonic solution of Maxwell's equations in a disk-like domain withperfectly conducting walls
GaussianInitialCondition: localized rotational Gaussian initial condition for the electric field, with the magnetic field initialized fromFurther changes
eval_fieldandeval_field_gradientofTensorFemSpacerelated to floating point round-off at MPI subdomain boundaries. Add a unit test inpsydac/fem/tests/test_eval_fields_parallel.pyNode.js20Additional info
Example of run:
mpirun -n 2 python poisson_2d.py -S -n 16 24 -d 2 2 -t disk -D 0.2 -m 'C0conga'Exact solution, approximate solution and error plot:
Example of run:
mpirun -n 2 python maxwell_2d.py -S -n 16 20 -d 2 2 -T 1 -D 0.2 -s 1Plot of exact solution and approximate solution at final time T = 1:
TODO
C1PolarProjection_V2and test itC1PolarProjection_V0/1/2toC1PolarProjection_U0/1/2(i.e. replaceVwithU)sympy.lambdifywithpyccel.lambdifymaxwell_2d.pyin parallel for a certain combination ofdegreeandncellsmainfunction inwaveTE.py