Can an array of values be assigned to the source term?

I think what he means is that at some point you, the user has to decide how you want to transfer your measurement data into a suitable finite element space. This can be a continuous space, a discontinuous space, or just evaluation at the quadrature points used in your FEM formulation.

What Nate shows is one choice of transferring data from measurements to something that can be evaluated by the interpolate function in FEniCS. There are many other choices that can me made as well (Mapping 2D numpy array into dolfinx function - #4 by dokken)

For instance, if your data is voxel based, one could use

2 Likes