Nedelec basis functions of different meshes

Hi,

  1. I am trying to reach the first-order Nedelec function for any edge of the element. I defined a basis function on any element, for example a master triangular element. Now, I want to access the basis function of any edge. For example, I want to access the basis function of the hypotenuse edge for the master triangle that I defined in the code. How can I do that?
    For master triangle:
    V_coarse = FunctionSpace(mesh_coarse, (“Nedelec 1st kind H(curl)”, 1))
    u_coarse = TrialFunction(V_coarse)
    v_coarse = TestFunction(V_coarse)

  2. I defined the Nedelec basis functions for the master triangle in the example. I also defined Nedelec basis functions for a different geometry. I want to obtain the inner product of the basis functions of my new element (9-sided finer geometry) with the basis function that I found corresponding to any side of the master triangle (obtained result from my first question).

x = np.array([[0.0, 0.0], # Vertex 0
[1.0, 0.0], # Vertex 1
[0.0, 1.0], # Vertex 2
[0.5, 0.0], # Vertex 3 (midpoint of edge 0-1)
[0.5, 0.5], # Vertex 4 (midpoint of edge 1-2)
[0.0, 0.5]]) # Vertex 5 (midpoint of edge 2-0)

cells = np.array([[0, 3, 5], # Lower left triangle
[3, 1, 4], # Lower right triangle
[3, 4, 5], # Middle triangle
[5, 4, 2]], # Top triangle
dtype=np.int32)

mesh_fine = dolfinx.mesh.create_mesh(MPI.COMM_WORLD, cells, x, domain)

After multiplying these vectors, I want to do the integration in new smaller triangles (inner product calculation on the finer geometry). I couldn’t do this with built-in functions, the functions in similar questions I found on this website seem cannot be applicable for Fenicsx, I wonder how I can do this. Shortly, I would like to ask how I can calculate the inner product of Nedelec basis functions of different meshes in any geometry.

  1. Finally, how can I reach the basis function or norm of the basis function at any point in the cell? For example, for the master triangle, how can I reach basis function norm value or corresponding total basis function at the midpoint or any point of the triangle?

Thank you very much,

Please make a reproducible example.
Your snippets doesn’t make it clear what you want to achieve.
It Seems like you want to do the following:

  1. given a cell in one mesh, evaluate the basis functions at a certain point in this mesh.
  2. combine basis functions on this grid with the basis on another grid (evaluated in the same point in physical space?)

Thank you for your answer.

My questions are:

  1. Given a cell in one mesh, evaluate the basis functions at a certain point in this mesh.

  2. I would like to calculate the inner product of two trial functions belonging to different meshes. For example, I tried to calculate the inner product of two trial functions on the domain of the second trial function. But this approach doesn’t work. I wanted to ask how I can do this.

a = ufl.inner(u_fine, v_coarse) * ufl.dx(mesh_fine)

u_fine and v_coarse are Nedelec trial functions assigned for different meshes. I want to calculate their inner product on finer mesh.