update morph test based on critical radius adjustment
This commit is contained in:
parent
30e0a4e24b
commit
35bea97b2e
|
@ -94,10 +94,11 @@ int main(int argc, char **argv)
|
|||
printf(" Measure the opening \n");
|
||||
sphere.MeasureObject();
|
||||
//sphere.ComputeScalar(Distance,0.f);
|
||||
printf(" Volume = %f (analytical = %f) \n", sphere.Vi,0.256*0.33333333333333*3.14159*double((Nx-2)*(Nx-2)*(Nx-2)));
|
||||
double error = fabs(sphere.Vi - 0.256*0.33333333333333*3.14159*double((Nx-2)*(Nx-2)*(Nx-2)))/ (0.256*0.33333333333333*3.14159*double((Nx-2)*(Nx-2)*(Nx-2)));
|
||||
/* Note 0.856 = (0.95)^3 */
|
||||
printf(" Volume = %f (analytical = %f) \n", sphere.Vi,0.256*0.33333333333333*0.856*3.14159*double((Nx-2)*(Nx-2)*(Nx-2)));
|
||||
double error = fabs(sphere.Vi - 0.256*0.856*0.33333333333333*3.14159*double((Nx-2)*(Nx-2)*(Nx-2)))/ (0.256*0.33333333333333*3.14159*double((Nx-2)*(Nx-2)*(Nx-2)));
|
||||
printf(" Relative error %f \n", error);
|
||||
if (error > 0.03){
|
||||
if (error > 0.05){
|
||||
toReturn = 10;
|
||||
printf("ERROR (test_morph): difference from analytical volume is too large\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user