feec.multipatch.utils_conga_2d#

Functions#

P0_phys(f_phys, P0, domain)

P1_phys(f_phys, P1, domain)

P2_phys(f_phys, P2, domain)

get_K0_and_K0_inv(V0h[, uniform_patches])

Compute the change of basis matrices K0 and K0^{-1} in V0h.

get_K1_and_K1_inv(V1h[, uniform_patches])

Compute the change of basis matrices K1 and K1^{-1} in Hcurl space V1h.

get_Vh_diags_for([v, v_ref, M_m, ...])

v, v_ref: FemField M_m: mass matrix in scipy format

get_kind([space])

ortho_proj_Hcurl(EE, V1h, domain_h, M1[, ...])

return orthogonal projection of E on V1h, given M1 the mass matrix

write_diags_to_file(diags, script_filename, ...)

write diagnostics to file

Classes#

Inheritance diagram of psydac.feec.multipatch.utils_conga_2d

DiagGrid([mappings, N_diag])

Class storing:

Details#

P0_phys(f_phys, P0, domain)[source]#
P1_phys(f_phys, P1, domain)[source]#
P2_phys(f_phys, P2, domain)[source]#
get_kind(space='V*')[source]#
get_K0_and_K0_inv(V0h, uniform_patches=False)[source]#

Compute the change of basis matrices K0 and K0^{-1} in V0h.

With K0_ij = sigma^0_i(B_j) = B_jx(n_ix) * B_jy(n_iy) where sigma_i is the geometric (interpolation) dof and B_j is the tensor-product B-spline

get_K1_and_K1_inv(V1h, uniform_patches=False)[source]#

Compute the change of basis matrices K1 and K1^{-1} in Hcurl space V1h.

With K1_ij = sigma^1_i(B_j) = int_{e_ix}(M_jx) * B_jy(n_iy) if i = horizontal edge [e_ix, n_iy] and j = (M_jx o B_jy) x-oriented MoB spline or = B_jx(n_ix) * int_{e_iy}(M_jy) if i = vertical edge [n_ix, e_iy] and j = (B_jx o M_jy) y-oriented BoM spline (above, ‘o’ denotes tensor-product for functions)

ortho_proj_Hcurl(EE, V1h, domain_h, M1, backend_language='python')[source]#

return orthogonal projection of E on V1h, given M1 the mass matrix

class DiagGrid(mappings=None, N_diag=None)[source]#

Bases: object

Class storing:
  • a diagnostic cell-centered grid

  • writing / quadrature utilities

  • a ref solution

to compare solutions from different FEM spaces on same domain

grid_vals_h1(v)[source]#
grid_vals_hcurl(v)[source]#
create_ref_fem_spaces(domain=None, ref_nc=None, ref_deg=None)[source]#
import_ref_sol_from_coeffs(sol_ref_filename=None, space='V*')[source]#
write_sol_values(v, space='V*')[source]#

v: FEM field

write_sol_ref_values(v=None, space='V*')[source]#

if no FemField v is provided, then use the self.sol_ref (must have been imported)

compute_l2_error(space='V*')[source]#
get_diags_for(v, space='V*', print_diags=True)[source]#
get_Vh_diags_for(v=None, v_ref=None, M_m=None, print_diags=True, msg='error between ?? and ?? in Vh')[source]#

v, v_ref: FemField M_m: mass matrix in scipy format

write_diags_to_file(diags, script_filename, diag_filename, params=None)[source]#

write diagnostics to file