if ( creal(phi[i]) < 0.0 ) i_phi [i] = 0.0;
if ( creal(phi[i]) > 1.0) i_phi [i] = 1.0;
}
for (int i=0 ; i < number_of_mesh_points ; ++i)
{
double p = creal(i_phi[i]);
double h =(3.*p*p)-(2.*p*p*p);
double dh = (6.*p) - (6.*p*p);
// *****D E B u g******
if (n == 1 )
if(p < 0.0 || p > 1.0)
cout << "______"<< p << "_____"<< dh << endl;
Printed numbers are showing a lot of fluctuation around limits eg, 1.00542, 1.0002 and -2.45829e-12.
I really have no idea why the limits are not applied for a lot of cells but my guess is that it's a problem from the CREAL function. Also I've changed the CREAL with __REAL__ but still the same problem shows up.
I would be thankful if anybody could help me with this issue.