# Anti-periodic boundary condition

**URL:** https://community.freefem.org/t/anti-periodic-boundary-condition/2220
**Category:** General Discussion
**Created:** [January 14, 2023, 12:47am UTC](https://community.freefem.org/t/anti-periodic-boundary-condition/2220 "2023-01-14T00:47:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Banana](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@Banana](https://community.freefem.org/u/Banana)
#### Post date: [January 14, 2023, 12:47am UTC](https://community.freefem.org/t/anti-periodic-boundary-condition/2220/1 "2023-01-14T00:47:55Z")

</div>

Hi, I am new to FreeFem and I know one can impose the periodic boundary condition on, say a square, by periodic=[[2, y], [4, y], [1, x], [3, x]] but I am wondering how to impose an “anti-periodic” boundary condition, namely, what if I want to work with functions such that the function restricted on edge 2 (edge 1) is negative of the function restricted on edge 4 (edge 3). More generally, how to impose a boundary condition where (function on edge 2)=(function on edge 4)\*g(x,y) where g(x,y) is some other function defined on edge 4?

Thanks a lot!

---

<div class="post-metadata">

### Author: ![julienG](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/julieng/32/222_2.png) [@julienG](https://community.freefem.org/u/julienG)
#### Post date: [January 14, 2023, 10:42am UTC](https://community.freefem.org/t/anti-periodic-boundary-condition/2220/2 "2023-01-14T10:42:23Z")

</div>

well, I would say that anti periodicity means that your function is odd by passing through the boundary. So an odd function is zero (Dirichlet) on the boundary…

---

<div class="post-metadata">

### Author: ![yongxing](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/yongxing/32/3632_2.png) [@yongxing](https://community.freefem.org/u/yongxing)
#### Post date: [July 23, 2026, 6:21pm UTC](https://community.freefem.org/t/anti-periodic-boundary-condition/2220/3 "2026-07-23T18:21:44Z")

</div>

This is true in Euclidean space where the basis is static.
