Maxwell solver

GEMPIC.Maxwell1DFEMType
maxwell_solver = MaxwellFEM1D( mesh, degree )

1D Maxwell spline finite element solver on a periodic grid

  • Lx : length of Periodic domain
  • delta_x : cell size
  • n_dofs : number of cells (and grid points)
  • s_deg_0 : spline degree 0-forms
  • s_deg_1 : spline degree 1-forms
  • mass_0 : coefficients of 0-form mass matrix
  • mass_1 : coefficients of 1-form mass matrix
  • eig_mass0 : eigenvalues of circulant 0-form mass matrix
  • eig_mass1 : eigenvalues of circulant 1-form mass matrix
  • eig_weak_ampere : eigenvalues of circulant update matrix for Ampere
  • eig_weak_poisson : eigenvalues of circulant update matrix for Poisson
  • plan_fw : fft plan (forward)
  • plan_bw : fft plan (backward)
GEMPIC.compute_b_from_e!Method
compute_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!Method
compute_e_from_b!(field_out, maxwell_solver, delta_t, field_in)

compute Ey from Bz using weak Ampere formulation

GEMPIC.compute_e_from_j!Method
compute_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!Method

computerhsfromfunction(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_productMethod
inner_product( maxwell_solver, coefs1_dofs, coefs2_dofs, degree )
  • maxwell_solver : Maxwell solver object
  • coefs1_dofs : Coefficient for each DoF
  • coefs2_dofs : Coefficient for each DoF
  • `degree : Specify the degree of the basis functions

return squared L2 norm

GEMPIC.l2norm_squaredMethod
l2norm_squared(maxwell_solver, coefs_dofs, degree)

Compute square of the L2norm

GEMPIC.l2norm_squared2Method
l2norm_squared(maxwell_solver, coefs_dofs, degree)

Compute square of the L2norm

GEMPIC.l2projection!Method
l2projection!(coefs_dofs, maxwell, func, degree)

Compute the L2 projection of a given function f on periodic splines of given degree