Maxwell solver
GEMPIC.Maxwell1DFEM — Typemaxwell_solver = MaxwellFEM1D( mesh, degree )1D Maxwell spline finite element solver on a periodic grid
Lx: length of Periodic domaindelta_x: cell sizen_dofs: number of cells (and grid points)s_deg_0: spline degree 0-formss_deg_1: spline degree 1-formsmass_0: coefficients of 0-form mass matrixmass_1: coefficients of 1-form mass matrixeig_mass0: eigenvalues of circulant 0-form mass matrixeig_mass1: eigenvalues of circulant 1-form mass matrixeig_weak_ampere: eigenvalues of circulant update matrix for Ampereeig_weak_poisson: eigenvalues of circulant update matrix for Poissonplan_fw: fft plan (forward)plan_bw: fft plan (backward)
GEMPIC.compute_b_from_e! — Methodcompute_b_from_e!( field_out, maxwell_solver, delta_t, field_in)Compute Bz from Ey using strong 1D Faraday equation for spline coefficients
\[B_z^{new}(x_j) = B_z^{old}(x_j) - \frac{\Delta t}{\Delta x} (E_y(x_j) - E_y(x_{j-1})\]
GEMPIC.compute_e_from_b! — Methodcompute_e_from_b!(field_out, maxwell_solver, delta_t, field_in)compute Ey from Bz using weak Ampere formulation
GEMPIC.compute_e_from_j! — Methodcompute_e_from_j!(e, maxwell_solver, current, component)Compute $E_i$ from $j_i$ integrated over the time interval using weak Ampere formulation
GEMPIC.compute_rhs_from_function! — Methodcomputerhsfromfunction(self, func, degree, coefsdofs)
Compute the FEM right-hand-side for a given function f and periodic splines of given degree.
Its components are $\int f N_i dx$ where $N_i$ is the B-spline starting at $x_i$.
GEMPIC.inner_product — Methodinner_product( maxwell_solver, coefs1_dofs, coefs2_dofs, degree )maxwell_solver: Maxwell solver objectcoefs1_dofs: Coefficient for each DoFcoefs2_dofs: Coefficient for each DoF- `degree : Specify the degree of the basis functions
return squared L2 norm
GEMPIC.l2norm_squared — Methodl2norm_squared(maxwell_solver, coefs_dofs, degree)Compute square of the L2norm
GEMPIC.l2norm_squared2 — Methodl2norm_squared(maxwell_solver, coefs_dofs, degree)Compute square of the L2norm
GEMPIC.l2projection! — Methodl2projection!(coefs_dofs, maxwell, func, degree)Compute the L2 projection of a given function f on periodic splines of given degree