if (valori=="1");{c=b; v=0;}
if (valori=="2");{c=n; v=0;}
if (valori=="3");{v=b; c=0;}
if (valori=="4");{v=n; c=0;}
What an abysmal indenting (in the whole pde),
and what a strange wishful-thinking syntax of if statements.
The above statements do probably not what you are thinking they are doing.