# Vectorial PDE, conditions, stiffness matrix

**URL:** <https://community.freefem.org/t/vectorial-pde-conditions-stiffness-matrix/3543>\
**Category:** General Discussion\
**Created:** [October 12, 2024, 12:31pm UTC](https://community.freefem.org/t/vectorial-pde-conditions-stiffness-matrix/3543 "2024-10-12T12:31:06Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![fb77](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fb77/32/3796_2.png) [@fb77](https://community.freefem.org/u/fb77)\
**Post date:** [October 14, 2024, 6:45am UTC](https://community.freefem.org/t/vectorial-pde-conditions-stiffness-matrix/3543/4 "2024-10-14T06:45:48Z")

</div>

Hello,  
Here you can do simply as adding in your varf  
`+int2d(Th,labreg)(tgv*u*uh)`  
and a similar term for the rhs, where `labreg` is the label of your region.

If you don’t like to define region labels you can do (for the left region x\<1)

```auto
fespace Vh0(Th,P0);
Vh0 regl;
regl=(x<1. ? 1. : 0.);

```

and use  
`+int2d(Th)(tgv*u*uh*regl)`

It is not easy to handle what happens close to the interface between the regions, since usually u is in a space imposing continuity.

---

_[View the full topic](https://community.freefem.org/t/vectorial-pde-conditions-stiffness-matrix/3543)._
