See for instance: How to correctly assign values to mixed elements in FEniCS-X? - #3 by dokken
Using the map from a collapsed sub function to the parent space, you can assign to a subset of your vector.
Please also split your post in to pure text, and code boxes, such as
```python
import dolfinx
# Add more code here
```