| t406-qfunction.c (ac415f7108a9c8d1de9a040977bf99fc30ead005) | t406-qfunction.c (f85e4a7b5ace0077fded2faa470b8becfe6fbd4e) |
|---|---|
| 1/// @file 2/// Test QFunction helper macro 3/// \test Test QFunction helper macro 4#include "t406-qfunction.h" 5 6#include <ceed.h> 7#include <math.h> 8#include <stdio.h> --- 50 unchanged lines hidden (view full) --- 59 } 60 61 // Verify results 62 { 63 const CeedScalar *v_array; 64 65 CeedVectorGetArrayRead(v, CEED_MEM_HOST, &v_array); 66 for (CeedInt i = 0; i < q; i++) { | 1/// @file 2/// Test QFunction helper macro 3/// \test Test QFunction helper macro 4#include "t406-qfunction.h" 5 6#include <ceed.h> 7#include <math.h> 8#include <stdio.h> --- 50 unchanged lines hidden (view full) --- 59 } 60 61 // Verify results 62 { 63 const CeedScalar *v_array; 64 65 CeedVectorGetArrayRead(v, CEED_MEM_HOST, &v_array); 66 for (CeedInt i = 0; i < q; i++) { |
| 67 if (fabs(5 * v_true[i] * sqrt(2.) - v_array[i]) > 1E3 * CEED_EPSILON) | 67 if (fabs(5 * v_true[i] * sqrt(2.) - v_array[i]) > 1E3 * CEED_EPSILON) { 68 // LCOV_EXCL_START |
| 68 printf("[%" CeedInt_FMT "] v_true %f != v %f\n", i, 5 * v_true[i] * sqrt(2.), v_array[i]); | 69 printf("[%" CeedInt_FMT "] v_true %f != v %f\n", i, 5 * v_true[i] * sqrt(2.), v_array[i]); |
| 70 // LCOV_EXCL_STOP 71 } |
|
| 69 } 70 CeedVectorRestoreArrayRead(v, &v_array); 71 } 72 73 CeedVectorDestroy(&w); 74 CeedVectorDestroy(&u); 75 CeedVectorDestroy(&v); 76 CeedVectorDestroy(&q_data); 77 CeedQFunctionDestroy(&qf_setup); 78 CeedQFunctionDestroy(&qf_mass); 79 CeedDestroy(&ceed); 80 return 0; 81} | 72 } 73 CeedVectorRestoreArrayRead(v, &v_array); 74 } 75 76 CeedVectorDestroy(&w); 77 CeedVectorDestroy(&u); 78 CeedVectorDestroy(&v); 79 CeedVectorDestroy(&q_data); 80 CeedQFunctionDestroy(&qf_setup); 81 CeedQFunctionDestroy(&qf_mass); 82 CeedDestroy(&ceed); 83 return 0; 84} |