# Vector Basis Function

**URL:** https://fenicsproject.discourse.group/t/vector-basis-function/14250
**Category:** General
**Created:** [April 15, 2024, 6:01am UTC](https://fenicsproject.discourse.group/t/vector-basis-function/14250 "2024-04-15T06:01:34Z")
**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: [June 23, 2024, 7:40pm UTC](https://fenicsproject.discourse.group/t/vector-basis-function/14250/2 "2024-06-23T19:40:56Z")

</div>

As far as I can tell, you should use `dolfinx.fem.Expression`, which you give pre-determined points on the reference element. Then, in turn, you can evaluate this expression at the physical points in any cell by calling `dolfinx.fem.Expression.eval(mesh, numpy_array_of_cell_indices)`  
as shown in:

> [@Evaluate\_basis\_all in dolfinx](https://fenicsproject.discourse.group/t/evaluate-basis-all-in-dolfinx/3968/24):
>
> Please note that your specification of versions doesn’t make sense, as DOLFINx and FEniCSx represents the same package. Here is an updated example for v0.7.x from mpi4py import MPI import dolfinx import ufl import numpy as np domain = dolfinx.mesh.create\_unit\_square(MPI.COMM\_WORLD, 1, 1) tdim = domain.topology.dim V = dolfinx.fem.FunctionSpace(domain, ("CG", 2)) point = np.array([[0.2, 0.3, 0]]) bb = dolfinx.geometry.bb\_tree(domain, tdim) bbox\_collisions = dolfinx.geometry.compute\_collision…

---

_[View the full topic](https://fenicsproject.discourse.group/t/vector-basis-function/14250)._
