From 24871f8c17de1c0a24309f59c1cb42bf111aa094 Mon Sep 17 00:00:00 2001 From: James E McClure Date: Sun, 2 Dec 2018 07:31:32 -0500 Subject: [PATCH] set check in mass conservation test --- tests/TestMassConservationD3Q7.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/TestMassConservationD3Q7.cpp b/tests/TestMassConservationD3Q7.cpp index 4a676502..d6f4243d 100644 --- a/tests/TestMassConservationD3Q7.cpp +++ b/tests/TestMassConservationD3Q7.cpp @@ -218,12 +218,16 @@ int main(int argc, char **argv) printf("Global mass difference A = %.5g\n",total_mass_A_1-total_mass_A_0); printf("Global mass difference B = %.5g\n",total_mass_B_1-total_mass_B_0); - FILE *OUTFILE; + if (count_negative_A > 0 ||count_negative_B > 0) CleanCheck=1; + if (fabs(total_mass_A_1-total_mass_A_0) > 1.0e-15||fabs(total_mass_B_1-total_mass_B_0) > 1.0e-15 ) CleanCheck=2; + + /* + FILE *OUTFILE; OUTFILE = fopen("error.raw","wb"); fwrite(Error,8,N,OUTFILE); fclose(OUTFILE); - /* if (rank==0) printf("Checking that the correct velocity is retained \n"); + if (rank==0) printf("Checking that the correct velocity is retained \n"); // Swap convention is observed -- velocity is negative double *Aeven,*Aodd,*Beven,*Bodd; Aeven = new double[4*N];