warp-lang 0.9.0__py3-none-win_amd64.whl → 0.11.0__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of warp-lang might be problematic. Click here for more details.

Files changed (315) hide show
  1. warp/__init__.py +15 -7
  2. warp/__init__.pyi +1 -0
  3. warp/bin/warp-clang.dll +0 -0
  4. warp/bin/warp.dll +0 -0
  5. warp/build.py +22 -443
  6. warp/build_dll.py +384 -0
  7. warp/builtins.py +998 -488
  8. warp/codegen.py +1307 -739
  9. warp/config.py +5 -3
  10. warp/constants.py +6 -0
  11. warp/context.py +1291 -548
  12. warp/dlpack.py +31 -31
  13. warp/fabric.py +326 -0
  14. warp/fem/__init__.py +27 -0
  15. warp/fem/cache.py +389 -0
  16. warp/fem/dirichlet.py +181 -0
  17. warp/fem/domain.py +263 -0
  18. warp/fem/field/__init__.py +101 -0
  19. warp/fem/field/field.py +149 -0
  20. warp/fem/field/nodal_field.py +299 -0
  21. warp/fem/field/restriction.py +21 -0
  22. warp/fem/field/test.py +181 -0
  23. warp/fem/field/trial.py +183 -0
  24. warp/fem/geometry/__init__.py +19 -0
  25. warp/fem/geometry/closest_point.py +70 -0
  26. warp/fem/geometry/deformed_geometry.py +271 -0
  27. warp/fem/geometry/element.py +744 -0
  28. warp/fem/geometry/geometry.py +186 -0
  29. warp/fem/geometry/grid_2d.py +373 -0
  30. warp/fem/geometry/grid_3d.py +435 -0
  31. warp/fem/geometry/hexmesh.py +953 -0
  32. warp/fem/geometry/partition.py +376 -0
  33. warp/fem/geometry/quadmesh_2d.py +532 -0
  34. warp/fem/geometry/tetmesh.py +840 -0
  35. warp/fem/geometry/trimesh_2d.py +577 -0
  36. warp/fem/integrate.py +1616 -0
  37. warp/fem/operator.py +191 -0
  38. warp/fem/polynomial.py +213 -0
  39. warp/fem/quadrature/__init__.py +2 -0
  40. warp/fem/quadrature/pic_quadrature.py +245 -0
  41. warp/fem/quadrature/quadrature.py +294 -0
  42. warp/fem/space/__init__.py +292 -0
  43. warp/fem/space/basis_space.py +489 -0
  44. warp/fem/space/collocated_function_space.py +105 -0
  45. warp/fem/space/dof_mapper.py +236 -0
  46. warp/fem/space/function_space.py +145 -0
  47. warp/fem/space/grid_2d_function_space.py +267 -0
  48. warp/fem/space/grid_3d_function_space.py +306 -0
  49. warp/fem/space/hexmesh_function_space.py +352 -0
  50. warp/fem/space/partition.py +350 -0
  51. warp/fem/space/quadmesh_2d_function_space.py +369 -0
  52. warp/fem/space/restriction.py +160 -0
  53. warp/fem/space/shape/__init__.py +15 -0
  54. warp/fem/space/shape/cube_shape_function.py +738 -0
  55. warp/fem/space/shape/shape_function.py +103 -0
  56. warp/fem/space/shape/square_shape_function.py +611 -0
  57. warp/fem/space/shape/tet_shape_function.py +567 -0
  58. warp/fem/space/shape/triangle_shape_function.py +429 -0
  59. warp/fem/space/tetmesh_function_space.py +292 -0
  60. warp/fem/space/topology.py +295 -0
  61. warp/fem/space/trimesh_2d_function_space.py +221 -0
  62. warp/fem/types.py +77 -0
  63. warp/fem/utils.py +495 -0
  64. warp/native/array.h +164 -55
  65. warp/native/builtin.h +150 -174
  66. warp/native/bvh.cpp +75 -328
  67. warp/native/bvh.cu +406 -23
  68. warp/native/bvh.h +37 -45
  69. warp/native/clang/clang.cpp +136 -24
  70. warp/native/crt.cpp +1 -76
  71. warp/native/crt.h +111 -104
  72. warp/native/cuda_crt.h +1049 -0
  73. warp/native/cuda_util.cpp +15 -3
  74. warp/native/cuda_util.h +3 -1
  75. warp/native/cutlass/tools/library/scripts/conv2d_operation.py +463 -0
  76. warp/native/cutlass/tools/library/scripts/conv3d_operation.py +321 -0
  77. warp/native/cutlass/tools/library/scripts/gemm_operation.py +988 -0
  78. warp/native/cutlass/tools/library/scripts/generator.py +4625 -0
  79. warp/native/cutlass/tools/library/scripts/library.py +799 -0
  80. warp/native/cutlass/tools/library/scripts/manifest.py +402 -0
  81. warp/native/cutlass/tools/library/scripts/pycutlass/docs/source/conf.py +96 -0
  82. warp/native/cutlass/tools/library/scripts/pycutlass/profile/conv/conv2d_f16_sm80.py +106 -0
  83. warp/native/cutlass/tools/library/scripts/pycutlass/profile/gemm/gemm_f32_sm80.py +91 -0
  84. warp/native/cutlass/tools/library/scripts/pycutlass/setup.py +80 -0
  85. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/__init__.py +48 -0
  86. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/arguments.py +118 -0
  87. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/c_types.py +241 -0
  88. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/compiler.py +432 -0
  89. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/conv2d_operation.py +631 -0
  90. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/epilogue.py +1026 -0
  91. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/frontend.py +104 -0
  92. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/gemm_operation.py +1276 -0
  93. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/library.py +744 -0
  94. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/memory_manager.py +74 -0
  95. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/operation.py +110 -0
  96. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/parser.py +619 -0
  97. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/reduction_operation.py +398 -0
  98. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/tensor_ref.py +70 -0
  99. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/test/__init__.py +4 -0
  100. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/test/conv2d_testbed.py +646 -0
  101. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/test/gemm_grouped_testbed.py +235 -0
  102. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/test/gemm_testbed.py +557 -0
  103. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/test/profiler.py +70 -0
  104. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/type_hint.py +39 -0
  105. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/utils/__init__.py +1 -0
  106. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/utils/device.py +76 -0
  107. warp/native/cutlass/tools/library/scripts/pycutlass/src/pycutlass/utils/reference_model.py +255 -0
  108. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/__init__.py +0 -0
  109. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/conv2d_dgrad_implicit_gemm_f16nhwc_f16nhwc_f16nhwc_tensor_op_f16_sm80.py +201 -0
  110. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/conv2d_dgrad_implicit_gemm_f16nhwc_f16nhwc_f32nhwc_tensor_op_f32_sm80.py +177 -0
  111. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/conv2d_dgrad_implicit_gemm_f32nhwc_f32nhwc_f32nhwc_simt_f32_sm80.py +98 -0
  112. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/conv2d_dgrad_implicit_gemm_tf32nhwc_tf32nhwc_f32nhwc_tensor_op_f32_sm80.py +95 -0
  113. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/conv2d_fprop_few_channels_f16nhwc_f16nhwc_f16nhwc_tensor_op_f32_sm80.py +163 -0
  114. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/conv2d_fprop_fixed_channels_f16nhwc_f16nhwc_f16nhwc_tensor_op_f32_sm80.py +187 -0
  115. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/conv2d_fprop_implicit_gemm_f16nhwc_f16nhwc_f16nhwc_tensor_op_f16_sm80.py +309 -0
  116. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/conv2d_fprop_implicit_gemm_f16nhwc_f16nhwc_f32nhwc_tensor_op_f32_sm80.py +54 -0
  117. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/conv2d_fprop_implicit_gemm_f32nhwc_f32nhwc_f32nhwc_simt_f32_sm80.py +96 -0
  118. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/conv2d_fprop_implicit_gemm_tf32nhwc_tf32nhwc_f32nhwc_tensor_op_f32_sm80.py +107 -0
  119. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/conv2d_strided_dgrad_implicit_gemm_f16nhwc_f16nhwc_f32nhwc_tensor_op_f32_sm80.py +253 -0
  120. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/conv2d_wgrad_implicit_gemm_f16nhwc_f16nhwc_f16nhwc_tensor_op_f16_sm80.py +97 -0
  121. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/conv2d_wgrad_implicit_gemm_f16nhwc_f16nhwc_f32nhwc_tensor_op_f32_sm80.py +242 -0
  122. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/conv2d_wgrad_implicit_gemm_f32nhwc_f32nhwc_f32nhwc_simt_f32_sm80.py +96 -0
  123. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/conv2d_wgrad_implicit_gemm_tf32nhwc_tf32nhwc_f32nhwc_tensor_op_f32_sm80.py +107 -0
  124. warp/native/cutlass/tools/library/scripts/pycutlass/test/conv/run_all_tests.py +10 -0
  125. warp/native/cutlass/tools/library/scripts/pycutlass/test/frontend/test_frontend.py +146 -0
  126. warp/native/cutlass/tools/library/scripts/pycutlass/test/gemm/__init__.py +0 -0
  127. warp/native/cutlass/tools/library/scripts/pycutlass/test/gemm/gemm_bf16_sm80.py +96 -0
  128. warp/native/cutlass/tools/library/scripts/pycutlass/test/gemm/gemm_f16_sm80.py +447 -0
  129. warp/native/cutlass/tools/library/scripts/pycutlass/test/gemm/gemm_f32_sm80.py +146 -0
  130. warp/native/cutlass/tools/library/scripts/pycutlass/test/gemm/gemm_f64_sm80.py +102 -0
  131. warp/native/cutlass/tools/library/scripts/pycutlass/test/gemm/gemm_grouped_sm80.py +203 -0
  132. warp/native/cutlass/tools/library/scripts/pycutlass/test/gemm/gemm_s8_sm80.py +229 -0
  133. warp/native/cutlass/tools/library/scripts/pycutlass/test/gemm/run_all_tests.py +9 -0
  134. warp/native/cutlass/tools/library/scripts/pycutlass/test/unit/test_sm80.py +453 -0
  135. warp/native/cutlass/tools/library/scripts/rank_2k_operation.py +398 -0
  136. warp/native/cutlass/tools/library/scripts/rank_k_operation.py +387 -0
  137. warp/native/cutlass/tools/library/scripts/rt.py +796 -0
  138. warp/native/cutlass/tools/library/scripts/symm_operation.py +400 -0
  139. warp/native/cutlass/tools/library/scripts/trmm_operation.py +407 -0
  140. warp/native/cutlass_gemm.cu +5 -3
  141. warp/native/exports.h +1240 -949
  142. warp/native/fabric.h +228 -0
  143. warp/native/hashgrid.cpp +4 -4
  144. warp/native/hashgrid.h +22 -2
  145. warp/native/initializer_array.h +2 -2
  146. warp/native/intersect.h +22 -7
  147. warp/native/intersect_adj.h +8 -8
  148. warp/native/intersect_tri.h +13 -16
  149. warp/native/marching.cu +157 -161
  150. warp/native/mat.h +119 -19
  151. warp/native/matnn.h +2 -2
  152. warp/native/mesh.cpp +108 -83
  153. warp/native/mesh.cu +243 -6
  154. warp/native/mesh.h +1547 -458
  155. warp/native/nanovdb/NanoVDB.h +1 -1
  156. warp/native/noise.h +272 -329
  157. warp/native/quat.h +51 -8
  158. warp/native/rand.h +45 -35
  159. warp/native/range.h +6 -2
  160. warp/native/reduce.cpp +157 -0
  161. warp/native/reduce.cu +348 -0
  162. warp/native/runlength_encode.cpp +62 -0
  163. warp/native/runlength_encode.cu +46 -0
  164. warp/native/scan.cu +11 -13
  165. warp/native/scan.h +1 -0
  166. warp/native/solid_angle.h +442 -0
  167. warp/native/sort.cpp +13 -0
  168. warp/native/sort.cu +9 -1
  169. warp/native/sparse.cpp +338 -0
  170. warp/native/sparse.cu +545 -0
  171. warp/native/spatial.h +2 -2
  172. warp/native/temp_buffer.h +30 -0
  173. warp/native/vec.h +126 -24
  174. warp/native/volume.h +120 -0
  175. warp/native/warp.cpp +658 -53
  176. warp/native/warp.cu +660 -68
  177. warp/native/warp.h +112 -12
  178. warp/optim/__init__.py +1 -0
  179. warp/optim/linear.py +922 -0
  180. warp/optim/sgd.py +92 -0
  181. warp/render/render_opengl.py +392 -152
  182. warp/render/render_usd.py +11 -11
  183. warp/sim/__init__.py +2 -2
  184. warp/sim/articulation.py +385 -185
  185. warp/sim/collide.py +21 -8
  186. warp/sim/import_mjcf.py +297 -106
  187. warp/sim/import_urdf.py +389 -210
  188. warp/sim/import_usd.py +198 -97
  189. warp/sim/inertia.py +17 -18
  190. warp/sim/integrator_euler.py +14 -8
  191. warp/sim/integrator_xpbd.py +161 -19
  192. warp/sim/model.py +795 -291
  193. warp/sim/optimizer.py +2 -6
  194. warp/sim/render.py +65 -3
  195. warp/sim/utils.py +3 -0
  196. warp/sparse.py +1227 -0
  197. warp/stubs.py +665 -223
  198. warp/tape.py +66 -15
  199. warp/tests/__main__.py +3 -6
  200. warp/tests/assets/curlnoise_golden.npy +0 -0
  201. warp/tests/assets/pnoise_golden.npy +0 -0
  202. warp/tests/assets/torus.usda +105 -105
  203. warp/tests/{test_class_kernel.py → aux_test_class_kernel.py} +9 -1
  204. warp/tests/aux_test_conditional_unequal_types_kernels.py +21 -0
  205. warp/tests/{test_dependent.py → aux_test_dependent.py} +2 -2
  206. warp/tests/{test_reference.py → aux_test_reference.py} +1 -1
  207. warp/tests/aux_test_unresolved_func.py +14 -0
  208. warp/tests/aux_test_unresolved_symbol.py +14 -0
  209. warp/tests/disabled_kinematics.py +239 -0
  210. warp/tests/run_coverage_serial.py +31 -0
  211. warp/tests/test_adam.py +103 -106
  212. warp/tests/test_arithmetic.py +128 -74
  213. warp/tests/test_array.py +1497 -211
  214. warp/tests/test_array_reduce.py +150 -0
  215. warp/tests/test_atomic.py +64 -28
  216. warp/tests/test_bool.py +99 -0
  217. warp/tests/test_builtins_resolution.py +1292 -0
  218. warp/tests/test_bvh.py +75 -43
  219. warp/tests/test_closest_point_edge_edge.py +54 -57
  220. warp/tests/test_codegen.py +233 -128
  221. warp/tests/test_compile_consts.py +28 -20
  222. warp/tests/test_conditional.py +108 -24
  223. warp/tests/test_copy.py +10 -12
  224. warp/tests/test_ctypes.py +112 -88
  225. warp/tests/test_dense.py +21 -14
  226. warp/tests/test_devices.py +98 -0
  227. warp/tests/test_dlpack.py +136 -108
  228. warp/tests/test_examples.py +277 -0
  229. warp/tests/test_fabricarray.py +955 -0
  230. warp/tests/test_fast_math.py +15 -11
  231. warp/tests/test_fem.py +1271 -0
  232. warp/tests/test_fp16.py +53 -19
  233. warp/tests/test_func.py +187 -74
  234. warp/tests/test_generics.py +194 -49
  235. warp/tests/test_grad.py +180 -116
  236. warp/tests/test_grad_customs.py +176 -0
  237. warp/tests/test_hash_grid.py +52 -37
  238. warp/tests/test_import.py +10 -23
  239. warp/tests/test_indexedarray.py +577 -24
  240. warp/tests/test_intersect.py +18 -9
  241. warp/tests/test_large.py +141 -0
  242. warp/tests/test_launch.py +251 -15
  243. warp/tests/test_lerp.py +64 -65
  244. warp/tests/test_linear_solvers.py +154 -0
  245. warp/tests/test_lvalue.py +493 -0
  246. warp/tests/test_marching_cubes.py +12 -13
  247. warp/tests/test_mat.py +508 -2778
  248. warp/tests/test_mat_lite.py +115 -0
  249. warp/tests/test_mat_scalar_ops.py +2889 -0
  250. warp/tests/test_math.py +103 -9
  251. warp/tests/test_matmul.py +305 -69
  252. warp/tests/test_matmul_lite.py +410 -0
  253. warp/tests/test_mesh.py +71 -14
  254. warp/tests/test_mesh_query_aabb.py +41 -25
  255. warp/tests/test_mesh_query_point.py +325 -34
  256. warp/tests/test_mesh_query_ray.py +39 -22
  257. warp/tests/test_mlp.py +30 -22
  258. warp/tests/test_model.py +92 -89
  259. warp/tests/test_modules_lite.py +39 -0
  260. warp/tests/test_multigpu.py +88 -114
  261. warp/tests/test_noise.py +12 -11
  262. warp/tests/test_operators.py +16 -20
  263. warp/tests/test_options.py +11 -11
  264. warp/tests/test_pinned.py +17 -18
  265. warp/tests/test_print.py +32 -11
  266. warp/tests/test_quat.py +275 -129
  267. warp/tests/test_rand.py +18 -16
  268. warp/tests/test_reload.py +38 -34
  269. warp/tests/test_rounding.py +50 -43
  270. warp/tests/test_runlength_encode.py +190 -0
  271. warp/tests/test_smoothstep.py +9 -11
  272. warp/tests/test_snippet.py +143 -0
  273. warp/tests/test_sparse.py +460 -0
  274. warp/tests/test_spatial.py +276 -243
  275. warp/tests/test_streams.py +110 -85
  276. warp/tests/test_struct.py +331 -85
  277. warp/tests/test_tape.py +39 -21
  278. warp/tests/test_torch.py +118 -89
  279. warp/tests/test_transient_module.py +12 -13
  280. warp/tests/test_types.py +614 -0
  281. warp/tests/test_utils.py +494 -0
  282. warp/tests/test_vec.py +354 -1987
  283. warp/tests/test_vec_lite.py +73 -0
  284. warp/tests/test_vec_scalar_ops.py +2099 -0
  285. warp/tests/test_volume.py +457 -293
  286. warp/tests/test_volume_write.py +124 -134
  287. warp/tests/unittest_serial.py +35 -0
  288. warp/tests/unittest_suites.py +341 -0
  289. warp/tests/unittest_utils.py +568 -0
  290. warp/tests/unused_test_misc.py +71 -0
  291. warp/tests/{test_debug.py → walkthough_debug.py} +3 -17
  292. warp/thirdparty/appdirs.py +36 -45
  293. warp/thirdparty/unittest_parallel.py +549 -0
  294. warp/torch.py +72 -30
  295. warp/types.py +1744 -713
  296. warp/utils.py +360 -350
  297. warp_lang-0.11.0.dist-info/LICENSE.md +36 -0
  298. warp_lang-0.11.0.dist-info/METADATA +238 -0
  299. warp_lang-0.11.0.dist-info/RECORD +332 -0
  300. {warp_lang-0.9.0.dist-info → warp_lang-0.11.0.dist-info}/WHEEL +1 -1
  301. warp/bin/warp-clang.exp +0 -0
  302. warp/bin/warp-clang.lib +0 -0
  303. warp/bin/warp.exp +0 -0
  304. warp/bin/warp.lib +0 -0
  305. warp/tests/test_all.py +0 -215
  306. warp/tests/test_array_scan.py +0 -60
  307. warp/tests/test_base.py +0 -208
  308. warp/tests/test_unresolved_func.py +0 -7
  309. warp/tests/test_unresolved_symbol.py +0 -7
  310. warp_lang-0.9.0.dist-info/METADATA +0 -20
  311. warp_lang-0.9.0.dist-info/RECORD +0 -177
  312. /warp/tests/{test_compile_consts_dummy.py → aux_test_compile_consts_dummy.py} +0 -0
  313. /warp/tests/{test_reference_reference.py → aux_test_reference_reference.py} +0 -0
  314. /warp/tests/{test_square.py → aux_test_square.py} +0 -0
  315. {warp_lang-0.9.0.dist-info → warp_lang-0.11.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,744 @@
1
+ from typing import Tuple, List
2
+
3
+ from warp.fem.types import Coords
4
+ from warp.fem.polynomial import Polynomial, quadrature_1d
5
+
6
+
7
+ class Element:
8
+ def measure() -> float:
9
+ """Measure (area, volume, ...) of the reference element"""
10
+ raise NotImplementedError
11
+
12
+ @staticmethod
13
+ def instantiate_quadrature(order: int, family: Polynomial) -> Tuple[List[Coords], List[float]]:
14
+ """Returns a quadrature of a given order for a prototypical element"""
15
+ raise NotImplementedError
16
+
17
+
18
+ def _point_count_from_order(order: int, family: Polynomial):
19
+ if family == Polynomial.GAUSS_LEGENDRE:
20
+ point_count = max(1, order // 2 + 1)
21
+ elif family == Polynomial.LOBATTO_GAUSS_LEGENDRE:
22
+ point_count = max(2, order // 2 + 2)
23
+ elif family == Polynomial.EQUISPACED_CLOSED:
24
+ point_count = max(2, 2 * (order // 2) + 1)
25
+ elif family == Polynomial.EQUISPACED_OPEN:
26
+ point_count = max(1, 2 * (order // 2) + 1)
27
+
28
+ return point_count
29
+
30
+
31
+ class Cube(Element):
32
+ @staticmethod
33
+ def measure() -> float:
34
+ return 1.0
35
+
36
+ @staticmethod
37
+ def instantiate_quadrature(order: int, family: Polynomial):
38
+ if family is None:
39
+ family = Polynomial.GAUSS_LEGENDRE
40
+
41
+ point_count = _point_count_from_order(order=order, family=family)
42
+ gauss_1d, weights_1d = quadrature_1d(point_count=point_count, family=family)
43
+
44
+ coords = [Coords(x, y, z) for x in gauss_1d for y in gauss_1d for z in gauss_1d]
45
+ weights = [wx * wy * wz for wx in weights_1d for wy in weights_1d for wz in weights_1d]
46
+
47
+ return coords, weights
48
+
49
+
50
+ class Square(Element):
51
+ @staticmethod
52
+ def measure() -> float:
53
+ return 1.0
54
+
55
+ @staticmethod
56
+ def instantiate_quadrature(order: int, family: Polynomial):
57
+ if family is None:
58
+ family = Polynomial.GAUSS_LEGENDRE
59
+
60
+ point_count = _point_count_from_order(order=order, family=family)
61
+ gauss_1d, weights_1d = quadrature_1d(point_count=point_count, family=family)
62
+
63
+ coords = [Coords(x, y, 0.0) for x in gauss_1d for y in gauss_1d]
64
+ weights = [wx * wy for wx in weights_1d for wy in weights_1d]
65
+
66
+ return coords, weights
67
+
68
+
69
+ class LinearEdge(Element):
70
+ @staticmethod
71
+ def measure() -> float:
72
+ return 1.0
73
+
74
+ @staticmethod
75
+ def instantiate_quadrature(order: int, family: Polynomial):
76
+ if family is None:
77
+ family = Polynomial.GAUSS_LEGENDRE
78
+
79
+ point_count = _point_count_from_order(order=order, family=family)
80
+ gauss_1d, weights_1d = quadrature_1d(point_count=point_count, family=family)
81
+
82
+ coords = [Coords(x, 0.0, 0.0) for x in gauss_1d]
83
+ return coords, weights_1d
84
+
85
+
86
+ class Triangle(Element):
87
+ @staticmethod
88
+ def measure() -> float:
89
+ return 0.5
90
+
91
+ @staticmethod
92
+ def instantiate_quadrature(order: int, family: Polynomial):
93
+ if family is not None:
94
+ # Duffy transformation from square to triangle
95
+ point_count = _point_count_from_order(order=order + 1, family=family)
96
+ gauss_1d, weights_1d = quadrature_1d(point_count=point_count, family=family)
97
+
98
+ coords = [Coords(1.0 - x - y + x * y, x, y * (1.0 - x)) for x in gauss_1d for y in gauss_1d]
99
+
100
+ # Scale weight by 2.0 so that they sum up to 1
101
+ weights = [2.0 * wx * (1.0 - x) * wy for x, wx in zip(gauss_1d, weights_1d) for wy in weights_1d]
102
+
103
+ return coords, weights
104
+
105
+ if order <= 1:
106
+ weights = [1.0]
107
+ coords = [Coords(1.0 / 3.0, 1.0 / 3.0, 1.0 / 3.0)]
108
+ elif order <= 2:
109
+ weights = [1.0 / 3.0, 1.0 / 3.0, 1.0 / 3.0]
110
+ coords = [
111
+ Coords(2.0 / 3.0, 1.0 / 6.0, 1.0 / 6.0),
112
+ Coords(1.0 / 6.0, 2.0 / 3.0, 1.0 / 6.0),
113
+ Coords(1.0 / 6.0, 1.0 / 6.0, 2.0 / 3.0),
114
+ ]
115
+ elif order <= 3:
116
+ # Hillion 1977,
117
+ # "Numerical Integration on a Triangle"
118
+ weights = [
119
+ 3.18041381743977225049491153185954e-01,
120
+ 3.18041381743977225049491153185954e-01,
121
+ 1.81958618256022719439357615556219e-01,
122
+ 1.81958618256022719439357615556219e-01,
123
+ ]
124
+
125
+ coords = [
126
+ Coords(
127
+ 6.66390246014701426169324349757517e-01,
128
+ 1.78558728263616461884311092944699e-01,
129
+ 1.55051025721682111946364557297784e-01,
130
+ ),
131
+ Coords(
132
+ 1.78558728263616461884311092944699e-01,
133
+ 6.66390246014701426169324349757517e-01,
134
+ 1.55051025721682056435213326039957e-01,
135
+ ),
136
+ Coords(
137
+ 2.80019915499074012465996474929852e-01,
138
+ 7.50311102226081383381739442484104e-02,
139
+ 6.44948974278317876951405196450651e-01,
140
+ ),
141
+ Coords(
142
+ 7.50311102226081383381739442484104e-02,
143
+ 2.80019915499074012465996474929852e-01,
144
+ 6.44948974278317876951405196450651e-01,
145
+ ),
146
+ ]
147
+ elif order <= 4:
148
+ # Witherden and Vincent 2015,
149
+ # "On the identification of symmetric quadrature rules for finite element methods"
150
+ # https://doi.org/10.1016/j.camwa.2015.03.017
151
+
152
+ weights = [
153
+ 2.23381589678011471811203136894619e-01,
154
+ 2.23381589678011471811203136894619e-01,
155
+ 2.23381589678011471811203136894619e-01,
156
+ 1.09951743655321870773988734981685e-01,
157
+ 1.09951743655321870773988734981685e-01,
158
+ 1.09951743655321870773988734981685e-01,
159
+ ]
160
+
161
+ coords = [
162
+ Coords(
163
+ 4.45948490915964890213274429697776e-01,
164
+ 4.45948490915964890213274429697776e-01,
165
+ 1.08103018168070219573451140604448e-01,
166
+ ),
167
+ Coords(
168
+ 4.45948490915964890213274429697776e-01,
169
+ 1.08103018168070219573451140604448e-01,
170
+ 4.45948490915964890213274429697776e-01,
171
+ ),
172
+ Coords(
173
+ 1.08103018168070219573451140604448e-01,
174
+ 4.45948490915964890213274429697776e-01,
175
+ 4.45948490915964890213274429697776e-01,
176
+ ),
177
+ Coords(
178
+ 9.15762135097707430375635340169538e-02,
179
+ 9.15762135097707430375635340169538e-02,
180
+ 8.16847572980458513924872931966092e-01,
181
+ ),
182
+ Coords(
183
+ 9.15762135097707430375635340169538e-02,
184
+ 8.16847572980458513924872931966092e-01,
185
+ 9.15762135097707430375635340169538e-02,
186
+ ),
187
+ Coords(
188
+ 8.16847572980458513924872931966092e-01,
189
+ 9.15762135097707430375635340169538e-02,
190
+ 9.15762135097707430375635340169538e-02,
191
+ ),
192
+ ]
193
+
194
+ elif order <= 5:
195
+ weights = [
196
+ 2.25000000000000005551115123125783e-01,
197
+ 1.25939180544827139529573400977824e-01,
198
+ 1.25939180544827139529573400977824e-01,
199
+ 1.25939180544827139529573400977824e-01,
200
+ 1.32394152788506191953388224646915e-01,
201
+ 1.32394152788506191953388224646915e-01,
202
+ 1.32394152788506191953388224646915e-01,
203
+ ]
204
+
205
+ coords = [
206
+ Coords(
207
+ 3.33333333333333314829616256247391e-01,
208
+ 3.33333333333333314829616256247391e-01,
209
+ 3.33333333333333314829616256247391e-01,
210
+ ),
211
+ Coords(
212
+ 1.01286507323456342888334802410100e-01,
213
+ 1.01286507323456342888334802410100e-01,
214
+ 7.97426985353087314223330395179801e-01,
215
+ ),
216
+ Coords(
217
+ 1.01286507323456342888334802410100e-01,
218
+ 7.97426985353087314223330395179801e-01,
219
+ 1.01286507323456342888334802410100e-01,
220
+ ),
221
+ Coords(
222
+ 7.97426985353087314223330395179801e-01,
223
+ 1.01286507323456342888334802410100e-01,
224
+ 1.01286507323456342888334802410100e-01,
225
+ ),
226
+ Coords(
227
+ 4.70142064105115109473587153843255e-01,
228
+ 4.70142064105115109473587153843255e-01,
229
+ 5.97158717897697810528256923134904e-02,
230
+ ),
231
+ Coords(
232
+ 4.70142064105115109473587153843255e-01,
233
+ 5.97158717897697810528256923134904e-02,
234
+ 4.70142064105115109473587153843255e-01,
235
+ ),
236
+ Coords(
237
+ 5.97158717897697810528256923134904e-02,
238
+ 4.70142064105115109473587153843255e-01,
239
+ 4.70142064105115109473587153843255e-01,
240
+ ),
241
+ ]
242
+ elif order <= 6:
243
+ weights = [
244
+ 5.08449063702068326797700592578622e-02,
245
+ 5.08449063702068326797700592578622e-02,
246
+ 5.08449063702068326797700592578622e-02,
247
+ 1.16786275726379396022736045779311e-01,
248
+ 1.16786275726379396022736045779311e-01,
249
+ 1.16786275726379396022736045779311e-01,
250
+ 8.28510756183735846969184990484791e-02,
251
+ 8.28510756183735846969184990484791e-02,
252
+ 8.28510756183735846969184990484791e-02,
253
+ 8.28510756183735846969184990484791e-02,
254
+ 8.28510756183735846969184990484791e-02,
255
+ 8.28510756183735846969184990484791e-02,
256
+ ]
257
+
258
+ coords = [
259
+ Coords(
260
+ 6.30890144915022266225435032538371e-02,
261
+ 6.30890144915022266225435032538371e-02,
262
+ 8.73821971016995546754912993492326e-01,
263
+ ),
264
+ Coords(
265
+ 6.30890144915022266225435032538371e-02,
266
+ 8.73821971016995546754912993492326e-01,
267
+ 6.30890144915022266225435032538371e-02,
268
+ ),
269
+ Coords(
270
+ 8.73821971016995546754912993492326e-01,
271
+ 6.30890144915022266225435032538371e-02,
272
+ 6.30890144915022266225435032538371e-02,
273
+ ),
274
+ Coords(
275
+ 2.49286745170910428726074314909056e-01,
276
+ 2.49286745170910428726074314909056e-01,
277
+ 5.01426509658179142547851370181888e-01,
278
+ ),
279
+ Coords(
280
+ 2.49286745170910428726074314909056e-01,
281
+ 5.01426509658179142547851370181888e-01,
282
+ 2.49286745170910428726074314909056e-01,
283
+ ),
284
+ Coords(
285
+ 5.01426509658179142547851370181888e-01,
286
+ 2.49286745170910428726074314909056e-01,
287
+ 2.49286745170910428726074314909056e-01,
288
+ ),
289
+ Coords(
290
+ 5.31450498448169383891581674106419e-02,
291
+ 3.10352451033784393352732422499685e-01,
292
+ 6.36502499121398668258109410089673e-01,
293
+ ),
294
+ Coords(
295
+ 5.31450498448169383891581674106419e-02,
296
+ 6.36502499121398668258109410089673e-01,
297
+ 3.10352451033784393352732422499685e-01,
298
+ ),
299
+ Coords(
300
+ 3.10352451033784393352732422499685e-01,
301
+ 5.31450498448169383891581674106419e-02,
302
+ 6.36502499121398668258109410089673e-01,
303
+ ),
304
+ Coords(
305
+ 3.10352451033784393352732422499685e-01,
306
+ 6.36502499121398668258109410089673e-01,
307
+ 5.31450498448169383891581674106419e-02,
308
+ ),
309
+ Coords(
310
+ 6.36502499121398668258109410089673e-01,
311
+ 5.31450498448169383891581674106419e-02,
312
+ 3.10352451033784393352732422499685e-01,
313
+ ),
314
+ Coords(
315
+ 6.36502499121398668258109410089673e-01,
316
+ 3.10352451033784393352732422499685e-01,
317
+ 5.31450498448169383891581674106419e-02,
318
+ ),
319
+ ]
320
+ else:
321
+ # Order 8
322
+
323
+ weights = [
324
+ 1.44315607677787172136163462710101e-01,
325
+ 9.50916342672846193195823616406415e-02,
326
+ 9.50916342672846193195823616406415e-02,
327
+ 9.50916342672846193195823616406415e-02,
328
+ 1.03217370534718244634575512463925e-01,
329
+ 1.03217370534718244634575512463925e-01,
330
+ 1.03217370534718244634575512463925e-01,
331
+ 3.24584976231980792960030157701112e-02,
332
+ 3.24584976231980792960030157701112e-02,
333
+ 3.24584976231980792960030157701112e-02,
334
+ 2.72303141744349927466650740370824e-02,
335
+ 2.72303141744349927466650740370824e-02,
336
+ 2.72303141744349927466650740370824e-02,
337
+ 2.72303141744349927466650740370824e-02,
338
+ 2.72303141744349927466650740370824e-02,
339
+ 2.72303141744349927466650740370824e-02,
340
+ ]
341
+
342
+ coords = [
343
+ Coords(
344
+ 3.33333333333333314829616256247391e-01,
345
+ 3.33333333333333314829616256247391e-01,
346
+ 3.33333333333333314829616256247391e-01,
347
+ ),
348
+ Coords(
349
+ 4.59292588292723125142913431773195e-01,
350
+ 4.59292588292723125142913431773195e-01,
351
+ 8.14148234145537497141731364536099e-02,
352
+ ),
353
+ Coords(
354
+ 4.59292588292723125142913431773195e-01,
355
+ 8.14148234145537497141731364536099e-02,
356
+ 4.59292588292723125142913431773195e-01,
357
+ ),
358
+ Coords(
359
+ 8.14148234145537497141731364536099e-02,
360
+ 4.59292588292723125142913431773195e-01,
361
+ 4.59292588292723125142913431773195e-01,
362
+ ),
363
+ Coords(
364
+ 1.70569307751760212976677166807349e-01,
365
+ 1.70569307751760212976677166807349e-01,
366
+ 6.58861384496479574046645666385302e-01,
367
+ ),
368
+ Coords(
369
+ 1.70569307751760212976677166807349e-01,
370
+ 6.58861384496479574046645666385302e-01,
371
+ 1.70569307751760212976677166807349e-01,
372
+ ),
373
+ Coords(
374
+ 6.58861384496479574046645666385302e-01,
375
+ 1.70569307751760212976677166807349e-01,
376
+ 1.70569307751760212976677166807349e-01,
377
+ ),
378
+ Coords(
379
+ 5.05472283170309566457945038564503e-02,
380
+ 5.05472283170309566457945038564503e-02,
381
+ 8.98905543365938086708410992287099e-01,
382
+ ),
383
+ Coords(
384
+ 5.05472283170309566457945038564503e-02,
385
+ 8.98905543365938086708410992287099e-01,
386
+ 5.05472283170309566457945038564503e-02,
387
+ ),
388
+ Coords(
389
+ 8.98905543365938086708410992287099e-01,
390
+ 5.05472283170309566457945038564503e-02,
391
+ 5.05472283170309566457945038564503e-02,
392
+ ),
393
+ Coords(
394
+ 8.39477740995758781039626228448469e-03,
395
+ 2.63112829634638112352718053443823e-01,
396
+ 7.28492392955404355348036915529519e-01,
397
+ ),
398
+ Coords(
399
+ 8.39477740995758781039626228448469e-03,
400
+ 7.28492392955404355348036915529519e-01,
401
+ 2.63112829634638112352718053443823e-01,
402
+ ),
403
+ Coords(
404
+ 2.63112829634638112352718053443823e-01,
405
+ 8.39477740995758781039626228448469e-03,
406
+ 7.28492392955404355348036915529519e-01,
407
+ ),
408
+ Coords(
409
+ 2.63112829634638112352718053443823e-01,
410
+ 7.28492392955404355348036915529519e-01,
411
+ 8.39477740995758781039626228448469e-03,
412
+ ),
413
+ Coords(
414
+ 7.28492392955404355348036915529519e-01,
415
+ 8.39477740995758781039626228448469e-03,
416
+ 2.63112829634638112352718053443823e-01,
417
+ ),
418
+ Coords(
419
+ 7.28492392955404355348036915529519e-01,
420
+ 2.63112829634638112352718053443823e-01,
421
+ 8.39477740995758781039626228448469e-03,
422
+ ),
423
+ ]
424
+
425
+ return coords, weights
426
+
427
+
428
+ class Tetrahedron(Element):
429
+ @staticmethod
430
+ def measure() -> float:
431
+ return 1.0 / 6.0
432
+
433
+ @staticmethod
434
+ def instantiate_quadrature(order: int, family: Polynomial):
435
+ if family is not None:
436
+ # Duffy transformation from square to triangle
437
+ point_count = _point_count_from_order(order=order + 1, family=family)
438
+ gauss_1d, weights_1d = quadrature_1d(point_count=point_count, family=family)
439
+
440
+ coords = [
441
+ Coords(x, y * (1.0 - x), z * (1.0 - x) * (1.0 - y))
442
+ for x in gauss_1d
443
+ for y in gauss_1d
444
+ for z in gauss_1d
445
+ ]
446
+
447
+ # Scale weight by 6.0 so that they sum up to 1
448
+ weights = [
449
+ 6.0 * wx * wy * wz * (1.0 - x) * (1.0 - x) * (1.0 - y)
450
+ for x, wx in zip(gauss_1d, weights_1d)
451
+ for y, wy in zip(gauss_1d, weights_1d)
452
+ for wz in weights_1d
453
+ ]
454
+
455
+ return coords, weights
456
+
457
+ # Shunn and Ham 2012
458
+ # "Symmetric quadrature rules for tetrahedra based on a cubic close-packed lattice arrangement"
459
+ # https://doi.org/10.1016/j.cam.2012.03.032
460
+
461
+ # TODO: add Witherden and Vincent 2015,
462
+
463
+ if order <= 1:
464
+ weights = [1.0]
465
+ coords = [Coords(1.0 / 4.0, 1.0 / 4.0, 1.0 / 4.0)]
466
+ elif order <= 2:
467
+ weights = [1.0 / 4.0, 1.0 / 4.0, 1.0 / 4.0, 1.0 / 4.0]
468
+ coords = [
469
+ Coords(0.1381966011250110, 0.1381966011250110, 0.1381966011250110),
470
+ Coords(0.5854101966249680, 0.1381966011250110, 0.1381966011250110),
471
+ Coords(0.1381966011250110, 0.5854101966249680, 0.1381966011250110),
472
+ Coords(0.1381966011250110, 0.1381966011250110, 0.5854101966249680),
473
+ ]
474
+ elif order <= 3:
475
+ weights = [
476
+ 0.0476331348432089,
477
+ 0.0476331348432089,
478
+ 0.0476331348432089,
479
+ 0.0476331348432089,
480
+ 0.1349112434378610,
481
+ 0.1349112434378610,
482
+ 0.1349112434378610,
483
+ 0.1349112434378610,
484
+ 0.1349112434378610,
485
+ 0.1349112434378610,
486
+ ]
487
+
488
+ coords = [
489
+ Coords(0.0738349017262234, 0.0738349017262234, 0.0738349017262234),
490
+ Coords(0.7784952948213300, 0.0738349017262234, 0.0738349017262234),
491
+ Coords(0.0738349017262234, 0.7784952948213300, 0.0738349017262234),
492
+ Coords(0.0738349017262234, 0.0738349017262234, 0.7784952948213300),
493
+ Coords(0.4062443438840510, 0.0937556561159491, 0.0937556561159491),
494
+ Coords(0.0937556561159491, 0.4062443438840510, 0.0937556561159491),
495
+ Coords(0.0937556561159491, 0.0937556561159491, 0.4062443438840510),
496
+ Coords(0.4062443438840510, 0.4062443438840510, 0.0937556561159491),
497
+ Coords(0.4062443438840510, 0.0937556561159491, 0.4062443438840510),
498
+ Coords(0.0937556561159491, 0.4062443438840510, 0.4062443438840510),
499
+ ]
500
+ elif order <= 4:
501
+ weights = [
502
+ 0.0070670747944695,
503
+ 0.0070670747944695,
504
+ 0.0070670747944695,
505
+ 0.0070670747944695,
506
+ 0.0469986689718877,
507
+ 0.0469986689718877,
508
+ 0.0469986689718877,
509
+ 0.0469986689718877,
510
+ 0.0469986689718877,
511
+ 0.0469986689718877,
512
+ 0.0469986689718877,
513
+ 0.0469986689718877,
514
+ 0.0469986689718877,
515
+ 0.0469986689718877,
516
+ 0.0469986689718877,
517
+ 0.0469986689718877,
518
+ 0.1019369182898680,
519
+ 0.1019369182898680,
520
+ 0.1019369182898680,
521
+ 0.1019369182898680,
522
+ ]
523
+
524
+ coords = [
525
+ Coords(0.0323525947272439, 0.0323525947272439, 0.0323525947272439),
526
+ Coords(0.9029422158182680, 0.0323525947272439, 0.0323525947272439),
527
+ Coords(0.0323525947272439, 0.9029422158182680, 0.0323525947272439),
528
+ Coords(0.0323525947272439, 0.0323525947272439, 0.9029422158182680),
529
+ Coords(0.6165965330619370, 0.0603604415251421, 0.0603604415251421),
530
+ Coords(0.2626825838877790, 0.0603604415251421, 0.0603604415251421),
531
+ Coords(0.0603604415251421, 0.6165965330619370, 0.0603604415251421),
532
+ Coords(0.0603604415251421, 0.2626825838877790, 0.0603604415251421),
533
+ Coords(0.0603604415251421, 0.0603604415251421, 0.6165965330619370),
534
+ Coords(0.0603604415251421, 0.0603604415251421, 0.2626825838877790),
535
+ Coords(0.2626825838877790, 0.6165965330619370, 0.0603604415251421),
536
+ Coords(0.6165965330619370, 0.2626825838877790, 0.0603604415251421),
537
+ Coords(0.2626825838877790, 0.0603604415251421, 0.6165965330619370),
538
+ Coords(0.6165965330619370, 0.0603604415251421, 0.2626825838877790),
539
+ Coords(0.0603604415251421, 0.2626825838877790, 0.6165965330619370),
540
+ Coords(0.0603604415251421, 0.6165965330619370, 0.2626825838877790),
541
+ Coords(0.3097693042728620, 0.3097693042728620, 0.0706920871814129),
542
+ Coords(0.3097693042728620, 0.0706920871814129, 0.3097693042728620),
543
+ Coords(0.0706920871814129, 0.3097693042728620, 0.3097693042728620),
544
+ Coords(0.3097693042728620, 0.3097693042728620, 0.3097693042728620),
545
+ ]
546
+
547
+ elif order <= 5:
548
+ weights = [
549
+ 0.0021900463965388,
550
+ 0.0021900463965388,
551
+ 0.0021900463965388,
552
+ 0.0021900463965388,
553
+ 0.0143395670177665,
554
+ 0.0143395670177665,
555
+ 0.0143395670177665,
556
+ 0.0143395670177665,
557
+ 0.0143395670177665,
558
+ 0.0143395670177665,
559
+ 0.0143395670177665,
560
+ 0.0143395670177665,
561
+ 0.0143395670177665,
562
+ 0.0143395670177665,
563
+ 0.0143395670177665,
564
+ 0.0143395670177665,
565
+ 0.0250305395686746,
566
+ 0.0250305395686746,
567
+ 0.0250305395686746,
568
+ 0.0250305395686746,
569
+ 0.0250305395686746,
570
+ 0.0250305395686746,
571
+ 0.0479839333057554,
572
+ 0.0479839333057554,
573
+ 0.0479839333057554,
574
+ 0.0479839333057554,
575
+ 0.0479839333057554,
576
+ 0.0479839333057554,
577
+ 0.0479839333057554,
578
+ 0.0479839333057554,
579
+ 0.0479839333057554,
580
+ 0.0479839333057554,
581
+ 0.0479839333057554,
582
+ 0.0479839333057554,
583
+ 0.0931745731195340,
584
+ ]
585
+
586
+ coords = [
587
+ Coords(0.0267367755543735, 0.0267367755543735, 0.0267367755543735),
588
+ Coords(0.9197896733368800, 0.0267367755543735, 0.0267367755543735),
589
+ Coords(0.0267367755543735, 0.9197896733368800, 0.0267367755543735),
590
+ Coords(0.0267367755543735, 0.0267367755543735, 0.9197896733368800),
591
+ Coords(0.7477598884818090, 0.0391022406356488, 0.0391022406356488),
592
+ Coords(0.1740356302468940, 0.0391022406356488, 0.0391022406356488),
593
+ Coords(0.0391022406356488, 0.7477598884818090, 0.0391022406356488),
594
+ Coords(0.0391022406356488, 0.1740356302468940, 0.0391022406356488),
595
+ Coords(0.0391022406356488, 0.0391022406356488, 0.7477598884818090),
596
+ Coords(0.0391022406356488, 0.0391022406356488, 0.1740356302468940),
597
+ Coords(0.1740356302468940, 0.7477598884818090, 0.0391022406356488),
598
+ Coords(0.7477598884818090, 0.1740356302468940, 0.0391022406356488),
599
+ Coords(0.1740356302468940, 0.0391022406356488, 0.7477598884818090),
600
+ Coords(0.7477598884818090, 0.0391022406356488, 0.1740356302468940),
601
+ Coords(0.0391022406356488, 0.1740356302468940, 0.7477598884818090),
602
+ Coords(0.0391022406356488, 0.7477598884818090, 0.1740356302468940),
603
+ Coords(0.4547545999844830, 0.0452454000155172, 0.0452454000155172),
604
+ Coords(0.0452454000155172, 0.4547545999844830, 0.0452454000155172),
605
+ Coords(0.0452454000155172, 0.0452454000155172, 0.4547545999844830),
606
+ Coords(0.4547545999844830, 0.4547545999844830, 0.0452454000155172),
607
+ Coords(0.4547545999844830, 0.0452454000155172, 0.4547545999844830),
608
+ Coords(0.0452454000155172, 0.4547545999844830, 0.4547545999844830),
609
+ Coords(0.2232010379623150, 0.2232010379623150, 0.0504792790607720),
610
+ Coords(0.5031186450145980, 0.2232010379623150, 0.0504792790607720),
611
+ Coords(0.2232010379623150, 0.5031186450145980, 0.0504792790607720),
612
+ Coords(0.2232010379623150, 0.0504792790607720, 0.2232010379623150),
613
+ Coords(0.5031186450145980, 0.0504792790607720, 0.2232010379623150),
614
+ Coords(0.2232010379623150, 0.0504792790607720, 0.5031186450145980),
615
+ Coords(0.0504792790607720, 0.2232010379623150, 0.2232010379623150),
616
+ Coords(0.0504792790607720, 0.5031186450145980, 0.2232010379623150),
617
+ Coords(0.0504792790607720, 0.2232010379623150, 0.5031186450145980),
618
+ Coords(0.5031186450145980, 0.2232010379623150, 0.2232010379623150),
619
+ Coords(0.2232010379623150, 0.5031186450145980, 0.2232010379623150),
620
+ Coords(0.2232010379623150, 0.2232010379623150, 0.5031186450145980),
621
+ Coords(0.2500000000000000, 0.2500000000000000, 0.2500000000000000),
622
+ ]
623
+ elif order <= 6:
624
+ weights = [
625
+ 0.0010373112336140,
626
+ 0.0010373112336140,
627
+ 0.0010373112336140,
628
+ 0.0010373112336140,
629
+ 0.0096016645399480,
630
+ 0.0096016645399480,
631
+ 0.0096016645399480,
632
+ 0.0096016645399480,
633
+ 0.0096016645399480,
634
+ 0.0096016645399480,
635
+ 0.0096016645399480,
636
+ 0.0096016645399480,
637
+ 0.0096016645399480,
638
+ 0.0096016645399480,
639
+ 0.0096016645399480,
640
+ 0.0096016645399480,
641
+ 0.0164493976798232,
642
+ 0.0164493976798232,
643
+ 0.0164493976798232,
644
+ 0.0164493976798232,
645
+ 0.0164493976798232,
646
+ 0.0164493976798232,
647
+ 0.0164493976798232,
648
+ 0.0164493976798232,
649
+ 0.0164493976798232,
650
+ 0.0164493976798232,
651
+ 0.0164493976798232,
652
+ 0.0164493976798232,
653
+ 0.0153747766513310,
654
+ 0.0153747766513310,
655
+ 0.0153747766513310,
656
+ 0.0153747766513310,
657
+ 0.0153747766513310,
658
+ 0.0153747766513310,
659
+ 0.0153747766513310,
660
+ 0.0153747766513310,
661
+ 0.0153747766513310,
662
+ 0.0153747766513310,
663
+ 0.0153747766513310,
664
+ 0.0153747766513310,
665
+ 0.0293520118375230,
666
+ 0.0293520118375230,
667
+ 0.0293520118375230,
668
+ 0.0293520118375230,
669
+ 0.0293520118375230,
670
+ 0.0293520118375230,
671
+ 0.0293520118375230,
672
+ 0.0293520118375230,
673
+ 0.0293520118375230,
674
+ 0.0293520118375230,
675
+ 0.0293520118375230,
676
+ 0.0293520118375230,
677
+ 0.0366291366405108,
678
+ 0.0366291366405108,
679
+ 0.0366291366405108,
680
+ 0.0366291366405108,
681
+ ]
682
+
683
+ coords = [
684
+ Coords(0.0149520651530592, 0.0149520651530592, 0.0149520651530592),
685
+ Coords(0.9551438045408220, 0.0149520651530592, 0.0149520651530592),
686
+ Coords(0.0149520651530592, 0.9551438045408220, 0.0149520651530592),
687
+ Coords(0.0149520651530592, 0.0149520651530592, 0.9551438045408220),
688
+ Coords(0.1518319491659370, 0.0340960211962615, 0.0340960211962615),
689
+ Coords(0.7799760084415400, 0.0340960211962615, 0.0340960211962615),
690
+ Coords(0.0340960211962615, 0.1518319491659370, 0.0340960211962615),
691
+ Coords(0.0340960211962615, 0.7799760084415400, 0.0340960211962615),
692
+ Coords(0.0340960211962615, 0.0340960211962615, 0.1518319491659370),
693
+ Coords(0.0340960211962615, 0.0340960211962615, 0.7799760084415400),
694
+ Coords(0.7799760084415400, 0.1518319491659370, 0.0340960211962615),
695
+ Coords(0.1518319491659370, 0.7799760084415400, 0.0340960211962615),
696
+ Coords(0.7799760084415400, 0.0340960211962615, 0.1518319491659370),
697
+ Coords(0.1518319491659370, 0.0340960211962615, 0.7799760084415400),
698
+ Coords(0.0340960211962615, 0.7799760084415400, 0.1518319491659370),
699
+ Coords(0.0340960211962615, 0.1518319491659370, 0.7799760084415400),
700
+ Coords(0.5526556431060170, 0.0462051504150017, 0.0462051504150017),
701
+ Coords(0.3549340560639790, 0.0462051504150017, 0.0462051504150017),
702
+ Coords(0.0462051504150017, 0.5526556431060170, 0.0462051504150017),
703
+ Coords(0.0462051504150017, 0.3549340560639790, 0.0462051504150017),
704
+ Coords(0.0462051504150017, 0.0462051504150017, 0.5526556431060170),
705
+ Coords(0.0462051504150017, 0.0462051504150017, 0.3549340560639790),
706
+ Coords(0.3549340560639790, 0.5526556431060170, 0.0462051504150017),
707
+ Coords(0.5526556431060170, 0.3549340560639790, 0.0462051504150017),
708
+ Coords(0.3549340560639790, 0.0462051504150017, 0.5526556431060170),
709
+ Coords(0.5526556431060170, 0.0462051504150017, 0.3549340560639790),
710
+ Coords(0.0462051504150017, 0.3549340560639790, 0.5526556431060170),
711
+ Coords(0.0462051504150017, 0.5526556431060170, 0.3549340560639790),
712
+ Coords(0.2281904610687610, 0.2281904610687610, 0.0055147549744775),
713
+ Coords(0.5381043228880020, 0.2281904610687610, 0.0055147549744775),
714
+ Coords(0.2281904610687610, 0.5381043228880020, 0.0055147549744775),
715
+ Coords(0.2281904610687610, 0.0055147549744775, 0.2281904610687610),
716
+ Coords(0.5381043228880020, 0.0055147549744775, 0.2281904610687610),
717
+ Coords(0.2281904610687610, 0.0055147549744775, 0.5381043228880020),
718
+ Coords(0.0055147549744775, 0.2281904610687610, 0.2281904610687610),
719
+ Coords(0.0055147549744775, 0.5381043228880020, 0.2281904610687610),
720
+ Coords(0.0055147549744775, 0.2281904610687610, 0.5381043228880020),
721
+ Coords(0.5381043228880020, 0.2281904610687610, 0.2281904610687610),
722
+ Coords(0.2281904610687610, 0.5381043228880020, 0.2281904610687610),
723
+ Coords(0.2281904610687610, 0.2281904610687610, 0.5381043228880020),
724
+ Coords(0.3523052600879940, 0.3523052600879940, 0.0992057202494530),
725
+ Coords(0.1961837595745600, 0.3523052600879940, 0.0992057202494530),
726
+ Coords(0.3523052600879940, 0.1961837595745600, 0.0992057202494530),
727
+ Coords(0.3523052600879940, 0.0992057202494530, 0.3523052600879940),
728
+ Coords(0.1961837595745600, 0.0992057202494530, 0.3523052600879940),
729
+ Coords(0.3523052600879940, 0.0992057202494530, 0.1961837595745600),
730
+ Coords(0.0992057202494530, 0.3523052600879940, 0.3523052600879940),
731
+ Coords(0.0992057202494530, 0.1961837595745600, 0.3523052600879940),
732
+ Coords(0.0992057202494530, 0.3523052600879940, 0.1961837595745600),
733
+ Coords(0.1961837595745600, 0.3523052600879940, 0.3523052600879940),
734
+ Coords(0.3523052600879940, 0.1961837595745600, 0.3523052600879940),
735
+ Coords(0.3523052600879940, 0.3523052600879940, 0.1961837595745600),
736
+ Coords(0.1344783347929940, 0.1344783347929940, 0.1344783347929940),
737
+ Coords(0.5965649956210170, 0.1344783347929940, 0.1344783347929940),
738
+ Coords(0.1344783347929940, 0.5965649956210170, 0.1344783347929940),
739
+ Coords(0.1344783347929940, 0.1344783347929940, 0.5965649956210170),
740
+ ]
741
+ else:
742
+ raise NotImplementedError
743
+
744
+ return coords, weights