# Is it necessary to put boundary condition on the varf of rhs?

**URL:** https://community.freefem.org/t/is-it-necessary-to-put-boundary-condition-on-the-varf-of-rhs/1774
**Category:** General Discussion
**Created:** [May 24, 2022, 11:52am UTC](https://community.freefem.org/t/is-it-necessary-to-put-boundary-condition-on-the-varf-of-rhs/1774 "2022-05-24T11:52:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jade](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@Jade](https://community.freefem.org/u/Jade)
#### Post date: [May 24, 2022, 11:52am UTC](https://community.freefem.org/t/is-it-necessary-to-put-boundary-condition-on-the-varf-of-rhs/1774/1 "2022-05-24T11:52:12Z")

</div>

In the [Documentation](https://doc.freefem.org/tutorials/poisson.html) for the Poisson equation there are the following code snippets:

```auto
1 varf a(u,v)
2 = int2d(Th)(
3 dx(u)*dx(v)
4 + dy(u)*dy(v)
5 )
6 + on(C, u=0)
7 ;
8 matrix A = a(Vh, Vh); //stiffness matrix

```

```auto
1 varf l(unused,v)
2 = int2d(Th)(
3 f*v
4 )
5 + on(C, unused=0)
6 ;
7 Vh F;
8 F[] = l(0,Vh); //F[] is the vector associated to the function F

```

Is it necessary to put the boundary condition on both the bilinear and linear forms? I get the same solution with or without the condition on the rhs.

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [May 24, 2022, 11:55am UTC](https://community.freefem.org/t/is-it-necessary-to-put-boundary-condition-on-the-varf-of-rhs/1774/2 "2022-05-24T11:55:06Z")

</div>

It depends on the type of Dirichlet boundary value (homogeneous or not) and the `tgv` value.

---

<div class="post-metadata">

### Author: ![Jade](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@Jade](https://community.freefem.org/u/Jade)
#### Post date: [May 24, 2022, 12:27pm UTC](https://community.freefem.org/t/is-it-necessary-to-put-boundary-condition-on-the-varf-of-rhs/1774/3 "2022-05-24T12:27:14Z")

</div>

I have homogeneous BC and tgv=-1.
