# Varf and speed of calculations

**URL:** <https://community.freefem.org/t/varf-and-speed-of-calculations/3315>\
**Category:** General Discussion\
**Created:** [June 16, 2024, 1:15pm UTC](https://community.freefem.org/t/varf-and-speed-of-calculations/3315 "2024-06-16T13:15:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bcaval](https://avatars.discourse-cdn.com/v4/letter/b/d26b3c/32.png) [@bcaval](https://community.freefem.org/u/bcaval)\
**Post date:** [June 16, 2024, 1:15pm UTC](https://community.freefem.org/t/varf-and-speed-of-calculations/3315/1 "2024-06-16T13:15:58Z")

</div>

Dear freefem community,

For the sake of simplicity and generalization in using many freefem codes, I wonder **if it is critical or not to write only one freefem varf with many parameters that could be zero** rather than write many different codes.

For example,  
varf Myvarf(u,v) = int3d(S(v)’ _C_S(u)) + tau1 \* int3d(phi(u,v)) + tau2 \* int3d (psi(u,v)) + …  
Can I use only this varf even if tau1 = 0 and tau2 = 0 ? Or is it preferable for speed of calculations to write (here) 4 different codes (without tau1,tau2 or with tau1 or with tau2 or with tau1&tau2) ?

For my application, I write a thermopiezoelectric freefem code, but if I take into account the green-lindsay theory or Lord-Schulman, many parameters could appear.

Thanks in advance,
