# C1 continuity implementation in dolfinx

**URL:** <https://fenicsproject.discourse.group/t/c1-continuity-implementation-in-dolfinx/14227>\
**Category:** General\
**Created:** [April 11, 2024, 8:02pm UTC](https://fenicsproject.discourse.group/t/c1-continuity-implementation-in-dolfinx/14227 "2024-04-11T20:02:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [April 11, 2024, 9:06pm UTC](https://fenicsproject.discourse.group/t/c1-continuity-implementation-in-dolfinx/14227/2 "2024-04-11T21:06:29Z")

</div>

> [@bagla0](#):
>
> 1. For a quad mesh of topological dimension:2 (cylinder surface) in 3D space, when I perform scalar assembly:
> 
> ```auto
> dx = Measure('dx')(domain=mesh)
> dolfinx.fem.assemble_scalar(form(sum([1*dx])))
> 
> ```
> 
> what quadrature rule it takes to integrate for curved surface. Can I modify the default rule?

You can set the quadrature degree in the metadata of the measure as done in

> [@Total number of gauss point](https://fenicsproject.discourse.group/t/total-number-of-gauss-point/8904/2):
>
> The number of Gauss-points used depends on the variational form. DOLFINx uses ufl to estimate the quadrature degree of the variational form, see: This is in turn sent to [basix](https://github.com/FEniCS/basix) which tabulates at the relevant points. You can use basix directly to investigate the default quadrature of any order, see:[Creating and using a quadrature rule — Basix 0.8.0.0 documentation](https://docs.fenicsproject.org/basix/main/python/demo/demo_quadrature.py.html) You can also by-pass the basix/ufl workflow by supplying your own quadrature rule:

or

> [@Assembly timings for hexahedral elements slow](https://fenicsproject.discourse.group/t/assembly-timings-for-hexahedral-elements-slow/13783/2):
>
> You are setting the quadrature degree in the wrong place (function space), not in the measure. If you fix this: def pre\_hyperelastic\_dolfinx(mesh, \*\*kwargs): quadrature\_degree = 4 ord = 1 elemu = element("P", mesh.basix\_cell(), ord, shape=(3,)) V = functionspace( mesh, elemu, ) u = Function(V, name="u") v = TestFunction(V) du = TrialFunction(V) F = Identity(len(u)) + grad(u) C = F.T \* F Ic = tr(C) J = det(F) dx = Measure("dx", domain=…

---

_[View the full topic](https://fenicsproject.discourse.group/t/c1-continuity-implementation-in-dolfinx/14227)._
