# Cannot align integratoin points and weights in a mesh cell

**URL:** <https://fenicsproject.discourse.group/t/cannot-align-integratoin-points-and-weights-in-a-mesh-cell/12283>\
**Category:** General\
**Created:** [September 25, 2023, 7:53am UTC](https://fenicsproject.discourse.group/t/cannot-align-integratoin-points-and-weights-in-a-mesh-cell/12283 "2023-09-25T07:53:25Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![xi\_wang](https://avatars.discourse-cdn.com/v4/letter/x/8c91f0/32.png) [@xi\_wang](https://fenicsproject.discourse.group/u/xi_wang)\
**Post date:** [September 25, 2023, 11:31am UTC](https://fenicsproject.discourse.group/t/cannot-align-integratoin-points-and-weights-in-a-mesh-cell/12283/3 "2023-09-25T11:31:21Z")

</div>

Thanks. I see that the mesh function gives two triangular elements for the square. With the following code

```auto
# fristly get the quad points
import ffc
from dolfin import *

degree=4

mesh = UnitSquareMesh(1, 1)

el = FiniteElement("Quadrature", mesh.ufl_cell(), degree=degree, quad_scheme="default")
V = FunctionSpace(mesh, el)
x = V.tabulate_dof_coordinates()

print("\n physical cel")

for cell in cells(mesh):
    print("cell",cell.index(),"cell nodes",V.dofmap().cell_dofs(cell.index()),'\n', x[V.dofmap().cell_dofs(cell.index())],'\n')

print("\nreference cel, cell name is " ,mesh.cell_name())
points, weights = ffc.fiatinterface.create_quadrature(mesh.cell_name(), degree=degree, scheme="default")
print("weights of ref cel: \n", weights)

```

I get the results:

```auto
 physical cel
cell 0 cell nodes [1 0 2 3 4 5] 
 [[0.90842379 0.09157621]
 [0.90842379 0.81684757]
 [0.18315243 0.09157621]
 [0.55405151 0.44594849]
 [0.55405151 0.10810302]
 [0.89189698 0.44594849]] 

cell 1 cell nodes [7 6 8 9 10 11] 
 [[0.09157621 0.90842379]
 [0.81684757 0.90842379]
 [0.09157621 0.18315243]
 [0.44594849 0.55405151]
 [0.10810302 0.55405151]
 [0.44594849 0.89189698]] 

reference cel, cell name is triangle
weights of ref cel: 
 [0.05497587 0.05497587 0.05497587 0.11169079 0.11169079 0.11169079]

```

Does it mean that I can multiply the weights form the ref cel accordingly with the quad points above? Do the quad points from the physical cell automatically align with the weights from the ref cell?

---

_[View the full topic](https://fenicsproject.discourse.group/t/cannot-align-integratoin-points-and-weights-in-a-mesh-cell/12283)._
