# How to implement normalization Constraint and Single Value variable in Parallel Setting?

**URL:** <https://community.freefem.org/t/how-to-implement-normalization-constraint-and-single-value-variable-in-parallel-setting/2824>\
**Category:** General Discussion\
**Created:** [December 7, 2023, 6:03am UTC](https://community.freefem.org/t/how-to-implement-normalization-constraint-and-single-value-variable-in-parallel-setting/2824 "2023-12-07T06:03:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xuanshi123](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/xuanshi123/32/1957_2.png) [@xuanshi123](https://community.freefem.org/u/xuanshi123)\
**Post date:** [December 7, 2023, 6:03am UTC](https://community.freefem.org/t/how-to-implement-normalization-constraint-and-single-value-variable-in-parallel-setting/2824/1 "2023-12-07T06:03:10Z")

</div>

![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/2/2a1658d5b23494cd920b5574187d4040f5838041.png)  
I am doing a lagrange-multipliers problem similar to what is in the page  
[https://doc.freefem.org/examples/finite-element.html#lagrange-multipliers](https://doc.freefem.org/examples/finite-element.html#lagrange-multipliers)  
but I am not sure how to set up normalization constrant and the single value variable l. Can someone show me the code piece with decomposed mesh.

---

<div class="post-metadata">

**Author:** ![xuanshi123](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/xuanshi123/32/1957_2.png) [@xuanshi123](https://community.freefem.org/u/xuanshi123)\
**Post date:** [December 7, 2023, 6:04am UTC](https://community.freefem.org/t/how-to-implement-normalization-constraint-and-single-value-variable-in-parallel-setting/2824/2 "2023-12-07T06:04:47Z")

</div>

it gives error when I throw in the single column into the Mat block matrix.

---

<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:** [December 7, 2023, 8:05am UTC](https://community.freefem.org/t/how-to-implement-normalization-constraint-and-single-value-variable-in-parallel-setting/2824/3 "2023-12-07T08:05:17Z")

</div>

Please see the example from [https://github.com/FreeFem/FreeFem-sources/blob/master/examples/hpddm/laplace-lagrange-PETSc.edp](https://github.com/FreeFem/FreeFem-sources/blob/master/examples/hpddm/laplace-lagrange-PETSc.edp).

---

<div class="post-metadata">

**Author:** ![xuanshi123](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/xuanshi123/32/1957_2.png) [@xuanshi123](https://community.freefem.org/u/xuanshi123)\
**Post date:** [December 8, 2023, 4:07am UTC](https://community.freefem.org/t/how-to-implement-normalization-constraint-and-single-value-variable-in-parallel-setting/2824/4 "2023-12-08T04:07:28Z")

</div>

thanks. Very helpful
