Broken-FEEC conforming projections in polar domains - #576
Conversation
- Export Ex, Ey, Bz at initial and final times - Import fields for plotting with the root process (initial and final times) - Comment out plotting at intermediate time steps (animation)
Explain that the module can be run as a script
Add details about running the script.
Add details about running the script.
|
@alisa-kirkinskaia I have made some small additional changes to the docstrings in order to have the Sphinx documentation in full order. At this point I think there is only one thing missing for this PR to be merged, which is a slight change in notation in the docstrings of module
|
Thanks! I updated the docstrings in 315eb7e |
yguclu
left a comment
There was a problem hiding this comment.
I am suggesting small changes in order to fix a couple of mismatches between the docstring of class C0PolarProjection_V0 and the reference manuscript. If the Sphinx documentation is built correctly, I would like you to make similar changes to the other classes
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.
Good job!
We are almost finished with the review process
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
Provide broken-FEEC conforming projection operators (as matrix-free$C^0$ and $C^1$ sequences in 2D disk-like domains with a polar singularity (conga_projections.py). Implement explicit formulas of the matrix entries from Sections 3.4-3.5 (pages 19-24) of the arXiv preprint. Provide 2D examples (Poisson and Maxwell). Make everything work in parallel with MPI.
LinearOperatorsubclasses) for theMain additions
Broken-FEEC conforming projection operators
Create new module
psydac.feec.polar.conga_projectionswith theLinearOperatorsubclasses:C0PolarProjection_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 subspacesC1PolarProjection_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 subspacesThe
dotmethods of the new projection operators correctly execute in parallel for arbitrary domain decompositions in both the angular and radial dimensions.Tests
Create new test module
psydac.feec.polar.tests.test_conga_projectionswith MPI-parallel unit tests which check:tosparsemethods against reference matrix operatorsdotandtosparsemethodsPoisson and Maxwell examples
Provide MPI-parallel 2D examples of broken-FEEC discretizations in mapped polar domains:
psydac/feec/polar/examples/poisson_2d.pysolves manufactured Poisson problems in 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.pysolves time-dependent TE (transverse electric) electromagnetic wave propagation in circular domains. The parametrization allows for a "Shafranov shift" of the polar singularity, which is treated with the broken-FEEC approach, imposing eitherpsydac/feec/polar/examples/analytical_solutions.py:CircularCavitySolution: manufactured time-harmonic solution of Maxwell's equations in a disk with perfectly conducting wallsGaussianInitialCondition: localized rotational Gaussian initial condition for the electric field, with the magnetic field initialized fromBoth examples use two new modules in the same directory:
psydac.feec.polar.examples.polar_model_2dprovides the base classPolarModel2Dfor analytical models on mapped 2D polar domains.psydac.feec.polar.examples.utils_congapolprovides various utility functions.Further changes
psydac.utilities.parallel_utilsfor parallel execution and gathering variable-length arrayspsydac.utilities.operatorswith classLaplacianused in some old exampleseval_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