Lines Matching +full:- +full:- +full:check

1 # Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors
2 # All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
4 # SPDX-License-Identifier: BSD-2-Clause
14 import check
19 # -------------------------------------------------------------------------------
21 # -------------------------------------------------------------------------------
36 # -------------------------------------------------------------------------------
38 # -------------------------------------------------------------------------------
48 nu = nelem * (p - 1) + 1
54 x_array[i] = i / (nx - 1.0)
72 indu[p * i + j] = i * (p - 1) + j
87 os.path.join(file_dir, "test-qfunctions.h:setup_mass"))
93 os.path.join(file_dir, "test-qfunctions.h:apply_mass"))
105 op_setup.check()
111 op_mass.check()
120 # Check
125 # -------------------------------------------------------------------------------
127 # -------------------------------------------------------------------------------
137 nu = nelem * (p - 1) + 1
143 x_array[i] = i / (nx - 1.0)
161 indu[p * i + j] = i * (p - 1) + j
176 os.path.join(file_dir, "test-qfunctions.h:setup_mass"))
182 os.path.join(file_dir, "test-qfunctions.h:apply_mass"))
207 # Check
212 assert abs(total - 1.0) < TOL
214 # -------------------------------------------------------------------------------
217 # -------------------------------------------------------------------------------
227 nu = nelem * (p - 1) + 1
233 x_array[i] = i / (nx - 1.0)
251 indu[p * i + j] = 2 * (i * (p - 1) + j)
266 os.path.join(file_dir, "test-qfunctions.h:setup_mass"))
272 os.path.join(file_dir, "test-qfunctions.h:apply_mass_two"))
301 # Check
308 assert abs(total_1 - 1.0) < TOL
309 assert abs(total_2 - 2.0) < TOL
311 # -------------------------------------------------------------------------------
314 # -------------------------------------------------------------------------------
324 nu = nelem * (p - 1) + 1
330 x_array[i] = i / (nx - 1.0)
348 indu[p * i + j] = i * (p - 1) + j
363 os.path.join(file_dir, "test-qfunctions.h:setup_mass"))
369 os.path.join(file_dir, "test-qfunctions.h:apply_mass"))
394 # Check
399 assert abs(total - 1.0) < TOL
401 # -------------------------------------------------------------------------------
403 # -------------------------------------------------------------------------------
413 nu = nelem * (p - 1) + 1
429 indu[p * i + j] = i * (p - 1) + j
444 os.path.join(file_dir, "test-qfunctions.h:setup_mass"))
450 os.path.join(file_dir, "test-qfunctions.h:apply_mass"))
472 stdout, stderr, ref_stdout = check.output(capsys)
476 # -------------------------------------------------------------------------------
478 # -------------------------------------------------------------------------------
488 nu = nelem * (p - 1) + 1
494 x_array[i] = i / (nx - 1.0)
512 indu[p * i + j] = i * (p - 1) + j
527 os.path.join(file_dir, "test-qfunctions.h:setup_mass"))
533 os.path.join(file_dir, "test-qfunctions.h:apply_mass"))
559 # Check
564 assert abs(total - 1.0) < TOL
570 # Check
572 total = -nu
575 assert abs(total - 1.0) < 10. * TOL
577 # -------------------------------------------------------------------------------
579 # -------------------------------------------------------------------------------
648 os.path.join(file_dir, "test-qfunctions.h:setup_mass_2d"))
654 os.path.join(file_dir, "test-qfunctions.h:apply_mass"))
679 # Check
684 # -------------------------------------------------------------------------------
686 # -------------------------------------------------------------------------------
755 os.path.join(file_dir, "test-qfunctions.h:setup_mass_2d"))
761 os.path.join(file_dir, "test-qfunctions.h:apply_mass"))
786 # Check
791 assert abs(total - 1.0) < 10. * TOL
793 # -------------------------------------------------------------------------------
795 # -------------------------------------------------------------------------------
823 # ------------------------- Tet Elements -------------------------
871 os.path.join(file_dir, "test-qfunctions.h:setup_mass_2d"))
877 os.path.join(file_dir, "test-qfunctions.h:apply_mass"))
895 # ------------------------- Hex Elements -------------------------
924 os.path.join(file_dir, "test-qfunctions.h:setup_mass_2d"))
930 os.path.join(file_dir, "test-qfunctions.h:apply_mass"))
948 # ------------------------- Composite Operators -------------------------
964 # Check
969 # -------------------------------------------------------------------------------
971 # -------------------------------------------------------------------------------
999 # ------------------------- Tet Elements -------------------------
1047 os.path.join(file_dir, "test-qfunctions.h:setup_mass_2d"))
1053 os.path.join(file_dir, "test-qfunctions.h:apply_mass"))
1071 # ------------------------- Hex Elements -------------------------
1100 os.path.join(file_dir, "test-qfunctions.h:setup_mass_2d"))
1106 os.path.join(file_dir, "test-qfunctions.h:apply_mass"))
1124 # ------------------------- Composite Operators -------------------------
1139 # Check
1144 assert abs(total - 1.0) < 10. * TOL
1146 # -------------------------------------------------------------------------------
1148 # -------------------------------------------------------------------------------
1166 # ------------------------- Tet Elements -------------------------
1214 os.path.join(file_dir, "test-qfunctions.h:setup_mass_2d"))
1220 os.path.join(file_dir, "test-qfunctions.h:apply_mass"))
1240 # ------------------------- Hex Elements -------------------------
1270 os.path.join(file_dir, "test-qfunctions.h:setup_mass_2d"))
1276 os.path.join(file_dir, "test-qfunctions.h:apply_mass"))
1296 # ------------------------- Composite Operators -------------------------
1314 stdout, stderr, ref_stdout = check.output(capsys)
1318 # -------------------------------------------------------------------------------
1320 # -------------------------------------------------------------------------------
1348 # ------------------------- Tet Elements -------------------------
1396 os.path.join(file_dir, "test-qfunctions.h:setup_mass_2d"))
1402 os.path.join(file_dir, "test-qfunctions.h:apply_mass"))
1420 # ------------------------- Hex Elements -------------------------
1450 os.path.join(file_dir, "test-qfunctions.h:setup_mass_2d"))
1456 os.path.join(file_dir, "test-qfunctions.h:apply_mass"))
1474 # ------------------------- Composite Operators -------------------------
1489 # Check
1494 assert abs(total - 1.0) < 10. * TOL
1500 # Check
1502 total = -ndofs
1505 assert abs(total - 1.0) < 10. * TOL
1507 # -------------------------------------------------------------------------------
1509 # -------------------------------------------------------------------------------
1542 offset = col * (p - 1) + row * (nx * 2 + 1) * (p - 1)
1561 # -------------------------------------------------------------------------------
1564 # -------------------------------------------------------------------------------
1576 nu_coarse = nelem * (p_coarse - 1) + 1
1577 nu_fine = nelem * (p_fine - 1) + 1
1583 x_array[i] = i / (nx - 1.0)
1603 indu_coarse[p_coarse * i + j] = i * (p_coarse - 1) + j
1611 indu_fine[p_fine * i + j] = i * (p_fine - 1) + j
1629 os.path.join(file_dir, "test-qfunctions.h:setup_mass"))
1635 os.path.join(file_dir, "test-qfunctions.h:apply_mass_two"))
1667 # Check
1672 assert abs(total - 2.0) < 10. * TOL
1680 # Check
1685 assert abs(total - 2.0) < 10. * TOL
1690 # Check
1695 assert abs(total - 2.0) < 10. * TOL
1697 # -------------------------------------------------------------------------------
1700 # -------------------------------------------------------------------------------
1712 nu_coarse = nelem * (p_coarse - 1) + 1
1713 nu_fine = nelem * (p_fine - 1) + 1
1719 x_array[i] = i / (nx - 1.0)
1739 indu_coarse[p_coarse * i + j] = i * (p_coarse - 1) + j
1747 indu_fine[p_fine * i + j] = i * (p_fine - 1) + j
1765 os.path.join(file_dir, "test-qfunctions.h:setup_mass"))
1771 os.path.join(file_dir, "test-qfunctions.h:apply_mass_two"))
1805 # Check
1810 assert abs(total - 2.0) < TOL
1818 # Check
1823 assert abs(total - 2.0) < TOL
1828 # Check
1833 assert abs(total - 2.0) < TOL
1835 # -------------------------------------------------------------------------------
1837 # multigrid level, non-tensor basis
1838 # -------------------------------------------------------------------------------
1850 nu_coarse = nelem * (p_coarse - 1) + 1
1851 nu_fine = nelem * (p_fine - 1) + 1
1857 x_array[i] = i / (nx - 1.0)
1877 indu_coarse[p_coarse * i + j] = i * (p_coarse - 1) + j
1885 indu_fine[p_fine * i + j] = i * (p_fine - 1) + j
1934 # Check
1939 assert abs(total - 1.0) < TOL
1947 # Check
1952 assert abs(total - 1.0) < TOL
1957 # Check
1962 assert abs(total - 1.0) < TOL
1964 # -------------------------------------------------------------------------------