From 26a40ecf20da9b90fa0984687895af9df19c15ed Mon Sep 17 00:00:00 2001 From: mtao Date: Wed, 17 Jan 2024 21:07:58 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20wildmesh?= =?UTF-8?q?ing/wildmeshing-toolkit@7dc0bd3b46ac310d985f15e2332cab00651ea9d?= =?UTF-8?q?5=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _disk_options_8cpp_source.html | 2 +- _edge_valence_energy_8cpp_source.html | 2 +- _isotropic_remeshing_8cpp_source.html | 2 +- _tet_mesh_8cpp_source.html | 1157 +++++++++-------- _tet_mesh_8hpp_source.html | 154 ++- _tet_mesh_operation_executor_8cpp_source.html | 6 +- _tri_mesh_8cpp_source.html | 1107 ++++++++-------- _tri_mesh_8hpp_source.html | 151 ++- _tri_mesh_operation_executor_8cpp_source.html | 2 +- _triangle_fan_options_8cpp_source.html | 2 +- ...on_multi_mesh_map_functor_8cpp_source.html | 10 +- classwmtk_1_1_mesh.html | 30 +- ...5eaf6f3eeb78949f3b95c359cc6df68_cgraph.svg | 2 +- ...eaf6f3eeb78949f3b95c359cc6df68_icgraph.svg | 2 +- ...0dc60988327a1f0ace86051df4f3e65_cgraph.svg | 2 +- ...33e19ee5ddb037313fa7dbdb0e41771_cgraph.svg | 2 +- ...3e19ee5ddb037313fa7dbdb0e41771_icgraph.svg | 2 +- ...805489402321155d4a1f7023faaf3a_icgraph.svg | 2 +- ...bb2f7ff22ab4aab437168c5962d6266_cgraph.svg | 2 +- ...af39088ce02c2a2f208c762d6f2b52_icgraph.svg | 2 +- ...58b1910b87752dc0e806742108bec4e_cgraph.svg | 2 +- ...165ceb4c2db2731df90e4ac100637d_icgraph.svg | 2 +- ...a10a23367f4d8804e0ac778475f02f_icgraph.svg | 2 +- ...a480b3f16ac2aadc9887c42748e239_icgraph.svg | 2 +- ...3d77f76d0adb7ae6fafee9db8b701b4_cgraph.svg | 2 +- ...8a7b7d592fdbf672f2c6c9653487ea_icgraph.svg | 2 +- ...023adc2c48442ea624fdc111ba278b_icgraph.map | 5 + ...023adc2c48442ea624fdc111ba278b_icgraph.md5 | 1 + ...023adc2c48442ea624fdc111ba278b_icgraph.svg | 51 + ...5a8a24158c4aa8580c57ba09f885f7_icgraph.svg | 2 +- ...326d46e931aebe5707255618d4a0b0_icgraph.svg | 2 +- ...77d8cd19421d1ce5959c8c0d3cb0b7e_cgraph.svg | 2 +- ...7d8cd19421d1ce5959c8c0d3cb0b7e_icgraph.svg | 2 +- ...f00438d0700358b160e310d69725c9_icgraph.svg | 2 +- ...e12857f52985bd548a968a4c819659_icgraph.svg | 2 +- ...205d6addf4e76f000c70547253735f0_cgraph.svg | 2 +- ...05d6addf4e76f000c70547253735f0_icgraph.svg | 2 +- ...778c1f8afef3a2b1b1c33a140b3166_icgraph.svg | 2 +- ...303dff226282b38e9110fb6d1c4c853_cgraph.svg | 2 +- ...90cad0755b0052b0ca4502e401bcd3_icgraph.svg | 2 +- ...8e5c13a9c5368402ace7c326b4bb58_icgraph.svg | 2 +- classwmtk_1_1_tet_mesh-members.html | 22 +- classwmtk_1_1_tet_mesh.html | 437 +++++-- classwmtk_1_1_tet_mesh.js | 12 +- ..._mesh_1_1_tet_mesh_operation_executor.html | 6 +- ...db03200a449485005c9c1c69c80a4fa_cgraph.svg | 2 +- ...5ff78f32516c14f745a2860477f7114_cgraph.svg | 2 +- ...ed8c8bad128a0bbb814197ee24aa036_cgraph.map | 4 + ...ed8c8bad128a0bbb814197ee24aa036_cgraph.md5 | 1 + ...ed8c8bad128a0bbb814197ee24aa036_cgraph.svg | 37 + ...1b2ec618edb4d478e36f0868a85d86e_cgraph.svg | 2 +- ...b2ec618edb4d478e36f0868a85d86e_icgraph.svg | 2 +- ...c8c827ae2a00cea402eb21cc5be56b_icgraph.map | 5 + ...c8c827ae2a00cea402eb21cc5be56b_icgraph.md5 | 1 + ...c8c827ae2a00cea402eb21cc5be56b_icgraph.svg | 52 + ...525e2b5565d11fda49e902958dbf4c4_cgraph.svg | 2 +- ...25e2b5565d11fda49e902958dbf4c4_icgraph.svg | 2 +- ...d9f4016fdd79930e161da787889bdf7_cgraph.svg | 2 +- ...27212d14d3fe4a5afb8dd31b106836_icgraph.svg | 2 +- ...72ea805c8faf84e78915f191a9af9bf_cgraph.svg | 2 +- ...bdbbfa0cd7bd9263241f6501db182a_icgraph.svg | 2 +- ...eb060aa0a69f3ce5108fe199decc578_cgraph.svg | 2 +- ...b060aa0a69f3ce5108fe199decc578_icgraph.svg | 2 +- ...8609916210858129ba39958a273e78e_cgraph.svg | 2 +- ...d216046ac28a11f7d0fd07f9e090ba3_cgraph.svg | 2 +- ...7bee9cf6bbb549d3d1e245816443794_cgraph.map | 5 + ...7bee9cf6bbb549d3d1e245816443794_cgraph.md5 | 1 + ...7bee9cf6bbb549d3d1e245816443794_cgraph.svg | 52 + ...e0e56365f9c2cb86588a9d7b1874203_cgraph.svg | 2 +- ...66e68dbc9ac6c9ecb34a8e023cb1ae2_cgraph.svg | 2 +- ...6e68dbc9ac6c9ecb34a8e023cb1ae2_icgraph.svg | 2 +- ...87b10e7c3a6956e37ebfa95da145d05_cgraph.svg | 2 +- ...247e83a140cafd3d62e06508ba128c7_cgraph.svg | 2 +- ...8b4b3182fb3778fa8da52ea4fa156b6_cgraph.svg | 2 +- ...021ae8290eda4fbad7ab4b742072084_cgraph.svg | 2 +- ...1a969015cd4809934ecfa862dd95a12_cgraph.map | 4 + ...1a969015cd4809934ecfa862dd95a12_cgraph.md5 | 1 + ...1a969015cd4809934ecfa862dd95a12_cgraph.svg | 37 + ...002e7a36e20373deb54576caffa682_icgraph.svg | 2 +- classwmtk_1_1_tri_mesh-members.html | 137 +- classwmtk_1_1_tri_mesh.html | 213 +-- classwmtk_1_1_tri_mesh.js | 5 +- ..._mesh_1_1_tri_mesh_operation_executor.html | 4 +- ...6693e4d11c3791da89396b412ae48db_cgraph.svg | 2 +- ...d5d124897281d6a649098213173fdb5_cgraph.svg | 2 +- ...5d124897281d6a649098213173fdb5_icgraph.svg | 2 +- ...3632ff92bbc774addbcfea135399640_cgraph.svg | 2 +- ...ad1e1da89aec444a4c0b7f2f9efdd0c_cgraph.map | 5 + ...ad1e1da89aec444a4c0b7f2f9efdd0c_cgraph.md5 | 1 + ...ad1e1da89aec444a4c0b7f2f9efdd0c_cgraph.svg | 52 + ...b9b18bfd6bd9223a2b39f01773a12c_icgraph.svg | 2 +- ...bbf2bda254d11ad60506d6b486de0b_icgraph.svg | 2 +- ...bdbbfa0cd7bd9263241f6501db182a_icgraph.svg | 2 +- ...165486fcd93cad88ad55456bd7efbba_cgraph.svg | 2 +- ...7a70482852aa4ac6583cf4c36d91767_cgraph.svg | 2 +- ...a70482852aa4ac6583cf4c36d91767_icgraph.svg | 2 +- ...44917af29492582c929e6b53b462f8_icgraph.map | 5 + ...44917af29492582c929e6b53b462f8_icgraph.md5 | 1 + ...44917af29492582c929e6b53b462f8_icgraph.svg | 52 + ...13ae302287fb113bae39b8ec0ee3937_cgraph.svg | 2 +- ...3ae302287fb113bae39b8ec0ee3937_icgraph.svg | 2 +- ...3fe826d80c8be74c3b0589f5818b279_cgraph.svg | 2 +- ...fe826d80c8be74c3b0589f5818b279_icgraph.svg | 2 +- ...80d7bf51ebd7a8c096e904867bd9a41_cgraph.svg | 2 +- ...0d7bf51ebd7a8c096e904867bd9a41_icgraph.svg | 2 +- ...5a7b693c52023d7277e8c00f975911d_cgraph.svg | 2 +- ...a7b693c52023d7277e8c00f975911d_icgraph.svg | 2 +- ...603f7969b10c674eb00e007a507a530_cgraph.svg | 2 +- ...03f7969b10c674eb00e007a507a530_icgraph.svg | 2 +- ...3c7d8fb567608e42391e1e4d59c237d_cgraph.map | 4 + ...3c7d8fb567608e42391e1e4d59c237d_cgraph.md5 | 1 + ...3c7d8fb567608e42391e1e4d59c237d_cgraph.svg | 37 + ...8e216e5a4c5267481b80a63299c1a98_cgraph.map | 4 + ...8e216e5a4c5267481b80a63299c1a98_cgraph.md5 | 1 + ...8e216e5a4c5267481b80a63299c1a98_cgraph.svg | 37 + ...68edb47957a4207ffb2e40f2f3686a8_cgraph.svg | 2 +- ...cb18c9452e58741b01d335ea8339e52_cgraph.svg | 2 +- ...d8cb26ee1436707bf26d811aa5e12c6_cgraph.svg | 2 +- ...8cb26ee1436707bf26d811aa5e12c6_icgraph.svg | 2 +- ...7c6200d5364ccf6a23fc0223dbd6421_cgraph.svg | 2 +- classwmtk_1_1_tuple.html | 10 +- ...k_1_1function_1_1_edge_valence_energy.html | 2 +- ..._1_1tet__mesh_1_1_edge_operation_data.html | 2 +- ..._1_1tri__mesh_1_1_edge_operation_data.html | 2 +- ...edge_operation_multi_mesh_map_functor.html | 14 +- classwmtk_1_1simplex_1_1_simplex.html | 8 +- ...mtk_1_1simplex_1_1_simplex_collection.html | 2 +- functions.html | 4 +- functions_func_m.html | 20 +- functions_m.html | 31 +- functions_t.html | 2 +- functions_vars_m.html | 21 + link__condition_8cpp_source.html | 12 +- mesh__utils_8cpp_source.html | 2 +- namespacewmtk.html | 6 +- namespacewmtk_1_1autogen_1_1tet__mesh.html | 12 +- namespacewmtk_1_1autogen_1_1tri__mesh.html | 10 +- namespacewmtk_1_1components_1_1internal.html | 2 +- ...1components_1_1internal_1_1procedural.html | 4 +- namespacewmtk_1_1mesh__utils.html | 2 +- namespacewmtk_1_1simplex.html | 10 +- navtreedata.js | 28 +- navtreeindex10.js | 20 +- navtreeindex11.js | 20 +- navtreeindex12.js | 20 +- navtreeindex13.js | 22 +- navtreeindex14.js | 22 +- navtreeindex15.js | 20 +- navtreeindex16.js | 20 +- navtreeindex17.js | 20 +- navtreeindex18.js | 20 +- navtreeindex19.js | 9 + navtreeindex5.js | 104 +- navtreeindex6.js | 20 +- navtreeindex7.js | 20 +- navtreeindex8.js | 20 +- navtreeindex9.js | 20 +- search/all_0.js | 141 +- search/all_1.js | 64 +- search/all_10.js | 4 +- search/all_11.js | 204 +-- search/all_12.js | 298 ++--- search/all_13.js | 343 +++-- search/all_14.js | 98 +- search/all_15.js | 117 +- search/all_16.js | 116 +- search/all_17.js | 74 +- search/all_2.js | 284 ++-- search/all_3.js | 116 +- search/all_4.js | 184 +-- search/all_5.js | 122 +- search/all_6.js | 221 ++-- search/all_c.js | 644 ++++----- search/all_d.js | 78 +- search/all_e.js | 122 +- search/all_f.js | 140 +- search/classes_0.js | 44 +- search/classes_1.js | 6 +- search/classes_10.js | 60 +- search/classes_11.js | 14 +- search/classes_12.js | 6 +- search/classes_13.js | 6 +- search/classes_2.js | 42 +- search/classes_3.js | 12 +- search/classes_4.js | 20 +- search/classes_5.js | 10 +- search/classes_6.js | 22 +- search/classes_7.js | 26 +- search/classes_8.js | 22 +- search/classes_9.js | 4 +- search/classes_a.js | 72 +- search/classes_b.js | 10 +- search/classes_c.js | 10 +- search/classes_d.js | 24 +- search/classes_e.js | 30 +- search/classes_f.js | 36 +- search/defines_0.js | 2 +- search/defines_1.js | 2 +- search/defines_2.js | 2 +- search/defines_3.js | 2 +- search/defines_4.js | 6 +- search/defines_5.js | 2 +- search/enums_0.js | 2 +- search/enums_1.js | 2 +- search/enums_2.js | 2 +- search/enums_3.js | 2 +- search/enums_4.js | 2 +- search/enums_5.js | 8 +- search/enums_6.js | 2 +- search/enums_7.js | 2 +- search/enumvalues_0.js | 6 +- search/enumvalues_1.js | 10 +- search/enumvalues_2.js | 6 +- search/enumvalues_3.js | 2 +- search/enumvalues_4.js | 4 +- search/enumvalues_5.js | 4 +- search/enumvalues_6.js | 6 +- search/enumvalues_7.js | 2 +- search/enumvalues_8.js | 4 +- search/enumvalues_9.js | 2 +- search/enumvalues_a.js | 2 +- search/enumvalues_b.js | 4 +- search/enumvalues_c.js | 2 +- search/enumvalues_d.js | 4 +- search/enumvalues_e.js | 2 +- search/files_0.js | 86 +- search/files_1.js | 20 +- search/files_10.js | 36 +- search/files_11.js | 58 +- search/files_12.js | 154 +-- search/files_13.js | 20 +- search/files_14.js | 18 +- search/files_15.js | 6 +- search/files_2.js | 66 +- search/files_3.js | 24 +- search/files_4.js | 44 +- search/files_5.js | 30 +- search/files_6.js | 34 +- search/files_7.js | 20 +- search/files_8.js | 46 +- search/files_9.js | 4 +- search/files_a.js | 4 +- search/files_b.js | 40 +- search/files_c.js | 156 +-- search/files_d.js | 16 +- search/files_e.js | 26 +- search/files_f.js | 52 +- search/functions_0.js | 97 +- search/functions_1.js | 22 +- search/functions_10.js | 76 +- search/functions_11.js | 168 +-- search/functions_12.js | 106 +- search/functions_13.js | 58 +- search/functions_14.js | 42 +- search/functions_15.js | 28 +- search/functions_16.js | 74 +- search/functions_2.js | 142 +- search/functions_3.js | 40 +- search/functions_4.js | 90 +- search/functions_5.js | 46 +- search/functions_6.js | 182 +-- search/functions_7.js | 40 +- search/functions_8.js | 98 +- search/functions_9.js | 4 +- search/functions_a.js | 66 +- search/functions_b.js | 117 +- search/functions_c.js | 40 +- search/functions_d.js | 52 +- search/functions_e.js | 62 +- search/functions_f.js | 2 +- search/namespaces_0.js | 2 +- search/namespaces_1.js | 2 +- search/namespaces_2.js | 2 +- search/namespaces_3.js | 6 +- search/namespaces_4.js | 4 +- search/namespaces_5.js | 52 +- search/pages_0.js | 2 +- search/pages_1.js | 2 +- search/pages_2.js | 2 +- search/related_0.js | 22 +- search/related_1.js | 4 +- search/related_2.js | 4 +- search/related_3.js | 2 +- search/related_4.js | 2 +- search/related_5.js | 6 +- search/related_6.js | 2 +- search/related_7.js | 24 +- search/related_8.js | 40 +- search/related_9.js | 4 +- search/related_a.js | 10 +- search/related_b.js | 10 +- search/related_c.js | 4 +- search/related_d.js | 22 +- search/typedefs_0.js | 14 +- search/typedefs_1.js | 8 +- search/typedefs_10.js | 16 +- search/typedefs_11.js | 22 +- search/typedefs_12.js | 4 +- search/typedefs_13.js | 28 +- search/typedefs_2.js | 26 +- search/typedefs_3.js | 20 +- search/typedefs_4.js | 2 +- search/typedefs_5.js | 10 +- search/typedefs_6.js | 10 +- search/typedefs_7.js | 8 +- search/typedefs_8.js | 8 +- search/typedefs_9.js | 2 +- search/typedefs_a.js | 2 +- search/typedefs_b.js | 22 +- search/typedefs_c.js | 2 +- search/typedefs_d.js | 2 +- search/typedefs_e.js | 4 +- search/typedefs_f.js | 60 +- search/variables_0.js | 40 +- search/variables_1.js | 2 +- search/variables_10.js | 30 +- search/variables_11.js | 28 +- search/variables_2.js | 16 +- search/variables_3.js | 18 +- search/variables_4.js | 40 +- search/variables_5.js | 26 +- search/variables_6.js | 4 +- search/variables_7.js | 18 +- search/variables_8.js | 34 +- search/variables_9.js | 8 +- search/variables_a.js | 391 +++--- search/variables_b.js | 8 +- search/variables_c.js | 16 +- search/variables_d.js | 10 +- search/variables_e.js | 10 +- search/variables_f.js | 24 +- ..._component__isotropic__remeshing_8cpp.html | 4 +- ...ent__isotropic__remeshing_8cpp_source.html | 4 +- ...esh_2_edge_operation_data_8cpp_source.html | 2 +- ...esh_2_edge_operation_data_8cpp_source.html | 2 +- 335 files changed, 6672 insertions(+), 5766 deletions(-) create mode 100644 classwmtk_1_1_mesh_a95023adc2c48442ea624fdc111ba278b_icgraph.map create mode 100644 classwmtk_1_1_mesh_a95023adc2c48442ea624fdc111ba278b_icgraph.md5 create mode 100644 classwmtk_1_1_mesh_a95023adc2c48442ea624fdc111ba278b_icgraph.svg create mode 100644 classwmtk_1_1_tet_mesh_a2ed8c8bad128a0bbb814197ee24aa036_cgraph.map create mode 100644 classwmtk_1_1_tet_mesh_a2ed8c8bad128a0bbb814197ee24aa036_cgraph.md5 create mode 100644 classwmtk_1_1_tet_mesh_a2ed8c8bad128a0bbb814197ee24aa036_cgraph.svg create mode 100644 classwmtk_1_1_tet_mesh_a3ec8c827ae2a00cea402eb21cc5be56b_icgraph.map create mode 100644 classwmtk_1_1_tet_mesh_a3ec8c827ae2a00cea402eb21cc5be56b_icgraph.md5 create mode 100644 classwmtk_1_1_tet_mesh_a3ec8c827ae2a00cea402eb21cc5be56b_icgraph.svg create mode 100644 classwmtk_1_1_tet_mesh_a77bee9cf6bbb549d3d1e245816443794_cgraph.map create mode 100644 classwmtk_1_1_tet_mesh_a77bee9cf6bbb549d3d1e245816443794_cgraph.md5 create mode 100644 classwmtk_1_1_tet_mesh_a77bee9cf6bbb549d3d1e245816443794_cgraph.svg create mode 100644 classwmtk_1_1_tet_mesh_ae1a969015cd4809934ecfa862dd95a12_cgraph.map create mode 100644 classwmtk_1_1_tet_mesh_ae1a969015cd4809934ecfa862dd95a12_cgraph.md5 create mode 100644 classwmtk_1_1_tet_mesh_ae1a969015cd4809934ecfa862dd95a12_cgraph.svg create mode 100644 classwmtk_1_1_tri_mesh_a3ad1e1da89aec444a4c0b7f2f9efdd0c_cgraph.map create mode 100644 classwmtk_1_1_tri_mesh_a3ad1e1da89aec444a4c0b7f2f9efdd0c_cgraph.md5 create mode 100644 classwmtk_1_1_tri_mesh_a3ad1e1da89aec444a4c0b7f2f9efdd0c_cgraph.svg create mode 100644 classwmtk_1_1_tri_mesh_a6844917af29492582c929e6b53b462f8_icgraph.map create mode 100644 classwmtk_1_1_tri_mesh_a6844917af29492582c929e6b53b462f8_icgraph.md5 create mode 100644 classwmtk_1_1_tri_mesh_a6844917af29492582c929e6b53b462f8_icgraph.svg create mode 100644 classwmtk_1_1_tri_mesh_ad3c7d8fb567608e42391e1e4d59c237d_cgraph.map create mode 100644 classwmtk_1_1_tri_mesh_ad3c7d8fb567608e42391e1e4d59c237d_cgraph.md5 create mode 100644 classwmtk_1_1_tri_mesh_ad3c7d8fb567608e42391e1e4d59c237d_cgraph.svg create mode 100644 classwmtk_1_1_tri_mesh_ad8e216e5a4c5267481b80a63299c1a98_cgraph.map create mode 100644 classwmtk_1_1_tri_mesh_ad8e216e5a4c5267481b80a63299c1a98_cgraph.md5 create mode 100644 classwmtk_1_1_tri_mesh_ad8e216e5a4c5267481b80a63299c1a98_cgraph.svg diff --git a/_disk_options_8cpp_source.html b/_disk_options_8cpp_source.html index 2d38f35748..8984fade79 100644 --- a/_disk_options_8cpp_source.html +++ b/_disk_options_8cpp_source.html @@ -170,7 +170,7 @@
Definition: TriMesh.hpp:18
-
void initialize(Eigen::Ref< const RowVectors3l > FV, Eigen::Ref< const RowVectors3l > FE, Eigen::Ref< const RowVectors3l > FF, Eigen::Ref< const VectorXl > VF, Eigen::Ref< const VectorXl > EF)
Definition: TriMesh.cpp:185
+
void initialize(Eigen::Ref< const RowVectors3l > FV, Eigen::Ref< const RowVectors3l > FE, Eigen::Ref< const RowVectors3l > FF, Eigen::Ref< const VectorXl > VF, Eigen::Ref< const VectorXl > EF)
Definition: TriMesh.cpp:201
Definition: DiskOptions.hpp:9
std::optional< Coordinates > coordinates
Definition: DiskOptions.hpp:20
int64_t size
Definition: DiskOptions.hpp:11
diff --git a/_edge_valence_energy_8cpp_source.html b/_edge_valence_energy_8cpp_source.html index 544b79d646..2a9826d330 100644 --- a/_edge_valence_energy_8cpp_source.html +++ b/_edge_valence_energy_8cpp_source.html @@ -197,7 +197,7 @@
Definition: Mesh.hpp:94
Tuple switch_vertex(const Tuple &tuple) const
Definition: Mesh.hpp:940
Definition: TriMesh.hpp:18
-
bool is_boundary_vertex(const Tuple &tuple) const
Definition: TriMesh.cpp:73
+
bool is_boundary_vertex(const Tuple &tuple) const
Definition: TriMesh.cpp:95
Definition: Tuple.hpp:30
virtual double get_value(const simplex::Simplex &domain_simplex) const=0
This function is defined over a simplex (normally a triangle or tetrahedron).
diff --git a/_isotropic_remeshing_8cpp_source.html b/_isotropic_remeshing_8cpp_source.html index 442e0746e4..80af491800 100644 --- a/_isotropic_remeshing_8cpp_source.html +++ b/_isotropic_remeshing_8cpp_source.html @@ -323,7 +323,7 @@
double sorting_time
Definition: Scheduler.hpp:46
int64_t number_of_successful_operations() const
Returns the number of successful operations performed by the scheduler.
Definition: Scheduler.hpp:15
Definition: TriMesh.hpp:18
-
bool is_connectivity_valid() const override
Definition: TriMesh.cpp:393
+
bool is_connectivity_valid() const override
Definition: TriMesh.cpp:397
const TypedAttributeHandle< T > & as() const
diff --git a/_tet_mesh_8cpp_source.html b/_tet_mesh_8cpp_source.html index 555a68fcd6..097b5a5fae 100644 --- a/_tet_mesh_8cpp_source.html +++ b/_tet_mesh_8cpp_source.html @@ -144,563 +144,590 @@
27  register_attribute_typed<int64_t>("m_tf", PrimitiveType::Tetrahedron, 4, false, -1))
28  , m_tt_handle(
29  register_attribute_typed<int64_t>("m_tt", PrimitiveType::Tetrahedron, 4, false, -1))
-
30 {}
-
31 
-
32 
+
30 {
+
31  make_cached_accessors();
+
32 }
33 
-
34 void TetMesh::initialize(
-
35  Eigen::Ref<const RowVectors4l> TV,
-
36  Eigen::Ref<const RowVectors6l> TE,
-
37  Eigen::Ref<const RowVectors4l> TF,
-
38  Eigen::Ref<const RowVectors4l> TT,
-
39  Eigen::Ref<const VectorXl> VT,
-
40  Eigen::Ref<const VectorXl> ET,
-
41  Eigen::Ref<const VectorXl> FT)
-
42 
-
43 {
-
44  // reserve memory for attributes
+
34 
+
35 TetMesh::TetMesh(TetMesh&& o)
+
36  : Mesh(std::move(o))
+
37 {
+
38  m_vt_handle = o.m_vt_handle;
+
39  m_et_handle = o.m_et_handle;
+
40  m_ft_handle = o.m_ft_handle;
+
41  m_tv_handle = o.m_tv_handle;
+
42  m_te_handle = o.m_te_handle;
+
43  m_tf_handle = o.m_tf_handle;
+
44  m_tt_handle = o.m_tt_handle;
45 
-
46  std::vector<int64_t> cap{
-
47  static_cast<int64_t>(VT.rows()),
-
48  static_cast<int64_t>(ET.rows()),
-
49  static_cast<int64_t>(FT.rows()),
-
50  static_cast<int64_t>(TT.rows())};
-
51  set_capacities(cap);
-
52 
-
53  // get Accessors for topology
-
54  Accessor<int64_t> vt_accessor = create_accessor<int64_t>(m_vt_handle);
-
55  Accessor<int64_t> et_accessor = create_accessor<int64_t>(m_et_handle);
-
56  Accessor<int64_t> ft_accessor = create_accessor<int64_t>(m_ft_handle);
-
57 
-
58  Accessor<int64_t> tv_accessor = create_accessor<int64_t>(m_tv_handle);
-
59  Accessor<int64_t> te_accessor = create_accessor<int64_t>(m_te_handle);
-
60  Accessor<int64_t> tf_accessor = create_accessor<int64_t>(m_tf_handle);
-
61  Accessor<int64_t> tt_accessor = create_accessor<int64_t>(m_tt_handle);
+
46  make_cached_accessors();
+
47 }
+
48 TetMesh& TetMesh::operator=(TetMesh&& o)
+
49 {
+
50  Mesh::operator=(std::move(o));
+
51  m_vt_handle = o.m_vt_handle;
+
52  m_et_handle = o.m_et_handle;
+
53  m_ft_handle = o.m_ft_handle;
+
54  m_tv_handle = o.m_tv_handle;
+
55  m_te_handle = o.m_te_handle;
+
56  m_tf_handle = o.m_tf_handle;
+
57  m_tt_handle = o.m_tt_handle;
+
58 
+
59  make_cached_accessors();
+
60  return *this;
+
61 }
62 
-
63  Accessor<char> v_flag_accessor = get_flag_accessor(PrimitiveType::Vertex);
-
64  Accessor<char> e_flag_accessor = get_flag_accessor(PrimitiveType::Edge);
-
65  Accessor<char> f_flag_accessor = get_flag_accessor(PrimitiveType::Face);
-
66  Accessor<char> t_flag_accessor = get_flag_accessor(PrimitiveType::Tetrahedron);
-
67 
-
68  // iterate over the matrices and fill attributes
-
69  for (int64_t i = 0; i < capacity(PrimitiveType::Tetrahedron); ++i) {
-
70  tv_accessor.index_access().vector_attribute(i) = TV.row(i).transpose();
-
71  te_accessor.index_access().vector_attribute(i) = TE.row(i).transpose();
-
72  tf_accessor.index_access().vector_attribute(i) = TF.row(i).transpose();
-
73  tt_accessor.index_access().vector_attribute(i) = TT.row(i).transpose();
-
74  t_flag_accessor.index_access().scalar_attribute(i) |= 0x1;
-
75  }
-
76  // m_vt
-
77  for (int64_t i = 0; i < capacity(PrimitiveType::Vertex); ++i) {
-
78  vt_accessor.index_access().scalar_attribute(i) = VT(i);
-
79  v_flag_accessor.index_access().scalar_attribute(i) |= 0x1;
-
80  }
-
81  // m_et
-
82  for (int64_t i = 0; i < capacity(PrimitiveType::Edge); ++i) {
-
83  et_accessor.index_access().scalar_attribute(i) = ET(i);
-
84  e_flag_accessor.index_access().scalar_attribute(i) |= 0x1;
-
85  }
-
86  // m_ft
-
87  for (int64_t i = 0; i < capacity(PrimitiveType::Face); ++i) {
-
88  ft_accessor.index_access().scalar_attribute(i) = FT(i);
-
89  f_flag_accessor.index_access().scalar_attribute(i) |= 0x1;
-
90  }
-
91 }
-
92 
-
93 
-
94 void TetMesh::initialize(Eigen::Ref<const RowVectors4l> T)
-
95 {
-
96  auto [TE, TF, TT, VT, ET, FT] = tetmesh_topology_initialization(T);
-
97  initialize(T, TE, TF, TT, VT, ET, FT);
-
98 }
-
99 
-
100 Tuple TetMesh::vertex_tuple_from_id(int64_t id) const
-
101 {
-
102  ConstAccessor<int64_t> vt_accessor = create_accessor<int64_t>(m_vt_handle);
-
103  int64_t t = vt_accessor.index_access().const_scalar_attribute(id);
-
104  ConstAccessor<int64_t> tv_accessor = create_accessor<int64_t>(m_tv_handle);
-
105  auto tv = tv_accessor.index_access().const_vector_attribute(t);
-
106  int64_t lvid = -1;
-
107 
-
108  for (int64_t i = 0; i < 4; ++i) {
-
109  if (tv(i) == id) {
-
110  lvid = i;
-
111  break;
-
112  }
-
113  }
-
114 
-
115  const auto [nlvid, leid, lfid] = autogen::tet_mesh::auto_3d_table_complete_vertex[lvid];
-
116  assert(lvid == nlvid);
-
117 
-
118  if (lvid < 0 || leid < 0 || lfid < 0) throw std::runtime_error("vertex_tuple_from_id failed");
-
119 
-
120  ConstAccessor<int64_t> hash_accessor = get_const_cell_hash_accessor();
-
121 
-
122  Tuple v_tuple = Tuple(lvid, leid, lfid, t, get_cell_hash(t, hash_accessor));
-
123  assert(is_ccw(v_tuple));
-
124  assert(is_valid(v_tuple, hash_accessor));
-
125  return v_tuple;
-
126 }
-
127 
-
128 Tuple TetMesh::edge_tuple_from_id(int64_t id) const
-
129 {
-
130  ConstAccessor<int64_t> et_accessor = create_accessor<int64_t>(m_et_handle);
-
131  int64_t t = et_accessor.index_access().const_scalar_attribute(id);
-
132  ConstAccessor<int64_t> te_accessor = create_accessor<int64_t>(m_te_handle);
-
133  auto te = te_accessor.index_access().const_vector_attribute(t);
-
134 
-
135  int64_t leid = -1;
+
63 
+
64 void TetMesh::make_cached_accessors()
+
65 {
+
66  m_vt_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_vt_handle);
+
67  m_et_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_et_handle);
+
68  m_ft_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_ft_handle);
+
69 
+
70  m_tv_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_tv_handle);
+
71  m_te_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_te_handle);
+
72  m_tf_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_tf_handle);
+
73  m_tt_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_tt_handle);
+
74 }
+
75 
+
76 
+
77 void TetMesh::initialize(
+
78  Eigen::Ref<const RowVectors4l> TV,
+
79  Eigen::Ref<const RowVectors6l> TE,
+
80  Eigen::Ref<const RowVectors4l> TF,
+
81  Eigen::Ref<const RowVectors4l> TT,
+
82  Eigen::Ref<const VectorXl> VT,
+
83  Eigen::Ref<const VectorXl> ET,
+
84  Eigen::Ref<const VectorXl> FT)
+
85 
+
86 {
+
87  // reserve memory for attributes
+
88 
+
89  std::vector<int64_t> cap{
+
90  static_cast<int64_t>(VT.rows()),
+
91  static_cast<int64_t>(ET.rows()),
+
92  static_cast<int64_t>(FT.rows()),
+
93  static_cast<int64_t>(TT.rows())};
+
94  set_capacities(cap);
+
95 
+
96  // get Accessors for topology
+
97  Accessor<int64_t> vt_accessor = create_accessor<int64_t>(m_vt_handle);
+
98  Accessor<int64_t> et_accessor = create_accessor<int64_t>(m_et_handle);
+
99  Accessor<int64_t> ft_accessor = create_accessor<int64_t>(m_ft_handle);
+
100 
+
101  Accessor<int64_t> tv_accessor = create_accessor<int64_t>(m_tv_handle);
+
102  Accessor<int64_t> te_accessor = create_accessor<int64_t>(m_te_handle);
+
103  Accessor<int64_t> tf_accessor = create_accessor<int64_t>(m_tf_handle);
+
104  Accessor<int64_t> tt_accessor = create_accessor<int64_t>(m_tt_handle);
+
105 
+
106  Accessor<char> v_flag_accessor = get_flag_accessor(PrimitiveType::Vertex);
+
107  Accessor<char> e_flag_accessor = get_flag_accessor(PrimitiveType::Edge);
+
108  Accessor<char> f_flag_accessor = get_flag_accessor(PrimitiveType::Face);
+
109  Accessor<char> t_flag_accessor = get_flag_accessor(PrimitiveType::Tetrahedron);
+
110 
+
111  // iterate over the matrices and fill attributes
+
112  for (int64_t i = 0; i < capacity(PrimitiveType::Tetrahedron); ++i) {
+
113  tv_accessor.index_access().vector_attribute(i) = TV.row(i).transpose();
+
114  te_accessor.index_access().vector_attribute(i) = TE.row(i).transpose();
+
115  tf_accessor.index_access().vector_attribute(i) = TF.row(i).transpose();
+
116  tt_accessor.index_access().vector_attribute(i) = TT.row(i).transpose();
+
117  t_flag_accessor.index_access().scalar_attribute(i) |= 0x1;
+
118  }
+
119  // m_vt
+
120  for (int64_t i = 0; i < capacity(PrimitiveType::Vertex); ++i) {
+
121  vt_accessor.index_access().scalar_attribute(i) = VT(i);
+
122  v_flag_accessor.index_access().scalar_attribute(i) |= 0x1;
+
123  }
+
124  // m_et
+
125  for (int64_t i = 0; i < capacity(PrimitiveType::Edge); ++i) {
+
126  et_accessor.index_access().scalar_attribute(i) = ET(i);
+
127  e_flag_accessor.index_access().scalar_attribute(i) |= 0x1;
+
128  }
+
129  // m_ft
+
130  for (int64_t i = 0; i < capacity(PrimitiveType::Face); ++i) {
+
131  ft_accessor.index_access().scalar_attribute(i) = FT(i);
+
132  f_flag_accessor.index_access().scalar_attribute(i) |= 0x1;
+
133  }
+
134 }
+
135 
136 
-
137  for (int64_t i = 0; i < 6; ++i) {
-
138  if (te(i) == id) {
-
139  leid = i;
-
140  break;
-
141  }
-
142  }
-
143  const auto [lvid, nleid, lfid] = autogen::tet_mesh::auto_3d_table_complete_edge[leid];
-
144  assert(leid == nleid);
-
145 
-
146 
-
147  if (lvid < 0 || leid < 0 || lfid < 0) throw std::runtime_error("edge_tuple_from_id failed");
+
137 void TetMesh::initialize(Eigen::Ref<const RowVectors4l> T)
+
138 {
+
139  auto [TE, TF, TT, VT, ET, FT] = tetmesh_topology_initialization(T);
+
140  initialize(T, TE, TF, TT, VT, ET, FT);
+
141 }
+
142 
+
143 Tuple TetMesh::vertex_tuple_from_id(int64_t id) const
+
144 {
+
145  int64_t t = m_vt_accessor->index_access().const_scalar_attribute(id);
+
146  auto tv = m_tv_accessor->index_access().const_vector_attribute(t);
+
147  int64_t lvid = -1;
148 
-
149  ConstAccessor<int64_t> hash_accessor = get_const_cell_hash_accessor();
-
150 
-
151  Tuple e_tuple = Tuple(lvid, leid, lfid, t, get_cell_hash(t, hash_accessor));
-
152  assert(is_ccw(e_tuple));
-
153  assert(is_valid(e_tuple, hash_accessor));
-
154  return e_tuple;
-
155 }
-
156 
-
157 Tuple TetMesh::face_tuple_from_id(int64_t id) const
-
158 {
-
159  ConstAccessor<int64_t> ft_accessor = create_accessor<int64_t>(m_ft_handle);
-
160  int64_t t = ft_accessor.index_access().const_scalar_attribute(id);
-
161  ConstAccessor<int64_t> tf_accessor = create_accessor<int64_t>(m_tf_handle);
-
162  auto tf = tf_accessor.index_access().const_vector_attribute(t);
-
163 
-
164  int64_t lfid = -1;
-
165 
-
166  for (int64_t i = 0; i < 4; ++i) {
-
167  if (tf(i) == id) {
-
168  lfid = i;
-
169  break;
-
170  }
-
171  }
-
172 
-
173  const auto [lvid, leid, nlfid] = autogen::tet_mesh::auto_3d_table_complete_face[lfid];
-
174  assert(lfid == nlfid);
+
149  for (int64_t i = 0; i < 4; ++i) {
+
150  if (tv(i) == id) {
+
151  lvid = i;
+
152  break;
+
153  }
+
154  }
+
155 
+
156  const auto [nlvid, leid, lfid] = autogen::tet_mesh::auto_3d_table_complete_vertex[lvid];
+
157  assert(lvid == nlvid);
+
158 
+
159  if (lvid < 0 || leid < 0 || lfid < 0) throw std::runtime_error("vertex_tuple_from_id failed");
+
160 
+
161  ConstAccessor<int64_t> hash_accessor = get_const_cell_hash_accessor();
+
162 
+
163  Tuple v_tuple = Tuple(lvid, leid, lfid, t, get_cell_hash(t, hash_accessor));
+
164  assert(is_ccw(v_tuple));
+
165  assert(is_valid(v_tuple, hash_accessor));
+
166  return v_tuple;
+
167 }
+
168 
+
169 Tuple TetMesh::edge_tuple_from_id(int64_t id) const
+
170 {
+
171  int64_t t = m_et_accessor->index_access().const_scalar_attribute(id);
+
172  auto te = m_te_accessor->index_access().const_vector_attribute(t);
+
173 
+
174  int64_t leid = -1;
175 
-
176  if (lvid < 0 || leid < 0 || lfid < 0) throw std::runtime_error("face_tuple_from_id failed");
-
177 
-
178  ConstAccessor<int64_t> hash_accessor = get_const_cell_hash_accessor();
-
179 
-
180  Tuple f_tuple = Tuple(lvid, leid, lfid, t, get_cell_hash(t, hash_accessor));
-
181  assert(is_ccw(f_tuple));
-
182  assert(is_valid(f_tuple, hash_accessor));
-
183  return f_tuple;
-
184 }
+
176  for (int64_t i = 0; i < 6; ++i) {
+
177  if (te(i) == id) {
+
178  leid = i;
+
179  break;
+
180  }
+
181  }
+
182  const auto [lvid, nleid, lfid] = autogen::tet_mesh::auto_3d_table_complete_edge[leid];
+
183  assert(leid == nleid);
+
184 
185 
-
186 Tuple TetMesh::tet_tuple_from_id(int64_t id) const
-
187 {
-
188  const int64_t lvid = 0;
-
189  const auto [nlvid, leid, lfid] = autogen::tet_mesh::auto_3d_table_complete_vertex[lvid];
-
190  assert(lvid == nlvid);
-
191 
-
192  ConstAccessor<int64_t> hash_accessor = get_const_cell_hash_accessor();
-
193 
-
194  Tuple t_tuple = Tuple(lvid, leid, lfid, id, get_cell_hash(id, hash_accessor));
-
195  assert(is_ccw(t_tuple));
-
196  assert(is_valid(t_tuple, hash_accessor));
-
197  return t_tuple;
-
198 }
-
199 
-
200 Tuple TetMesh::tuple_from_id(const PrimitiveType type, const int64_t gid) const
-
201 {
-
202  switch (type) {
-
203  case PrimitiveType::Vertex: {
-
204  return vertex_tuple_from_id(gid);
-
205  break;
-
206  }
-
207  case PrimitiveType::Edge: {
-
208  return edge_tuple_from_id(gid);
-
209  break;
-
210  }
-
211  case PrimitiveType::Face: {
-
212  return face_tuple_from_id(gid);
-
213  break;
-
214  }
-
215  case PrimitiveType::Tetrahedron: {
-
216  return tet_tuple_from_id(gid);
-
217  break;
-
218  }
-
219  case PrimitiveType::HalfEdge:
-
220  default: throw std::runtime_error("Invalid primitive type");
-
221  }
-
222 }
-
223 
-
224 int64_t TetMesh::id(const Tuple& tuple, PrimitiveType type) const
-
225 {
-
226  switch (type) {
-
227  case PrimitiveType::Vertex: {
-
228  ConstAccessor<int64_t> tv_accessor = create_accessor<int64_t>(m_tv_handle);
-
229  auto tv = tv_accessor.const_vector_attribute(tuple);
-
230  return tv(tuple.m_local_vid);
-
231  break;
-
232  }
-
233  case PrimitiveType::Edge: {
-
234  ConstAccessor<int64_t> te_accessor = create_accessor<int64_t>(m_te_handle);
-
235  auto te = te_accessor.const_vector_attribute(tuple);
-
236  return te(tuple.m_local_eid);
-
237  break;
-
238  }
-
239  case PrimitiveType::Face: {
-
240  ConstAccessor<int64_t> tf_accessor = create_accessor<int64_t>(m_tf_handle);
-
241  auto tf = tf_accessor.const_vector_attribute(tuple);
-
242  return tf(tuple.m_local_fid);
-
243  break;
-
244  }
-
245  case PrimitiveType::Tetrahedron: {
-
246  return tuple.m_global_cid;
-
247  break;
-
248  }
-
249  case PrimitiveType::HalfEdge:
-
250  default: throw std::runtime_error("Tuple id: Invalid primitive type");
+
186  if (lvid < 0 || leid < 0 || lfid < 0) throw std::runtime_error("edge_tuple_from_id failed");
+
187 
+
188  ConstAccessor<int64_t> hash_accessor = get_const_cell_hash_accessor();
+
189 
+
190  Tuple e_tuple = Tuple(lvid, leid, lfid, t, get_cell_hash(t, hash_accessor));
+
191  assert(is_ccw(e_tuple));
+
192  assert(is_valid(e_tuple, hash_accessor));
+
193  return e_tuple;
+
194 }
+
195 
+
196 Tuple TetMesh::face_tuple_from_id(int64_t id) const
+
197 {
+
198  int64_t t = m_ft_accessor->index_access().const_scalar_attribute(id);
+
199  auto tf = m_tf_accessor->index_access().const_vector_attribute(t);
+
200 
+
201  int64_t lfid = -1;
+
202 
+
203  for (int64_t i = 0; i < 4; ++i) {
+
204  if (tf(i) == id) {
+
205  lfid = i;
+
206  break;
+
207  }
+
208  }
+
209 
+
210  const auto [lvid, leid, nlfid] = autogen::tet_mesh::auto_3d_table_complete_face[lfid];
+
211  assert(lfid == nlfid);
+
212 
+
213  if (lvid < 0 || leid < 0 || lfid < 0) throw std::runtime_error("face_tuple_from_id failed");
+
214 
+
215  ConstAccessor<int64_t> hash_accessor = get_const_cell_hash_accessor();
+
216 
+
217  Tuple f_tuple = Tuple(lvid, leid, lfid, t, get_cell_hash(t, hash_accessor));
+
218  assert(is_ccw(f_tuple));
+
219  assert(is_valid(f_tuple, hash_accessor));
+
220  return f_tuple;
+
221 }
+
222 
+
223 Tuple TetMesh::tet_tuple_from_id(int64_t id) const
+
224 {
+
225  const int64_t lvid = 0;
+
226  const auto [nlvid, leid, lfid] = autogen::tet_mesh::auto_3d_table_complete_vertex[lvid];
+
227  assert(lvid == nlvid);
+
228 
+
229  ConstAccessor<int64_t> hash_accessor = get_const_cell_hash_accessor();
+
230 
+
231  Tuple t_tuple = Tuple(lvid, leid, lfid, id, get_cell_hash(id, hash_accessor));
+
232  assert(is_ccw(t_tuple));
+
233  assert(is_valid(t_tuple, hash_accessor));
+
234  return t_tuple;
+
235 }
+
236 
+
237 Tuple TetMesh::tuple_from_id(const PrimitiveType type, const int64_t gid) const
+
238 {
+
239  switch (type) {
+
240  case PrimitiveType::Vertex: {
+
241  return vertex_tuple_from_id(gid);
+
242  break;
+
243  }
+
244  case PrimitiveType::Edge: {
+
245  return edge_tuple_from_id(gid);
+
246  break;
+
247  }
+
248  case PrimitiveType::Face: {
+
249  return face_tuple_from_id(gid);
+
250  break;
251  }
-
252 }
-
253 
-
254 Tuple TetMesh::switch_tuple(const Tuple& tuple, PrimitiveType type) const
-
255 {
-
256  assert(is_valid_slow(tuple));
-
257  switch (type) {
-
258  // bool ccw = is_ccw(tuple);
-
259  case PrimitiveType::Tetrahedron: {
-
260  assert(!is_boundary_face(tuple));
-
261  // need test
-
262  const int64_t gvid = id(tuple, PrimitiveType::Vertex);
-
263  const int64_t geid = id(tuple, PrimitiveType::Edge);
-
264  const int64_t gfid = id(tuple, PrimitiveType::Face);
-
265 
-
266  ConstAccessor<int64_t> tt_accessor = create_const_accessor<int64_t>(m_tt_handle);
-
267  auto tt = tt_accessor.const_vector_attribute(tuple);
-
268 
-
269  int64_t gcid_new = tt(tuple.m_local_fid);
-
270 
-
271  /*handle exception here*/
-
272  assert(gcid_new != -1);
-
273  // check if is_boundary allows removing this exception in 3d cases
-
274  // if (gcid_new == -1) {
-
275  // return Tuple(-1, -1, -1, -1, -1);
-
276  // }
-
277  /*handle exception end*/
-
278 
-
279  int64_t lvid_new = -1, leid_new = -1, lfid_new = -1;
-
280 
-
281  ConstAccessor<int64_t> tv_accessor = create_const_accessor<int64_t>(m_tv_handle);
-
282  auto tv = tv_accessor.index_access().const_vector_attribute(gcid_new);
-
283 
-
284  ConstAccessor<int64_t> te_accessor = create_const_accessor<int64_t>(m_te_handle);
-
285  auto te = te_accessor.index_access().const_vector_attribute(gcid_new);
-
286 
-
287  ConstAccessor<int64_t> tf_accessor = create_const_accessor<int64_t>(m_tf_handle);
-
288  auto tf = tf_accessor.index_access().const_vector_attribute(gcid_new);
-
289 
-
290  for (int64_t i = 0; i < 4; ++i) {
-
291  if (tv(i) == gvid) {
-
292  lvid_new = i;
-
293  }
-
294  if (tf(i) == gfid) {
-
295  lfid_new = i;
-
296  }
-
297  }
-
298 
-
300  // for debug
-
301  std::vector<int64_t> debug_te;
-
302  std::vector<int64_t> debug_tv;
-
303  std::vector<int64_t> debug_tf;
-
304  std::vector<int64_t> debug_tt;
-
305  std::vector<int64_t> debug_origin_te;
-
306  std::vector<int64_t> debug_origin_tv;
-
307  std::vector<int64_t> debug_origin_tf;
-
308  std::vector<int64_t> debug_origin_tt;
-
309 
-
310  auto te_old = te_accessor.const_vector_attribute(tuple);
-
311  auto tv_old = tv_accessor.const_vector_attribute(tuple);
-
312  auto tf_old = tf_accessor.const_vector_attribute(tuple);
-
313  auto tt_old = tt_accessor.const_vector_attribute(tuple);
-
314 
-
315  for (int64_t i = 0; i < 6; ++i) {
-
316  debug_origin_te.push_back(te_old(i));
-
317  debug_te.push_back(te(i));
-
318  }
+
252  case PrimitiveType::Tetrahedron: {
+
253  return tet_tuple_from_id(gid);
+
254  break;
+
255  }
+
256  case PrimitiveType::HalfEdge:
+
257  default: throw std::runtime_error("Invalid primitive type");
+
258  }
+
259 }
+
260 
+
261 int64_t TetMesh::id(const Tuple& tuple, PrimitiveType type) const
+
262 {
+
263  switch (type) {
+
264  case PrimitiveType::Vertex: {
+
265  auto tv = m_tv_accessor->const_vector_attribute(tuple);
+
266  return tv(tuple.m_local_vid);
+
267  break;
+
268  }
+
269  case PrimitiveType::Edge: {
+
270  auto te = m_te_accessor->const_vector_attribute(tuple);
+
271  return te(tuple.m_local_eid);
+
272  break;
+
273  }
+
274  case PrimitiveType::Face: {
+
275  auto tf = m_tf_accessor->const_vector_attribute(tuple);
+
276  return tf(tuple.m_local_fid);
+
277  break;
+
278  }
+
279  case PrimitiveType::Tetrahedron: {
+
280  return tuple.m_global_cid;
+
281  break;
+
282  }
+
283  case PrimitiveType::HalfEdge:
+
284  default: throw std::runtime_error("Tuple id: Invalid primitive type");
+
285  }
+
286 }
+
287 
+
288 Tuple TetMesh::switch_tuple(const Tuple& tuple, PrimitiveType type) const
+
289 {
+
290  assert(is_valid_slow(tuple));
+
291  switch (type) {
+
292  // bool ccw = is_ccw(tuple);
+
293  case PrimitiveType::Tetrahedron: {
+
294  assert(!is_boundary_face(tuple));
+
295  // need test
+
296  const int64_t gvid = id(tuple, PrimitiveType::Vertex);
+
297  const int64_t geid = id(tuple, PrimitiveType::Edge);
+
298  const int64_t gfid = id(tuple, PrimitiveType::Face);
+
299 
+
300  auto tt = m_tt_accessor->const_vector_attribute(tuple);
+
301 
+
302  int64_t gcid_new = tt(tuple.m_local_fid);
+
303 
+
304  /*handle exception here*/
+
305  assert(gcid_new != -1);
+
306  // check if is_boundary allows removing this exception in 3d cases
+
307  // if (gcid_new == -1) {
+
308  // return Tuple(-1, -1, -1, -1, -1);
+
309  // }
+
310  /*handle exception end*/
+
311 
+
312  int64_t lvid_new = -1, leid_new = -1, lfid_new = -1;
+
313 
+
314  auto tv = m_tv_accessor->index_access().const_vector_attribute(gcid_new);
+
315 
+
316  auto te = m_te_accessor->index_access().const_vector_attribute(gcid_new);
+
317 
+
318  auto tf = m_tf_accessor->index_access().const_vector_attribute(gcid_new);
319 
320  for (int64_t i = 0; i < 4; ++i) {
-
321  debug_origin_tv.push_back(tv_old(i));
-
322  debug_tv.push_back(tv(i));
-
323  debug_origin_tf.push_back(tf_old(i));
-
324  debug_tf.push_back(tf(i));
-
325  debug_origin_tt.push_back(tt_old(i));
-
326  debug_tt.push_back(tt(i));
+
321  if (tv(i) == gvid) {
+
322  lvid_new = i;
+
323  }
+
324  if (tf(i) == gfid) {
+
325  lfid_new = i;
+
326  }
327  }
328 
-
330 
-
331  for (int64_t i = 0; i < 6; ++i) {
-
332  if (te(i) == geid) {
-
333  leid_new = i;
-
334  break; // check if the break is correct
-
335  }
-
336  }
-
337 
-
338 
-
339  assert(lvid_new != -1);
-
340  assert(leid_new != -1);
-
341  assert(lfid_new != -1);
-
342 
-
343  const Tuple res(lvid_new, leid_new, lfid_new, gcid_new, get_cell_hash_slow(gcid_new));
-
344  assert(is_valid_slow(res));
-
345  return res;
-
346  }
-
347  case PrimitiveType::Vertex:
-
348  case PrimitiveType::Edge:
-
349  case PrimitiveType::Face:
-
350  default: return autogen::tet_mesh::local_switch_tuple(tuple, type);
-
351  case PrimitiveType::HalfEdge: throw std::runtime_error("Tuple id: Invalid primitive type");
-
352  }
-
353 }
-
354 
-
355 bool TetMesh::is_ccw(const Tuple& tuple) const
-
356 {
-
357  assert(is_valid_slow(tuple));
-
358  return autogen::tet_mesh::is_ccw(tuple);
-
359 }
+
330  // for debug
+
331  std::vector<int64_t> debug_te;
+
332  std::vector<int64_t> debug_tv;
+
333  std::vector<int64_t> debug_tf;
+
334  std::vector<int64_t> debug_tt;
+
335  std::vector<int64_t> debug_origin_te;
+
336  std::vector<int64_t> debug_origin_tv;
+
337  std::vector<int64_t> debug_origin_tf;
+
338  std::vector<int64_t> debug_origin_tt;
+
339 
+
340  auto te_old = m_te_accessor->const_vector_attribute(tuple);
+
341  auto tv_old = m_tv_accessor->const_vector_attribute(tuple);
+
342  auto tf_old = m_tf_accessor->const_vector_attribute(tuple);
+
343  auto tt_old = m_tt_accessor->const_vector_attribute(tuple);
+
344 
+
345  for (int64_t i = 0; i < 6; ++i) {
+
346  debug_origin_te.push_back(te_old(i));
+
347  debug_te.push_back(te(i));
+
348  }
+
349 
+
350  for (int64_t i = 0; i < 4; ++i) {
+
351  debug_origin_tv.push_back(tv_old(i));
+
352  debug_tv.push_back(tv(i));
+
353  debug_origin_tf.push_back(tf_old(i));
+
354  debug_tf.push_back(tf(i));
+
355  debug_origin_tt.push_back(tt_old(i));
+
356  debug_tt.push_back(tt(i));
+
357  }
+
358 
360 
-
361 bool TetMesh::is_valid(const Tuple& tuple, ConstAccessor<int64_t>& hash_accessor) const
-
362 {
-
363  if (tuple.is_null()) return false;
-
364  const bool is_connectivity_valid = tuple.m_local_vid >= 0 && tuple.m_local_eid >= 0 &&
-
365  tuple.m_local_fid >= 0 && tuple.m_global_cid >= 0 &&
-
366  autogen::tet_mesh::tuple_is_valid_for_ccw(tuple);
+
361  for (int64_t i = 0; i < 6; ++i) {
+
362  if (te(i) == geid) {
+
363  leid_new = i;
+
364  break; // check if the break is correct
+
365  }
+
366  }
367 
-
368  if (!is_connectivity_valid) {
-
369  return false;
-
370  }
-
371 
-
372  return Mesh::is_hash_valid(tuple, hash_accessor);
-
373 }
-
374 
-
375 bool TetMesh::is_boundary(PrimitiveType pt, const Tuple& tuple) const
-
376 {
-
377  switch (pt) {
-
378  case PrimitiveType::Vertex: return is_boundary_vertex(tuple);
-
379  case PrimitiveType::Edge: return is_boundary_edge(tuple);
-
380  case PrimitiveType::Face: return is_boundary_face(tuple);
-
381  case PrimitiveType::Tetrahedron:
-
382  case PrimitiveType::HalfEdge:
-
383  default: break;
-
384  }
-
385  throw std::runtime_error(
-
386  "tried to compute the boundary of an tet mesh for an invalid simplex dimension");
-
387  return false;
-
388 }
-
389 
+
368 
+
369  assert(lvid_new != -1);
+
370  assert(leid_new != -1);
+
371  assert(lfid_new != -1);
+
372 
+
373  const Tuple res(lvid_new, leid_new, lfid_new, gcid_new, get_cell_hash_slow(gcid_new));
+
374  assert(is_valid_slow(res));
+
375  return res;
+
376  }
+
377  case PrimitiveType::Vertex:
+
378  case PrimitiveType::Edge:
+
379  case PrimitiveType::Face:
+
380  default: return autogen::tet_mesh::local_switch_tuple(tuple, type);
+
381  case PrimitiveType::HalfEdge: throw std::runtime_error("Tuple id: Invalid primitive type");
+
382  }
+
383 }
+
384 
+
385 bool TetMesh::is_ccw(const Tuple& tuple) const
+
386 {
+
387  assert(is_valid_slow(tuple));
+
388  return autogen::tet_mesh::is_ccw(tuple);
+
389 }
390 
-
391 bool TetMesh::is_boundary_face(const Tuple& tuple) const
+
391 bool TetMesh::is_valid(const Tuple& tuple, ConstAccessor<int64_t>& hash_accessor) const
392 {
-
393  ConstAccessor<int64_t> tt_accessor = create_accessor<int64_t>(m_tt_handle);
-
394  return tt_accessor.const_vector_attribute(tuple)(tuple.m_local_fid) < 0;
-
395 }
-
396 
-
397 bool TetMesh::is_boundary_edge(const Tuple& edge) const
-
398 {
-
399  for (const Tuple& f : simplex::cofaces_single_dimension_tuples(
-
400  *this,
-
401  simplex::Simplex::edge(edge),
-
402  PrimitiveType::Face)) {
-
403  if (is_boundary_face(f)) {
-
404  return true;
-
405  }
-
406  }
-
407  return false;
-
408 }
-
409 bool TetMesh::is_boundary_vertex(const Tuple& vertex) const
-
410 {
-
411  // go through all faces and check if they are boundary
-
412  const simplex::SimplexCollection neigh =
-
413  wmtk::simplex::open_star(*this, simplex::Simplex::vertex(vertex));
-
414  for (const simplex::Simplex& s : neigh.simplex_vector(PrimitiveType::Face)) {
-
415  if (is_boundary(s)) {
-
416  return true;
-
417  }
-
418  }
+
393  if (tuple.is_null()) return false;
+
394  const bool is_connectivity_valid = tuple.m_local_vid >= 0 && tuple.m_local_eid >= 0 &&
+
395  tuple.m_local_fid >= 0 && tuple.m_global_cid >= 0 &&
+
396  autogen::tet_mesh::tuple_is_valid_for_ccw(tuple);
+
397 
+
398  if (!is_connectivity_valid) {
+
399  return false;
+
400  }
+
401 
+
402  return Mesh::is_hash_valid(tuple, hash_accessor);
+
403 }
+
404 
+
405 bool TetMesh::is_boundary(PrimitiveType pt, const Tuple& tuple) const
+
406 {
+
407  switch (pt) {
+
408  case PrimitiveType::Vertex: return is_boundary_vertex(tuple);
+
409  case PrimitiveType::Edge: return is_boundary_edge(tuple);
+
410  case PrimitiveType::Face: return is_boundary_face(tuple);
+
411  case PrimitiveType::Tetrahedron:
+
412  case PrimitiveType::HalfEdge:
+
413  default: break;
+
414  }
+
415  throw std::runtime_error(
+
416  "tried to compute the boundary of an tet mesh for an invalid simplex dimension");
+
417  return false;
+
418 }
419 
-
420  return false;
-
421 }
-
422 
-
423 bool TetMesh::is_connectivity_valid() const
-
424 {
-
425  // get Accessors for topology
-
426  ConstAccessor<int64_t> tv_accessor = create_const_accessor<int64_t>(m_tv_handle);
-
427  ConstAccessor<int64_t> te_accessor = create_const_accessor<int64_t>(m_te_handle);
-
428  ConstAccessor<int64_t> tf_accessor = create_const_accessor<int64_t>(m_tf_handle);
-
429  ConstAccessor<int64_t> tt_accessor = create_const_accessor<int64_t>(m_tt_handle);
-
430  ConstAccessor<int64_t> vt_accessor = create_const_accessor<int64_t>(m_vt_handle);
-
431  ConstAccessor<int64_t> et_accessor = create_const_accessor<int64_t>(m_et_handle);
-
432  ConstAccessor<int64_t> ft_accessor = create_const_accessor<int64_t>(m_ft_handle);
-
433  ConstAccessor<char> v_flag_accessor = get_flag_accessor(PrimitiveType::Vertex);
-
434  ConstAccessor<char> e_flag_accessor = get_flag_accessor(PrimitiveType::Edge);
-
435  ConstAccessor<char> f_flag_accessor = get_flag_accessor(PrimitiveType::Face);
-
436  ConstAccessor<char> t_flag_accessor = get_flag_accessor(PrimitiveType::Tetrahedron);
-
437 
-
438  // VT and TV
-
439  for (int64_t i = 0; i < capacity(PrimitiveType::Vertex); ++i) {
-
440  if (v_flag_accessor.index_access().const_scalar_attribute(i) == 0) {
-
441  wmtk::logger().debug("Vertex {} is deleted", i);
-
442  continue;
-
443  }
-
444  int cnt = 0;
-
445  for (int j = 0; j < 4; ++j) {
-
446  if (tv_accessor.index_access().const_vector_attribute(
-
447  vt_accessor.index_access().const_scalar_attribute(i))[j] == i) {
-
448  cnt++;
-
449  }
-
450  }
-
451  if (cnt != 1) {
-
452  wmtk::logger().info("fail VT and TV");
-
453  return false;
-
454  }
-
455  }
-
456 
-
457  // ET and TE
-
458  for (int64_t i = 0; i < capacity(PrimitiveType::Edge); ++i) {
-
459  if (e_flag_accessor.index_access().const_scalar_attribute(i) == 0) {
-
460  wmtk::logger().debug("Edge {} is deleted", i);
-
461  continue;
-
462  }
-
463  int cnt = 0;
-
464  for (int j = 0; j < 6; ++j) {
-
465  if (te_accessor.index_access().const_vector_attribute(
-
466  et_accessor.index_access().const_scalar_attribute(i))[j] == i) {
-
467  cnt++;
-
468  }
-
469  }
-
470  if (cnt != 1) {
-
471  wmtk::logger().info("fail ET and TE");
-
472  return false;
+
420 
+
421 bool TetMesh::is_boundary_face(const Tuple& tuple) const
+
422 {
+
423  ConstAccessor<int64_t> tt_accessor = create_accessor<int64_t>(m_tt_handle);
+
424  return tt_accessor.const_vector_attribute(tuple)(tuple.m_local_fid) < 0;
+
425 }
+
426 
+
427 bool TetMesh::is_boundary_edge(const Tuple& edge) const
+
428 {
+
429  for (const Tuple& f : simplex::cofaces_single_dimension_tuples(
+
430  *this,
+
431  simplex::Simplex::edge(edge),
+
432  PrimitiveType::Face)) {
+
433  if (is_boundary_face(f)) {
+
434  return true;
+
435  }
+
436  }
+
437  return false;
+
438 }
+
439 bool TetMesh::is_boundary_vertex(const Tuple& vertex) const
+
440 {
+
441  // go through all faces and check if they are boundary
+
442  const simplex::SimplexCollection neigh =
+
443  wmtk::simplex::open_star(*this, simplex::Simplex::vertex(vertex));
+
444  for (const simplex::Simplex& s : neigh.simplex_vector(PrimitiveType::Face)) {
+
445  if (is_boundary(s)) {
+
446  return true;
+
447  }
+
448  }
+
449 
+
450  return false;
+
451 }
+
452 
+
453 bool TetMesh::is_connectivity_valid() const
+
454 {
+
455  // get Accessors for topology
+
456  ConstAccessor<int64_t> tv_accessor = create_const_accessor<int64_t>(m_tv_handle);
+
457  ConstAccessor<int64_t> te_accessor = create_const_accessor<int64_t>(m_te_handle);
+
458  ConstAccessor<int64_t> tf_accessor = create_const_accessor<int64_t>(m_tf_handle);
+
459  ConstAccessor<int64_t> tt_accessor = create_const_accessor<int64_t>(m_tt_handle);
+
460  ConstAccessor<int64_t> vt_accessor = create_const_accessor<int64_t>(m_vt_handle);
+
461  ConstAccessor<int64_t> et_accessor = create_const_accessor<int64_t>(m_et_handle);
+
462  ConstAccessor<int64_t> ft_accessor = create_const_accessor<int64_t>(m_ft_handle);
+
463  ConstAccessor<char> v_flag_accessor = get_flag_accessor(PrimitiveType::Vertex);
+
464  ConstAccessor<char> e_flag_accessor = get_flag_accessor(PrimitiveType::Edge);
+
465  ConstAccessor<char> f_flag_accessor = get_flag_accessor(PrimitiveType::Face);
+
466  ConstAccessor<char> t_flag_accessor = get_flag_accessor(PrimitiveType::Tetrahedron);
+
467 
+
468  // VT and TV
+
469  for (int64_t i = 0; i < capacity(PrimitiveType::Vertex); ++i) {
+
470  if (v_flag_accessor.index_access().const_scalar_attribute(i) == 0) {
+
471  wmtk::logger().debug("Vertex {} is deleted", i);
+
472  continue;
473  }
-
474  }
-
475 
-
476  // FT and TF
-
477  for (int64_t i = 0; i < capacity(PrimitiveType::Face); ++i) {
-
478  if (f_flag_accessor.index_access().const_scalar_attribute(i) == 0) {
-
479  wmtk::logger().debug("Face {} is deleted", i);
-
480  continue;
-
481  }
-
482  int cnt = 0;
-
483  for (int j = 0; j < 4; ++j) {
-
484  if (tf_accessor.index_access().const_vector_attribute(
-
485  ft_accessor.index_access().const_scalar_attribute(i))[j] == i) {
-
486  cnt++;
-
487  }
-
488  }
-
489  if (cnt != 1) {
-
490  wmtk::logger().info("fail FT and TF");
-
491  return false;
+
474  int cnt = 0;
+
475  for (int j = 0; j < 4; ++j) {
+
476  if (tv_accessor.index_access().const_vector_attribute(
+
477  vt_accessor.index_access().const_scalar_attribute(i))[j] == i) {
+
478  cnt++;
+
479  }
+
480  }
+
481  if (cnt != 1) {
+
482  wmtk::logger().info("fail VT and TV");
+
483  return false;
+
484  }
+
485  }
+
486 
+
487  // ET and TE
+
488  for (int64_t i = 0; i < capacity(PrimitiveType::Edge); ++i) {
+
489  if (e_flag_accessor.index_access().const_scalar_attribute(i) == 0) {
+
490  wmtk::logger().debug("Edge {} is deleted", i);
+
491  continue;
492  }
-
493  }
-
494 
-
495  // TF and TT
-
496  for (int64_t i = 0; i < capacity(PrimitiveType::Tetrahedron); ++i) {
-
497  if (t_flag_accessor.index_access().const_scalar_attribute(i) == 0) {
-
498  wmtk::logger().debug("Tet {} is deleted", i);
-
499  continue;
-
500  }
-
501 
-
502  for (int j = 0; j < 4; ++j) {
-
503  int64_t nb = tt_accessor.index_access().const_vector_attribute(i)(j);
-
504  if (nb == -1) {
-
505  if (ft_accessor.index_access().const_scalar_attribute(
-
506  tf_accessor.index_access().const_vector_attribute(i)(j)) != i) {
-
507  wmtk::logger().info("fail TF and TT 1");
-
508  return false;
-
509  }
-
510  continue;
-
511  }
-
512 
-
513  int cnt = 0;
-
514  int id_in_nb;
-
515  for (int k = 0; k < 4; ++k) {
-
516  if (tt_accessor.index_access().const_vector_attribute(nb)(k) == i) {
-
517  cnt++;
-
518  id_in_nb = k;
-
519  }
-
520  }
-
521  if (cnt != 1) {
-
522  wmtk::logger().info("fail TF and TT 2");
-
523  return false;
-
524  }
-
525 
-
526  if (tf_accessor.index_access().const_vector_attribute(i)(j) !=
-
527  tf_accessor.index_access().const_vector_attribute(nb)(id_in_nb)) {
-
528  wmtk::logger().info("fail TF and TT 3");
-
529  return false;
-
530  }
-
531  }
-
532  }
-
533 
-
534  return true;
-
535 }
-
536 
-
537 std::vector<std::vector<TypedAttributeHandle<int64_t>>> TetMesh::connectivity_attributes() const
-
538 {
-
539  std::vector<std::vector<TypedAttributeHandle<int64_t>>> handles(4);
-
540 
-
541  handles[0].push_back(m_tv_handle);
-
542  handles[1].push_back(m_te_handle);
-
543  handles[2].push_back(m_tf_handle);
-
544 
-
545  handles[3].push_back(m_tt_handle);
-
546  handles[3].push_back(m_vt_handle);
-
547  handles[3].push_back(m_et_handle);
-
548  handles[3].push_back(m_ft_handle);
-
549 
-
550  return handles;
-
551 }
-
552 
-
553 Tuple TetMesh::tuple_from_global_ids(int64_t tid, int64_t fid, int64_t eid, int64_t vid) const
-
554 {
-
555  ConstAccessor<int64_t> tv_accessor = create_const_accessor<int64_t>(m_tv_handle);
-
556  auto tv = tv_accessor.index_access().const_vector_attribute(tid);
-
557  ConstAccessor<int64_t> te_accessor = create_const_accessor<int64_t>(m_te_handle);
-
558  auto te = te_accessor.index_access().const_vector_attribute(tid);
-
559  ConstAccessor<int64_t> tf_accessor = create_const_accessor<int64_t>(m_tf_handle);
-
560  auto tf = tf_accessor.index_access().const_vector_attribute(tid);
-
561 
-
562  int64_t lvid = -1, leid = -1, lfid = -1;
+
493  int cnt = 0;
+
494  for (int j = 0; j < 6; ++j) {
+
495  if (te_accessor.index_access().const_vector_attribute(
+
496  et_accessor.index_access().const_scalar_attribute(i))[j] == i) {
+
497  cnt++;
+
498  }
+
499  }
+
500  if (cnt != 1) {
+
501  wmtk::logger().info("fail ET and TE");
+
502  return false;
+
503  }
+
504  }
+
505 
+
506  // FT and TF
+
507  for (int64_t i = 0; i < capacity(PrimitiveType::Face); ++i) {
+
508  if (f_flag_accessor.index_access().const_scalar_attribute(i) == 0) {
+
509  wmtk::logger().debug("Face {} is deleted", i);
+
510  continue;
+
511  }
+
512  int cnt = 0;
+
513  for (int j = 0; j < 4; ++j) {
+
514  if (tf_accessor.index_access().const_vector_attribute(
+
515  ft_accessor.index_access().const_scalar_attribute(i))[j] == i) {
+
516  cnt++;
+
517  }
+
518  }
+
519  if (cnt != 1) {
+
520  wmtk::logger().info("fail FT and TF");
+
521  return false;
+
522  }
+
523  }
+
524 
+
525  // TF and TT
+
526  for (int64_t i = 0; i < capacity(PrimitiveType::Tetrahedron); ++i) {
+
527  if (t_flag_accessor.index_access().const_scalar_attribute(i) == 0) {
+
528  wmtk::logger().debug("Tet {} is deleted", i);
+
529  continue;
+
530  }
+
531 
+
532  for (int j = 0; j < 4; ++j) {
+
533  int64_t nb = tt_accessor.index_access().const_vector_attribute(i)(j);
+
534  if (nb == -1) {
+
535  if (ft_accessor.index_access().const_scalar_attribute(
+
536  tf_accessor.index_access().const_vector_attribute(i)(j)) != i) {
+
537  wmtk::logger().info("fail TF and TT 1");
+
538  return false;
+
539  }
+
540  continue;
+
541  }
+
542 
+
543  int cnt = 0;
+
544  int id_in_nb;
+
545  for (int k = 0; k < 4; ++k) {
+
546  if (tt_accessor.index_access().const_vector_attribute(nb)(k) == i) {
+
547  cnt++;
+
548  id_in_nb = k;
+
549  }
+
550  }
+
551  if (cnt != 1) {
+
552  wmtk::logger().info("fail TF and TT 2");
+
553  return false;
+
554  }
+
555 
+
556  if (tf_accessor.index_access().const_vector_attribute(i)(j) !=
+
557  tf_accessor.index_access().const_vector_attribute(nb)(id_in_nb)) {
+
558  wmtk::logger().info("fail TF and TT 3");
+
559  return false;
+
560  }
+
561  }
+
562  }
563 
-
564  for (int j = 0; j < 4; ++j) {
-
565  if (tv(j) == vid) {
-
566  lvid = j;
-
567  }
-
568  if (tf(j) == fid) {
-
569  lfid = j;
-
570  }
-
571  }
-
572 
-
573  for (int j = 0; j < 6; ++j) {
-
574  if (te(j) == eid) {
-
575  leid = j;
-
576  break;
-
577  }
-
578  }
+
564  return true;
+
565 }
+
566 
+
567 std::vector<std::vector<TypedAttributeHandle<int64_t>>> TetMesh::connectivity_attributes() const
+
568 {
+
569  std::vector<std::vector<TypedAttributeHandle<int64_t>>> handles(4);
+
570 
+
571  handles[0].push_back(m_tv_handle);
+
572  handles[1].push_back(m_te_handle);
+
573  handles[2].push_back(m_tf_handle);
+
574 
+
575  handles[3].push_back(m_tt_handle);
+
576  handles[3].push_back(m_vt_handle);
+
577  handles[3].push_back(m_et_handle);
+
578  handles[3].push_back(m_ft_handle);
579 
-
580  assert(lvid != -1);
-
581  assert(leid != -1);
-
582  assert(lfid != -1);
-
583 
-
584  return Tuple(lvid, leid, lfid, tid, get_cell_hash_slow(tid));
-
585 }
-
586 
-
587 
-
588 } // namespace wmtk
+
580  return handles;
+
581 }
+
582 
+
583 Tuple TetMesh::tuple_from_global_ids(int64_t tid, int64_t fid, int64_t eid, int64_t vid) const
+
584 {
+
585  auto tv = m_tv_accessor->index_access().const_vector_attribute(tid);
+
586  auto te = m_te_accessor->index_access().const_vector_attribute(tid);
+
587  auto tf = m_tf_accessor->index_access().const_vector_attribute(tid);
+
588 
+
589  int64_t lvid = -1, leid = -1, lfid = -1;
+
590 
+
591  for (int j = 0; j < 4; ++j) {
+
592  if (tv(j) == vid) {
+
593  lvid = j;
+
594  }
+
595  if (tf(j) == fid) {
+
596  lfid = j;
+
597  }
+
598  }
+
599 
+
600  for (int j = 0; j < 6; ++j) {
+
601  if (te(j) == eid) {
+
602  leid = j;
+
603  break;
+
604  }
+
605  }
+
606 
+
607  assert(lvid != -1);
+
608  assert(leid != -1);
+
609  assert(lfid != -1);
+
610 
+
611  return Tuple(lvid, leid, lfid, tid, get_cell_hash_slow(tid));
+
612 }
+
613 
+
614 
+
615 } // namespace wmtk
@@ -712,33 +739,44 @@
int64_t capacity(PrimitiveType type) const
read in the m_capacities return the upper bound for the number of entities of the given dimension
int64_t get_cell_hash_slow(int64_t cell_index) const
Definition: Mesh.cpp:154
ConstAccessor< int64_t > get_const_cell_hash_accessor() const
Definition: Mesh.cpp:92
+
Mesh & operator=(const Mesh &other)=delete
bool is_valid_slow(const Tuple &tuple) const
Definition: Mesh.cpp:72
int64_t get_cell_hash(int64_t cell_index, const ConstAccessor< int64_t > &hash_accessor) const
Definition: Mesh.cpp:149
-
TypedAttributeHandle< int64_t > m_tt_handle
Definition: TetMesh.hpp:83
-
bool is_ccw(const Tuple &tuple) const override
TODO this needs dimension?
Definition: TetMesh.cpp:355
-
TypedAttributeHandle< int64_t > m_vt_handle
Definition: TetMesh.hpp:75
-
std::vector< std::vector< TypedAttributeHandle< int64_t > > > connectivity_attributes() const override
Returns a vector of vectors of attribute handles.
Definition: TetMesh.cpp:537
-
bool is_boundary_vertex(const Tuple &tuple) const
Definition: TetMesh.cpp:409
-
Tuple switch_tuple(const Tuple &tuple, PrimitiveType type) const override
switch the orientation of the Tuple of the given dimension
Definition: TetMesh.cpp:254
-
int64_t id(const Tuple &tuple, PrimitiveType type) const override
return the global id of the Tuple of the given dimension
Definition: TetMesh.cpp:224
-
Tuple tuple_from_global_ids(int64_t tid, int64_t fid, int64_t eid, int64_t vid) const
Definition: TetMesh.cpp:553
+
Definition: TetMesh.hpp:13
+
TypedAttributeHandle< int64_t > m_tt_handle
Definition: TetMesh.hpp:84
+
bool is_ccw(const Tuple &tuple) const override
TODO this needs dimension?
Definition: TetMesh.cpp:385
+
TetMesh & operator=(const TetMesh &o)=delete
+
TypedAttributeHandle< int64_t > m_vt_handle
Definition: TetMesh.hpp:76
+
std::vector< std::vector< TypedAttributeHandle< int64_t > > > connectivity_attributes() const override
Returns a vector of vectors of attribute handles.
Definition: TetMesh.cpp:567
+
bool is_boundary_vertex(const Tuple &tuple) const
Definition: TetMesh.cpp:439
+
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_et_accessor
Definition: TetMesh.hpp:87
+
void make_cached_accessors()
Definition: TetMesh.cpp:64
+
Tuple switch_tuple(const Tuple &tuple, PrimitiveType type) const override
switch the orientation of the Tuple of the given dimension
Definition: TetMesh.cpp:288
+
int64_t id(const Tuple &tuple, PrimitiveType type) const override
return the global id of the Tuple of the given dimension
Definition: TetMesh.cpp:261
+
Tuple tuple_from_global_ids(int64_t tid, int64_t fid, int64_t eid, int64_t vid) const
Definition: TetMesh.cpp:583
bool is_boundary(const simplex::Simplex &tuple) const
check if a simplex lies on a boundary or not
Definition: Mesh.cpp:54
-
TypedAttributeHandle< int64_t > m_tv_handle
Definition: TetMesh.hpp:80
-
bool is_boundary_edge(const Tuple &tuple) const
Definition: TetMesh.cpp:397
-
Tuple edge_tuple_from_id(int64_t id) const
Definition: TetMesh.cpp:128
-
Tuple face_tuple_from_id(int64_t id) const
Definition: TetMesh.cpp:157
-
Tuple tet_tuple_from_id(int64_t id) const
Definition: TetMesh.cpp:186
-
bool is_connectivity_valid() const override
Definition: TetMesh.cpp:423
-
TypedAttributeHandle< int64_t > m_tf_handle
Definition: TetMesh.hpp:82
-
Tuple tuple_from_id(const PrimitiveType type, const int64_t gid) const override
internal function that returns the tuple of requested type, and has the global index cid
Definition: TetMesh.cpp:200
-
Tuple vertex_tuple_from_id(int64_t id) const
Definition: TetMesh.cpp:100
-
void initialize(Eigen::Ref< const RowVectors4l > TV, Eigen::Ref< const RowVectors6l > TE, Eigen::Ref< const RowVectors4l > TF, Eigen::Ref< const RowVectors4l > TT, Eigen::Ref< const VectorXl > VT, Eigen::Ref< const VectorXl > ET, Eigen::Ref< const VectorXl > FT)
Definition: TetMesh.cpp:34
-
bool is_valid(const Tuple &tuple, ConstAccessor< int64_t > &hash_accessor) const override
check validity of tuple including its hash
Definition: TetMesh.cpp:361
-
TypedAttributeHandle< int64_t > m_te_handle
Definition: TetMesh.hpp:81
-
TypedAttributeHandle< int64_t > m_et_handle
Definition: TetMesh.hpp:77
-
TypedAttributeHandle< int64_t > m_ft_handle
Definition: TetMesh.hpp:78
+
TypedAttributeHandle< int64_t > m_tv_handle
Definition: TetMesh.hpp:81
+
bool is_boundary_edge(const Tuple &tuple) const
Definition: TetMesh.cpp:427
+
Tuple edge_tuple_from_id(int64_t id) const
Definition: TetMesh.cpp:169
+
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_ft_accessor
Definition: TetMesh.hpp:88
+
Tuple face_tuple_from_id(int64_t id) const
Definition: TetMesh.cpp:196
+
Tuple tet_tuple_from_id(int64_t id) const
Definition: TetMesh.cpp:223
+
bool is_connectivity_valid() const override
Definition: TetMesh.cpp:453
+
TypedAttributeHandle< int64_t > m_tf_handle
Definition: TetMesh.hpp:83
+
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_tf_accessor
Definition: TetMesh.hpp:92
+
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_tt_accessor
Definition: TetMesh.hpp:93
+
Tuple tuple_from_id(const PrimitiveType type, const int64_t gid) const override
internal function that returns the tuple of requested type, and has the global index cid
Definition: TetMesh.cpp:237
+
Tuple vertex_tuple_from_id(int64_t id) const
Definition: TetMesh.cpp:143
+
void initialize(Eigen::Ref< const RowVectors4l > TV, Eigen::Ref< const RowVectors6l > TE, Eigen::Ref< const RowVectors4l > TF, Eigen::Ref< const RowVectors4l > TT, Eigen::Ref< const VectorXl > VT, Eigen::Ref< const VectorXl > ET, Eigen::Ref< const VectorXl > FT)
Definition: TetMesh.cpp:77
+
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_te_accessor
Definition: TetMesh.hpp:91
+
bool is_valid(const Tuple &tuple, ConstAccessor< int64_t > &hash_accessor) const override
check validity of tuple including its hash
Definition: TetMesh.cpp:391
+
TypedAttributeHandle< int64_t > m_te_handle
Definition: TetMesh.hpp:82
+
TypedAttributeHandle< int64_t > m_et_handle
Definition: TetMesh.hpp:78
+
TypedAttributeHandle< int64_t > m_ft_handle
Definition: TetMesh.hpp:79
TetMesh()
Definition: TetMesh.cpp:17
-
bool is_boundary_face(const Tuple &tuple) const
Definition: TetMesh.cpp:391
+
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_vt_accessor
Definition: TetMesh.hpp:86
+
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_tv_accessor
Definition: TetMesh.hpp:90
+
bool is_boundary_face(const Tuple &tuple) const
Definition: TetMesh.cpp:421
Definition: Tuple.hpp:30
bool is_null() const
Definition: Tuple.cpp:56
int8_t m_local_vid
Definition: Tuple.hpp:34
@@ -751,6 +789,7 @@
static Simplex vertex(const Tuple &t)
Definition: Simplex.hpp:27
static Simplex edge(const Tuple &t)
Definition: Simplex.hpp:28
+
Definition: autodiff.h:995
Tuple local_switch_tuple(const Tuple &tuple, PrimitiveType pt)
bool tuple_is_valid_for_ccw(const Tuple &tuple)
Definition: is_ccw.cpp:17
const int64_t auto_3d_table_complete_vertex[4][3]
diff --git a/_tet_mesh_8hpp_source.html b/_tet_mesh_8hpp_source.html index 6d88a60350..59973b8b9d 100644 --- a/_tet_mesh_8hpp_source.html +++ b/_tet_mesh_8hpp_source.html @@ -134,17 +134,17 @@
17  friend class operations::utils::UpdateEdgeOperationMultiMeshMapFunctor;
18  TetMesh();
19  TetMesh(const TetMesh& o) = delete;
-
20  TetMesh(TetMesh&& o) = default;
-
21  TetMesh& operator=(const TetMesh& o) = delete;
-
22  TetMesh& operator=(TetMesh&& o)= default;
+
20  TetMesh(TetMesh&& o);
+
21  TetMesh& operator=(const TetMesh& o) = delete;
+
22  TetMesh& operator=(TetMesh&& o);
23 
24  int64_t top_cell_dimension() const override { return 3; }
25  Tuple switch_tuple(const Tuple& tuple, PrimitiveType type) const override;
26  bool is_ccw(const Tuple& tuple) const override;
27  using Mesh::is_boundary;
-
28  bool is_boundary(PrimitiveType pt, const Tuple& tuple ) const override;
-
29  bool is_boundary_vertex(const Tuple& tuple) const ;
-
30  bool is_boundary_edge(const Tuple& tuple) const ;
+
28  bool is_boundary(PrimitiveType pt, const Tuple& tuple) const override;
+
29  bool is_boundary_vertex(const Tuple& tuple) const;
+
30  bool is_boundary_edge(const Tuple& tuple) const;
31  bool is_boundary_face(const Tuple& tuple) const;
32 
33  bool is_valid(const Tuple& tuple, ConstAccessor<int64_t>& hash_accessor) const override;
@@ -165,79 +165,95 @@
48  const override;
49 
50 protected:
-
51  int64_t id(const Tuple& tuple, PrimitiveType type) const override;
-
52  int64_t id(const simplex::Simplex& simplex) const
-
53  {
-
54  return id(simplex.tuple(), simplex.primitive_type());
-
55  }
-
56 
+
51  void make_cached_accessors();
+
52  int64_t id(const Tuple& tuple, PrimitiveType type) const override;
+
53  int64_t id(const simplex::Simplex& simplex) const
+
54  {
+
55  return id(simplex.tuple(), simplex.primitive_type());
+
56  }
57 
-
58  int64_t id_vertex(const Tuple& tuple) const { return id(tuple, PrimitiveType::Vertex); }
-
59  int64_t id_edge(const Tuple& tuple) const { return id(tuple, PrimitiveType::Edge); }
-
60  int64_t id_face(const Tuple& tuple) const { return id(tuple, PrimitiveType::Face); }
-
61  int64_t id_tet(const Tuple& tuple) const { return id(tuple, PrimitiveType::Tetrahedron); }
-
62 
-
70  Tuple tuple_from_id(const PrimitiveType type, const int64_t gid) const override;
-
71  Tuple tuple_from_global_ids(int64_t tid, int64_t fid, int64_t eid, int64_t vid) const;
-
72 
-
73  // private:
-
74 protected:
-
75  class TetMeshOperationExecutor;
-
76  TypedAttributeHandle<int64_t> m_vt_handle;
-
77  TypedAttributeHandle<int64_t> m_et_handle;
-
78  TypedAttributeHandle<int64_t> m_ft_handle;
-
79 
-
80  TypedAttributeHandle<int64_t> m_tv_handle;
-
81  TypedAttributeHandle<int64_t> m_te_handle;
-
82  TypedAttributeHandle<int64_t> m_tf_handle;
-
83  TypedAttributeHandle<int64_t> m_tt_handle;
-
84 
-
85  Tuple vertex_tuple_from_id(int64_t id) const;
-
86  Tuple edge_tuple_from_id(int64_t id) const;
-
87  Tuple face_tuple_from_id(int64_t id) const;
-
88  Tuple tet_tuple_from_id(int64_t id) const;
-
89 };
-
90 
-
91 } // namespace wmtk
+
58 
+
59  int64_t id_vertex(const Tuple& tuple) const { return id(tuple, PrimitiveType::Vertex); }
+
60  int64_t id_edge(const Tuple& tuple) const { return id(tuple, PrimitiveType::Edge); }
+
61  int64_t id_face(const Tuple& tuple) const { return id(tuple, PrimitiveType::Face); }
+
62  int64_t id_tet(const Tuple& tuple) const { return id(tuple, PrimitiveType::Tetrahedron); }
+
63 
+
71  Tuple tuple_from_id(const PrimitiveType type, const int64_t gid) const override;
+
72  Tuple tuple_from_global_ids(int64_t tid, int64_t fid, int64_t eid, int64_t vid) const;
+
73 
+
74  // private:
+
75 protected:
+
76  class TetMeshOperationExecutor;
+
77  TypedAttributeHandle<int64_t> m_vt_handle;
+
78  TypedAttributeHandle<int64_t> m_et_handle;
+
79  TypedAttributeHandle<int64_t> m_ft_handle;
+
80 
+
81  TypedAttributeHandle<int64_t> m_tv_handle;
+
82  TypedAttributeHandle<int64_t> m_te_handle;
+
83  TypedAttributeHandle<int64_t> m_tf_handle;
+
84  TypedAttributeHandle<int64_t> m_tt_handle;
+
85 
+
86  std::unique_ptr<attribute::MutableAccessor<int64_t>> m_vt_accessor;
+
87  std::unique_ptr<attribute::MutableAccessor<int64_t>> m_et_accessor;
+
88  std::unique_ptr<attribute::MutableAccessor<int64_t>> m_ft_accessor;
+
89 
+
90  std::unique_ptr<attribute::MutableAccessor<int64_t>> m_tv_accessor;
+
91  std::unique_ptr<attribute::MutableAccessor<int64_t>> m_te_accessor;
+
92  std::unique_ptr<attribute::MutableAccessor<int64_t>> m_tf_accessor;
+
93  std::unique_ptr<attribute::MutableAccessor<int64_t>> m_tt_accessor;
+
94 
+
95  Tuple vertex_tuple_from_id(int64_t id) const;
+
96  Tuple edge_tuple_from_id(int64_t id) const;
+
97  Tuple face_tuple_from_id(int64_t id) const;
+
98  Tuple tet_tuple_from_id(int64_t id) const;
+
99 };
+
100 
+
101 } // namespace wmtk
Definition: Mesh.hpp:94
bool is_boundary(const simplex::Simplex &tuple) const
check if a simplex lies on a boundary or not
Definition: Mesh.cpp:54
Definition: TetMesh.hpp:13
-
TypedAttributeHandle< int64_t > m_tt_handle
Definition: TetMesh.hpp:83
-
bool is_ccw(const Tuple &tuple) const override
TODO this needs dimension?
Definition: TetMesh.cpp:355
+
TypedAttributeHandle< int64_t > m_tt_handle
Definition: TetMesh.hpp:84
+
bool is_ccw(const Tuple &tuple) const override
TODO this needs dimension?
Definition: TetMesh.cpp:385
TetMesh & operator=(const TetMesh &o)=delete
TetMesh(const TetMesh &o)=delete
-
TypedAttributeHandle< int64_t > m_vt_handle
Definition: TetMesh.hpp:75
-
std::vector< std::vector< TypedAttributeHandle< int64_t > > > connectivity_attributes() const override
Returns a vector of vectors of attribute handles.
Definition: TetMesh.cpp:537
-
int64_t id_face(const Tuple &tuple) const
Definition: TetMesh.hpp:60
-
bool is_boundary_vertex(const Tuple &tuple) const
Definition: TetMesh.cpp:409
-
TetMesh(TetMesh &&o)=default
-
Tuple switch_tuple(const Tuple &tuple, PrimitiveType type) const override
switch the orientation of the Tuple of the given dimension
Definition: TetMesh.cpp:254
-
int64_t id(const Tuple &tuple, PrimitiveType type) const override
return the global id of the Tuple of the given dimension
Definition: TetMesh.cpp:224
-
Tuple tuple_from_global_ids(int64_t tid, int64_t fid, int64_t eid, int64_t vid) const
Definition: TetMesh.cpp:553
+
TypedAttributeHandle< int64_t > m_vt_handle
Definition: TetMesh.hpp:76
+
std::vector< std::vector< TypedAttributeHandle< int64_t > > > connectivity_attributes() const override
Returns a vector of vectors of attribute handles.
Definition: TetMesh.cpp:567
+
int64_t id_face(const Tuple &tuple) const
Definition: TetMesh.hpp:61
+
bool is_boundary_vertex(const Tuple &tuple) const
Definition: TetMesh.cpp:439
+
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_et_accessor
Definition: TetMesh.hpp:87
+
void make_cached_accessors()
Definition: TetMesh.cpp:64
+
Tuple switch_tuple(const Tuple &tuple, PrimitiveType type) const override
switch the orientation of the Tuple of the given dimension
Definition: TetMesh.cpp:288
+
int64_t id(const Tuple &tuple, PrimitiveType type) const override
return the global id of the Tuple of the given dimension
Definition: TetMesh.cpp:261
+
Tuple tuple_from_global_ids(int64_t tid, int64_t fid, int64_t eid, int64_t vid) const
Definition: TetMesh.cpp:583
bool is_boundary(const simplex::Simplex &tuple) const
check if a simplex lies on a boundary or not
Definition: Mesh.cpp:54
-
TypedAttributeHandle< int64_t > m_tv_handle
Definition: TetMesh.hpp:80
-
bool is_boundary_edge(const Tuple &tuple) const
Definition: TetMesh.cpp:397
-
Tuple edge_tuple_from_id(int64_t id) const
Definition: TetMesh.cpp:128
-
Tuple face_tuple_from_id(int64_t id) const
Definition: TetMesh.cpp:157
-
TetMesh & operator=(TetMesh &&o)=default
-
Tuple tet_tuple_from_id(int64_t id) const
Definition: TetMesh.cpp:186
-
bool is_connectivity_valid() const override
Definition: TetMesh.cpp:423
-
TypedAttributeHandle< int64_t > m_tf_handle
Definition: TetMesh.hpp:82
-
int64_t id(const simplex::Simplex &simplex) const
Definition: TetMesh.hpp:52
-
Tuple tuple_from_id(const PrimitiveType type, const int64_t gid) const override
internal function that returns the tuple of requested type, and has the global index cid
Definition: TetMesh.cpp:200
-
int64_t id_tet(const Tuple &tuple) const
Definition: TetMesh.hpp:61
-
Tuple vertex_tuple_from_id(int64_t id) const
Definition: TetMesh.cpp:100
-
int64_t id_vertex(const Tuple &tuple) const
Definition: TetMesh.hpp:58
-
int64_t id_edge(const Tuple &tuple) const
Definition: TetMesh.hpp:59
-
void initialize(Eigen::Ref< const RowVectors4l > TV, Eigen::Ref< const RowVectors6l > TE, Eigen::Ref< const RowVectors4l > TF, Eigen::Ref< const RowVectors4l > TT, Eigen::Ref< const VectorXl > VT, Eigen::Ref< const VectorXl > ET, Eigen::Ref< const VectorXl > FT)
Definition: TetMesh.cpp:34
-
bool is_valid(const Tuple &tuple, ConstAccessor< int64_t > &hash_accessor) const override
check validity of tuple including its hash
Definition: TetMesh.cpp:361
-
TypedAttributeHandle< int64_t > m_te_handle
Definition: TetMesh.hpp:81
-
TypedAttributeHandle< int64_t > m_et_handle
Definition: TetMesh.hpp:77
-
TypedAttributeHandle< int64_t > m_ft_handle
Definition: TetMesh.hpp:78
+
TypedAttributeHandle< int64_t > m_tv_handle
Definition: TetMesh.hpp:81
+
bool is_boundary_edge(const Tuple &tuple) const
Definition: TetMesh.cpp:427
+
Tuple edge_tuple_from_id(int64_t id) const
Definition: TetMesh.cpp:169
+
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_ft_accessor
Definition: TetMesh.hpp:88
+
Tuple face_tuple_from_id(int64_t id) const
Definition: TetMesh.cpp:196
+
Tuple tet_tuple_from_id(int64_t id) const
Definition: TetMesh.cpp:223
+
bool is_connectivity_valid() const override
Definition: TetMesh.cpp:453
+
TypedAttributeHandle< int64_t > m_tf_handle
Definition: TetMesh.hpp:83
+
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_tf_accessor
Definition: TetMesh.hpp:92
+
int64_t id(const simplex::Simplex &simplex) const
Definition: TetMesh.hpp:53
+
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_tt_accessor
Definition: TetMesh.hpp:93
+
Tuple tuple_from_id(const PrimitiveType type, const int64_t gid) const override
internal function that returns the tuple of requested type, and has the global index cid
Definition: TetMesh.cpp:237
+
int64_t id_tet(const Tuple &tuple) const
Definition: TetMesh.hpp:62
+
Tuple vertex_tuple_from_id(int64_t id) const
Definition: TetMesh.cpp:143
+
int64_t id_vertex(const Tuple &tuple) const
Definition: TetMesh.hpp:59
+
int64_t id_edge(const Tuple &tuple) const
Definition: TetMesh.hpp:60
+
void initialize(Eigen::Ref< const RowVectors4l > TV, Eigen::Ref< const RowVectors6l > TE, Eigen::Ref< const RowVectors4l > TF, Eigen::Ref< const RowVectors4l > TT, Eigen::Ref< const VectorXl > VT, Eigen::Ref< const VectorXl > ET, Eigen::Ref< const VectorXl > FT)
Definition: TetMesh.cpp:77
+
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_te_accessor
Definition: TetMesh.hpp:91
+
bool is_valid(const Tuple &tuple, ConstAccessor< int64_t > &hash_accessor) const override
check validity of tuple including its hash
Definition: TetMesh.cpp:391
+
TypedAttributeHandle< int64_t > m_te_handle
Definition: TetMesh.hpp:82
+
TypedAttributeHandle< int64_t > m_et_handle
Definition: TetMesh.hpp:78
+
TypedAttributeHandle< int64_t > m_ft_handle
Definition: TetMesh.hpp:79
TetMesh()
Definition: TetMesh.cpp:17
int64_t top_cell_dimension() const override
Definition: TetMesh.hpp:24
-
bool is_boundary_face(const Tuple &tuple) const
Definition: TetMesh.cpp:391
+
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_vt_accessor
Definition: TetMesh.hpp:86
+
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_tv_accessor
Definition: TetMesh.hpp:90
+
bool is_boundary_face(const Tuple &tuple) const
Definition: TetMesh.cpp:421
Definition: Tuple.hpp:30
diff --git a/_tet_mesh_operation_executor_8cpp_source.html b/_tet_mesh_operation_executor_8cpp_source.html index 67bac5cd07..97f0a413b4 100644 --- a/_tet_mesh_operation_executor_8cpp_source.html +++ b/_tet_mesh_operation_executor_8cpp_source.html @@ -1204,9 +1204,9 @@
void delete_simplices()
void split_edge()
split edge v1-v2
Definition: TetMesh.hpp:13
-
int64_t id(const Tuple &tuple, PrimitiveType type) const override
return the global id of the Tuple of the given dimension
Definition: TetMesh.cpp:224
-
int64_t id_tet(const Tuple &tuple) const
Definition: TetMesh.hpp:61
-
bool is_boundary_face(const Tuple &tuple) const
Definition: TetMesh.cpp:391
+
int64_t id(const Tuple &tuple, PrimitiveType type) const override
return the global id of the Tuple of the given dimension
Definition: TetMesh.cpp:261
+
int64_t id_tet(const Tuple &tuple) const
Definition: TetMesh.hpp:62
+
bool is_boundary_face(const Tuple &tuple) const
Definition: TetMesh.cpp:421
Definition: Tuple.hpp:30
std::array< std::vector< int64_t >, 4 > simplex_ids_to_delete
diff --git a/_tri_mesh_8cpp_source.html b/_tri_mesh_8cpp_source.html index 06cf8f5c78..7275f761db 100644 --- a/_tri_mesh_8cpp_source.html +++ b/_tri_mesh_8cpp_source.html @@ -132,552 +132,556 @@
15  , m_fe_handle(register_attribute_typed<int64_t>("m_fe", PrimitiveType::Face, 3, false, -1))
16  , m_ff_handle(register_attribute_typed<int64_t>("m_ff", PrimitiveType::Face, 3, false, -1))
17 {
-
18  m_vf_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_vf_handle);
-
19  m_ef_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_ef_handle);
-
20  m_fv_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_fv_handle);
-
21  m_fe_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_fe_handle);
-
22  m_ff_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_ff_handle);
-
23 }
-
24 
-
25 
-
26 int64_t TriMesh::id(const Tuple& tuple, PrimitiveType type) const
-
27 {
-
28  switch (type) {
-
29  case PrimitiveType::Vertex: {
-
30  ConstAccessor<int64_t> fv_accessor = create_const_accessor<int64_t>(m_fv_handle);
-
31  // int64_t v = fv_accessor.const_topological_scalar_attribute(tuple, PrimitiveType::Vertex);
-
32  int64_t v = m_fv_accessor->const_topological_scalar_attribute(tuple, PrimitiveType::Vertex);
-
33  return v;
-
34  }
-
35  case PrimitiveType::Edge: {
-
36  // ConstAccessor<int64_t> fe_accessor = create_const_accessor<int64_t>(m_fe_handle);
-
37  // int64_t v = fe_accessor.const_topological_scalar_attribute(tuple, PrimitiveType::Edge);
-
38  int64_t v = m_fe_accessor->const_topological_scalar_attribute(tuple, PrimitiveType::Edge);
-
39  return v;
-
40  }
-
41  case PrimitiveType::Face: {
-
42  return tuple.m_global_cid;
-
43  }
-
44  case PrimitiveType::HalfEdge: [[fallthrough]];
-
45  case PrimitiveType::Tetrahedron: [[fallthrough]];
-
46  default: throw std::runtime_error("Tuple id: Invalid primitive type");
-
47  }
-
48 }
+
18  make_cached_accessors();
+
19 }
+
20 
+
21 void TriMesh::make_cached_accessors()
+
22 {
+
23  m_vf_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_vf_handle);
+
24  m_ef_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_ef_handle);
+
25  m_fv_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_fv_handle);
+
26  m_fe_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_fe_handle);
+
27  m_ff_accessor = std::make_unique<attribute::MutableAccessor<int64_t>>(*this, m_ff_handle);
+
28 }
+
29 
+
30 TriMesh::TriMesh(TriMesh&& o)
+
31  : Mesh(std::move(o))
+
32 {
+
33  m_vf_handle = o.m_vf_handle;
+
34  m_ef_handle = o.m_ef_handle;
+
35  m_fv_handle = o.m_fv_handle;
+
36  m_fe_handle = o.m_fe_handle;
+
37  m_ff_handle = o.m_ff_handle;
+
38 
+
39  make_cached_accessors();
+
40 }
+
41 TriMesh& TriMesh::operator=(TriMesh&& o)
+
42 {
+
43  Mesh::operator=(std::move(o));
+
44  m_vf_handle = o.m_vf_handle;
+
45  m_ef_handle = o.m_ef_handle;
+
46  m_fv_handle = o.m_fv_handle;
+
47  m_fe_handle = o.m_fe_handle;
+
48  m_ff_handle = o.m_ff_handle;
49 
-
50 bool TriMesh::is_boundary(PrimitiveType pt, const Tuple& tuple) const
-
51 {
-
52  switch (pt) {
-
53  case PrimitiveType::Vertex: return is_boundary_vertex(tuple);
-
54  case PrimitiveType::Edge: return is_boundary_edge(tuple);
-
55  case PrimitiveType::Face:
-
56  case PrimitiveType::Tetrahedron:
-
57  case PrimitiveType::HalfEdge:
-
58  default: break;
-
59  }
-
60  throw std::runtime_error(
-
61  "tried to compute the boundary of an tri mesh for an invalid simplex dimension");
-
62  return false;
-
63 }
-
64 
-
65 bool TriMesh::is_boundary_edge(const Tuple& tuple) const
-
66 {
-
67  assert(is_valid_slow(tuple));
-
68  // ConstAccessor<int64_t> ff_accessor = create_const_accessor<int64_t>(m_ff_handle);
-
69  // return ff_accessor.const_vector_attribute(tuple)(tuple.m_local_eid) < 0;
-
70  return m_ff_accessor->const_vector_attribute(tuple)(tuple.m_local_eid) < 0;
-
71 }
-
72 
-
73 bool TriMesh::is_boundary_vertex(const Tuple& vertex) const
-
74 {
-
75  // go through all edges and check if they are boundary
-
76  // const simplex::SimplexCollection neigh = simplex::open_star(*this, Simplex::vertex(vertex));
-
77  // for (const Simplex& s : neigh.get_edges()) {
-
78  // if (is_boundary(s.tuple())) {
-
79  // return true;
-
80  // }
-
81  //}
-
82 
-
83  Tuple t = vertex;
-
84  do {
-
85  if (is_boundary_edge(t)) {
-
86  return true;
-
87  }
-
88  t = switch_edge(switch_face(t));
-
89  } while (t != vertex);
-
90 
-
91  return false;
-
92 }
-
93 
-
94 Tuple TriMesh::switch_tuple(const Tuple& tuple, PrimitiveType type) const
-
95 {
-
96  assert(is_valid_slow(tuple));
-
97  bool ccw = is_ccw(tuple);
-
98 
-
99  switch (type) {
-
100  case PrimitiveType::Face: {
-
101  const int64_t gvid = id(tuple, PrimitiveType::Vertex);
-
102  const int64_t geid = id(tuple, PrimitiveType::Edge);
-
103  const int64_t gfid = id(tuple, PrimitiveType::Face);
+
50  make_cached_accessors();
+
51  return *this;
+
52 }
+
53 
+
54 int64_t TriMesh::id(const Tuple& tuple, PrimitiveType type) const
+
55 {
+
56  switch (type) {
+
57  case PrimitiveType::Vertex: {
+
58  int64_t v = m_fv_accessor->const_topological_scalar_attribute(tuple, PrimitiveType::Vertex);
+
59  return v;
+
60  }
+
61  case PrimitiveType::Edge: {
+
62  int64_t v = m_fe_accessor->const_topological_scalar_attribute(tuple, PrimitiveType::Edge);
+
63  return v;
+
64  }
+
65  case PrimitiveType::Face: {
+
66  return tuple.m_global_cid;
+
67  }
+
68  case PrimitiveType::HalfEdge: [[fallthrough]];
+
69  case PrimitiveType::Tetrahedron: [[fallthrough]];
+
70  default: throw std::runtime_error("Tuple id: Invalid primitive type");
+
71  }
+
72 }
+
73 
+
74 bool TriMesh::is_boundary(PrimitiveType pt, const Tuple& tuple) const
+
75 {
+
76  switch (pt) {
+
77  case PrimitiveType::Vertex: return is_boundary_vertex(tuple);
+
78  case PrimitiveType::Edge: return is_boundary_edge(tuple);
+
79  case PrimitiveType::Face:
+
80  case PrimitiveType::Tetrahedron:
+
81  case PrimitiveType::HalfEdge:
+
82  default: break;
+
83  }
+
84  throw std::runtime_error(
+
85  "tried to compute the boundary of an tri mesh for an invalid simplex dimension");
+
86  return false;
+
87 }
+
88 
+
89 bool TriMesh::is_boundary_edge(const Tuple& tuple) const
+
90 {
+
91  assert(is_valid_slow(tuple));
+
92  return m_ff_accessor->const_vector_attribute(tuple)(tuple.m_local_eid) < 0;
+
93 }
+
94 
+
95 bool TriMesh::is_boundary_vertex(const Tuple& vertex) const
+
96 {
+
97  // go through all edges and check if they are boundary
+
98  // const simplex::SimplexCollection neigh = simplex::open_star(*this, Simplex::vertex(vertex));
+
99  // for (const Simplex& s : neigh.get_edges()) {
+
100  // if (is_boundary(s.tuple())) {
+
101  // return true;
+
102  // }
+
103  //}
104 
-
105  //ConstAccessor<int64_t> ff_accessor = create_const_accessor<int64_t>(m_ff_handle);
-
106  //auto ff = ff_accessor.const_vector_attribute(tuple);
-
107  auto ff = m_ff_accessor->const_vector_attribute(tuple);
-
108 
-
109  int64_t gcid_new = ff(tuple.m_local_eid);
-
110  int64_t lvid_new = -1, leid_new = -1;
-
111 
-
112  ConstAccessor<int64_t> fv_accessor = create_const_accessor<int64_t>(m_fv_handle);
-
113  auto fv = fv_accessor.index_access().const_vector_attribute(gcid_new);
-
114  // auto fv = m_fv_accessor->index_access().const_vector_attribute(gcid_new);
+
105  Tuple t = vertex;
+
106  do {
+
107  if (is_boundary_edge(t)) {
+
108  return true;
+
109  }
+
110  t = switch_edge(switch_face(t));
+
111  } while (t != vertex);
+
112 
+
113  return false;
+
114 }
115 
-
116  //ConstAccessor<int64_t> fe_accessor = create_const_accessor<int64_t>(m_fe_handle);
-
117  //auto fe = fe_accessor.index_access().const_vector_attribute(gcid_new);
-
118  auto fe = m_fe_accessor->index_access().const_vector_attribute(gcid_new);
-
119 
-
120  if (gfid == gcid_new) {
-
121  // this supports 0,1,0 triangles not 0,0,0 triangles
-
122  int64_t oleid = tuple.m_local_eid;
-
123  int64_t olvid = tuple.m_local_vid;
-
124  for (int64_t i = 0; i < 3; ++i) {
-
125  if (i != oleid && fe(i) == geid) {
-
126  leid_new = i;
-
127  }
-
128  }
-
129  // if the old vertex is no "opposite of the old or new edges
-
130  // then they share the vertex
-
131  // a
-
132  // 0/ \1 <-- 0 and c share local ids, 1 and b share local ids
-
133  // /____\.
-
134  // b c
-
135  if (oleid != olvid && leid_new != olvid) {
-
136  lvid_new = olvid;
-
137  } else {
-
138  for (int64_t i = 0; i < 3; ++i) {
-
139  if (i != olvid && fv(i) == gvid) {
-
140  lvid_new = i;
-
141  }
-
142  }
-
143  }
-
144  } else {
-
145  for (int64_t i = 0; i < 3; ++i) {
-
146  if (fe(i) == geid) {
-
147  leid_new = i;
-
148  }
-
149  if (fv(i) == gvid) {
-
150  lvid_new = i;
-
151  }
-
152  }
-
153  }
-
154  assert(lvid_new != -1);
-
155  assert(leid_new != -1);
-
156 
-
157  ConstAccessor<int64_t> hash_accessor = get_const_cell_hash_accessor();
-
158 
-
159  const Tuple res(
-
160  lvid_new,
-
161  leid_new,
-
162  tuple.m_local_fid,
-
163  gcid_new,
-
164  get_cell_hash(gcid_new, hash_accessor));
-
165  assert(is_valid(res, hash_accessor));
-
166  return res;
-
167  }
-
168  case PrimitiveType::Vertex:
-
169  case PrimitiveType::Edge: return autogen::tri_mesh::local_switch_tuple(tuple, type);
-
170  case PrimitiveType::Tetrahedron:
-
171  case PrimitiveType::HalfEdge:
-
172  default: {
-
173  assert(false);
-
174  return autogen::tri_mesh::local_switch_tuple(tuple, type);
-
175  }
-
176  }
-
177 }
-
178 
-
179 bool TriMesh::is_ccw(const Tuple& tuple) const
-
180 {
-
181  assert(is_valid_slow(tuple));
-
182  return autogen::tri_mesh::is_ccw(tuple);
-
183 }
-
184 
-
185 void TriMesh::initialize(
-
186  Eigen::Ref<const RowVectors3l> FV,
-
187  Eigen::Ref<const RowVectors3l> FE,
-
188  Eigen::Ref<const RowVectors3l> FF,
-
189  Eigen::Ref<const VectorXl> VF,
-
190  Eigen::Ref<const VectorXl> EF)
-
191 {
-
192  // reserve memory for attributes
-
193 
+
116 Tuple TriMesh::switch_tuple(const Tuple& tuple, PrimitiveType type) const
+
117 {
+
118  assert(is_valid_slow(tuple));
+
119  bool ccw = is_ccw(tuple);
+
120 
+
121  switch (type) {
+
122  case PrimitiveType::Face: {
+
123  const int64_t gvid = id(tuple, PrimitiveType::Vertex);
+
124  const int64_t geid = id(tuple, PrimitiveType::Edge);
+
125  const int64_t gfid = id(tuple, PrimitiveType::Face);
+
126 
+
127  auto ff = m_ff_accessor->const_vector_attribute(tuple);
+
128 
+
129  int64_t gcid_new = ff(tuple.m_local_eid);
+
130  int64_t lvid_new = -1, leid_new = -1;
+
131 
+
132  auto fv = m_fv_accessor->index_access().const_vector_attribute(gcid_new);
+
133 
+
134  auto fe = m_fe_accessor->index_access().const_vector_attribute(gcid_new);
+
135 
+
136  if (gfid == gcid_new) {
+
137  // this supports 0,1,0 triangles not 0,0,0 triangles
+
138  int64_t oleid = tuple.m_local_eid;
+
139  int64_t olvid = tuple.m_local_vid;
+
140  for (int64_t i = 0; i < 3; ++i) {
+
141  if (i != oleid && fe(i) == geid) {
+
142  leid_new = i;
+
143  }
+
144  }
+
145  // if the old vertex is no "opposite of the old or new edges
+
146  // then they share the vertex
+
147  // a
+
148  // 0/ \1 <-- 0 and c share local ids, 1 and b share local ids
+
149  // /____\.
+
150  // b c
+
151  if (oleid != olvid && leid_new != olvid) {
+
152  lvid_new = olvid;
+
153  } else {
+
154  for (int64_t i = 0; i < 3; ++i) {
+
155  if (i != olvid && fv(i) == gvid) {
+
156  lvid_new = i;
+
157  }
+
158  }
+
159  }
+
160  } else {
+
161  for (int64_t i = 0; i < 3; ++i) {
+
162  if (fe(i) == geid) {
+
163  leid_new = i;
+
164  }
+
165  if (fv(i) == gvid) {
+
166  lvid_new = i;
+
167  }
+
168  }
+
169  }
+
170  assert(lvid_new != -1);
+
171  assert(leid_new != -1);
+
172 
+
173  ConstAccessor<int64_t> hash_accessor = get_const_cell_hash_accessor();
+
174 
+
175  const Tuple res(
+
176  lvid_new,
+
177  leid_new,
+
178  tuple.m_local_fid,
+
179  gcid_new,
+
180  get_cell_hash(gcid_new, hash_accessor));
+
181  assert(is_valid(res, hash_accessor));
+
182  return res;
+
183  }
+
184  case PrimitiveType::Vertex:
+
185  case PrimitiveType::Edge: return autogen::tri_mesh::local_switch_tuple(tuple, type);
+
186  case PrimitiveType::Tetrahedron:
+
187  case PrimitiveType::HalfEdge:
+
188  default: {
+
189  assert(false);
+
190  return autogen::tri_mesh::local_switch_tuple(tuple, type);
+
191  }
+
192  }
+
193 }
194 
-
195  std::vector<int64_t> cap{
-
196  static_cast<int64_t>(VF.rows()),
-
197  static_cast<int64_t>(EF.rows()),
-
198  static_cast<int64_t>(FF.rows())};
-
199 
-
200  set_capacities(cap);
-
201 
-
202 
-
203  // get Accessors for topology
-
204  Accessor<int64_t> fv_accessor = create_accessor<int64_t>(m_fv_handle);
-
205  Accessor<int64_t> fe_accessor = create_accessor<int64_t>(m_fe_handle);
-
206  Accessor<int64_t> ff_accessor = create_accessor<int64_t>(m_ff_handle);
-
207  Accessor<int64_t> vf_accessor = create_accessor<int64_t>(m_vf_handle);
-
208  Accessor<int64_t> ef_accessor = create_accessor<int64_t>(m_ef_handle);
+
195 bool TriMesh::is_ccw(const Tuple& tuple) const
+
196 {
+
197  assert(is_valid_slow(tuple));
+
198  return autogen::tri_mesh::is_ccw(tuple);
+
199 }
+
200 
+
201 void TriMesh::initialize(
+
202  Eigen::Ref<const RowVectors3l> FV,
+
203  Eigen::Ref<const RowVectors3l> FE,
+
204  Eigen::Ref<const RowVectors3l> FF,
+
205  Eigen::Ref<const VectorXl> VF,
+
206  Eigen::Ref<const VectorXl> EF)
+
207 {
+
208  // reserve memory for attributes
209 
-
210  Accessor<char> v_flag_accessor = get_flag_accessor(PrimitiveType::Vertex);
-
211  Accessor<char> e_flag_accessor = get_flag_accessor(PrimitiveType::Edge);
-
212  Accessor<char> f_flag_accessor = get_flag_accessor(PrimitiveType::Face);
-
213 
-
214  // iterate over the matrices and fill attributes
-
215  for (int64_t i = 0; i < capacity(PrimitiveType::Face); ++i) {
-
216  fv_accessor.index_access().vector_attribute(i) = FV.row(i).transpose();
-
217  fe_accessor.index_access().vector_attribute(i) = FE.row(i).transpose();
-
218  ff_accessor.index_access().vector_attribute(i) = FF.row(i).transpose();
-
219 
-
220  f_flag_accessor.index_access().scalar_attribute(i) |= 0x1;
-
221  }
-
222  // m_vf
-
223  for (int64_t i = 0; i < capacity(PrimitiveType::Vertex); ++i) {
-
224  auto& vf = vf_accessor.index_access().scalar_attribute(i);
-
225  vf = VF(i);
-
226  v_flag_accessor.index_access().scalar_attribute(i) |= 0x1;
-
227  }
-
228  // m_ef
-
229  for (int64_t i = 0; i < capacity(PrimitiveType::Edge); ++i) {
-
230  auto& ef = ef_accessor.index_access().scalar_attribute(i);
-
231  ef = EF(i);
-
232  e_flag_accessor.index_access().scalar_attribute(i) |= 0x1;
-
233  }
-
234 }
+
210 
+
211  std::vector<int64_t> cap{
+
212  static_cast<int64_t>(VF.rows()),
+
213  static_cast<int64_t>(EF.rows()),
+
214  static_cast<int64_t>(FF.rows())};
+
215 
+
216  set_capacities(cap);
+
217 
+
218 
+
219  // get Accessors for topology
+
220  Accessor<int64_t> fv_accessor = create_accessor<int64_t>(m_fv_handle);
+
221  Accessor<int64_t> fe_accessor = create_accessor<int64_t>(m_fe_handle);
+
222  Accessor<int64_t> ff_accessor = create_accessor<int64_t>(m_ff_handle);
+
223  Accessor<int64_t> vf_accessor = create_accessor<int64_t>(m_vf_handle);
+
224  Accessor<int64_t> ef_accessor = create_accessor<int64_t>(m_ef_handle);
+
225 
+
226  Accessor<char> v_flag_accessor = get_flag_accessor(PrimitiveType::Vertex);
+
227  Accessor<char> e_flag_accessor = get_flag_accessor(PrimitiveType::Edge);
+
228  Accessor<char> f_flag_accessor = get_flag_accessor(PrimitiveType::Face);
+
229 
+
230  // iterate over the matrices and fill attributes
+
231  for (int64_t i = 0; i < capacity(PrimitiveType::Face); ++i) {
+
232  fv_accessor.index_access().vector_attribute(i) = FV.row(i).transpose();
+
233  fe_accessor.index_access().vector_attribute(i) = FE.row(i).transpose();
+
234  ff_accessor.index_access().vector_attribute(i) = FF.row(i).transpose();
235 
-
236 void TriMesh::initialize(Eigen::Ref<const RowVectors3l> F)
-
237 {
-
238  auto [FE, FF, VF, EF] = trimesh_topology_initialization(F);
-
239  initialize(F, FE, FF, VF, EF);
-
240 }
-
241 
-
242 Tuple TriMesh::tuple_from_global_ids(int64_t fid, int64_t eid, int64_t vid) const
-
243 {
-
244  ConstAccessor<int64_t> fv_accessor = create_const_accessor<int64_t>(m_fv_handle);
-
245  auto fv = fv_accessor.index_access().const_vector_attribute(fid);
-
246  // auto fv = m_fv_accessor->index_access().const_vector_attribute(fid);
-
247  ConstAccessor<int64_t> fe_accessor = create_const_accessor<int64_t>(m_fe_handle);
-
248  auto fe = fe_accessor.index_access().const_vector_attribute(fid);
-
249  // auto fe = m_fe_accessor->index_access().const_vector_attribute(fid);
-
250 
-
251  int64_t lvid = -1;
-
252  int64_t leid = -1;
-
253 
-
254  for (int j = 0; j < 3; ++j) {
-
255  if (fv(j) == vid) {
-
256  lvid = j;
-
257  }
-
258  if (fe(j) == eid) {
-
259  leid = j;
-
260  }
-
261  }
-
262  assert(lvid != -1);
-
263  assert(leid != -1);
-
264 
-
265  return Tuple(
-
266  lvid,
-
267  leid,
-
268  -1,
-
269  fid,
-
270  get_cell_hash_slow(fid)); // TODO replace by function that takes hash accessor as parameter
-
271 }
-
272 
-
273 Tuple TriMesh::tuple_from_id(const PrimitiveType type, const int64_t gid) const
-
274 {
-
275  switch (type) {
-
276  case PrimitiveType::Vertex: {
-
277  return vertex_tuple_from_id(gid);
-
278  }
-
279  case PrimitiveType::Edge: {
-
280  return edge_tuple_from_id(gid);
-
281  }
-
282  case PrimitiveType::Face: {
-
283  return face_tuple_from_id(gid);
-
284  }
-
285  case PrimitiveType::HalfEdge:
-
286  case PrimitiveType::Tetrahedron: {
-
287  throw std::runtime_error("no tet tuple supported for trimesh");
-
288  break;
-
289  }
-
290  default: throw std::runtime_error("Invalid primitive type"); break;
-
291  }
-
292 }
-
293 
-
294 Tuple TriMesh::vertex_tuple_from_id(int64_t id) const
-
295 {
-
296  //ConstAccessor<int64_t> vf_accessor = create_const_accessor<int64_t>(m_vf_handle);
-
297  //auto f = vf_accessor.index_access().const_scalar_attribute(id);
-
298  auto f = m_vf_accessor->index_access().const_scalar_attribute(id);
-
299  //ConstAccessor<int64_t> fv_accessor = create_const_accessor<int64_t>(m_fv_handle);
-
300  //auto fv = fv_accessor.index_access().const_vector_attribute(f);
-
301  auto fv = m_fv_accessor->index_access().const_vector_attribute(f);
-
302  for (int64_t i = 0; i < 3; ++i) {
-
303  if (fv(i) == id) {
-
304  assert(autogen::tri_mesh::auto_2d_table_complete_vertex[i][0] == i);
-
305  const int64_t leid = autogen::tri_mesh::auto_2d_table_complete_vertex[i][1];
-
306  Tuple v_tuple = Tuple(
-
307  i,
-
308  leid,
-
309  -1,
-
310  f,
-
311  get_cell_hash_slow(f)); // TODO replace by function that takes hash
-
312  // accessor as parameter
-
313  assert(is_ccw(v_tuple)); // is_ccw also checks for validity
-
314  return v_tuple;
-
315  }
-
316  }
-
317  throw std::runtime_error("vertex_tuple_from_id failed");
-
318 }
-
319 
-
320 Tuple TriMesh::edge_tuple_from_id(int64_t id) const
-
321 {
-
322  //ConstAccessor<int64_t> ef_accessor = create_const_accessor<int64_t>(m_ef_handle);
-
323  //auto f = ef_accessor.index_access().const_scalar_attribute(id);
-
324  auto f = m_ef_accessor->index_access().const_scalar_attribute(id);
-
325  //ConstAccessor<int64_t> fe_accessor = create_const_accessor<int64_t>(m_fe_handle);
-
326  //auto fe = fe_accessor.index_access().const_vector_attribute(f);
-
327  auto fe = m_fe_accessor->index_access().const_vector_attribute(f);
-
328  for (int64_t i = 0; i < 3; ++i) {
-
329  if (fe(i) == id) {
-
330  assert(autogen::tri_mesh::auto_2d_table_complete_edge[i][1] == i);
-
331  const int64_t lvid = autogen::tri_mesh::auto_2d_table_complete_edge[i][0];
-
332 
-
333  ConstAccessor<int64_t> hash_accessor = get_const_cell_hash_accessor();
-
334 
-
335  Tuple e_tuple = Tuple(lvid, i, -1, f, get_cell_hash(f, hash_accessor));
-
336  assert(is_ccw(e_tuple));
-
337  assert(is_valid(e_tuple, hash_accessor));
-
338  return e_tuple;
-
339  }
-
340  }
-
341  throw std::runtime_error("edge_tuple_from_id failed");
-
342 }
-
343 
-
344 Tuple TriMesh::face_tuple_from_id(int64_t id) const
-
345 {
-
346  Tuple f_tuple = Tuple(
-
347  autogen::tri_mesh::auto_2d_table_complete_vertex[0][0],
-
348  autogen::tri_mesh::auto_2d_table_complete_vertex[0][1],
-
349  -1,
-
350  id,
-
351  get_cell_hash_slow(id)
-
352 
-
353 
-
354  );
-
355  assert(is_ccw(f_tuple));
-
356  assert(is_valid_slow(f_tuple));
-
357  return f_tuple;
-
358 }
-
359 
-
360 bool TriMesh::is_valid(const Tuple& tuple, ConstAccessor<int64_t>& hash_accessor) const
-
361 {
-
362  if (tuple.is_null()) {
-
363  logger().debug("Tuple was null and therefore not valid");
-
364  return false;
-
365  }
-
366 
-
367  const bool is_connectivity_valid = tuple.m_local_vid >= 0 && tuple.m_local_eid >= 0 &&
-
368  tuple.m_global_cid >= 0 &&
-
369  autogen::tri_mesh::tuple_is_valid_for_ccw(tuple);
+
236  f_flag_accessor.index_access().scalar_attribute(i) |= 0x1;
+
237  }
+
238  // m_vf
+
239  for (int64_t i = 0; i < capacity(PrimitiveType::Vertex); ++i) {
+
240  auto& vf = vf_accessor.index_access().scalar_attribute(i);
+
241  vf = VF(i);
+
242  v_flag_accessor.index_access().scalar_attribute(i) |= 0x1;
+
243  }
+
244  // m_ef
+
245  for (int64_t i = 0; i < capacity(PrimitiveType::Edge); ++i) {
+
246  auto& ef = ef_accessor.index_access().scalar_attribute(i);
+
247  ef = EF(i);
+
248  e_flag_accessor.index_access().scalar_attribute(i) |= 0x1;
+
249  }
+
250 }
+
251 
+
252 void TriMesh::initialize(Eigen::Ref<const RowVectors3l> F)
+
253 {
+
254  auto [FE, FF, VF, EF] = trimesh_topology_initialization(F);
+
255  initialize(F, FE, FF, VF, EF);
+
256 }
+
257 
+
258 Tuple TriMesh::tuple_from_global_ids(int64_t fid, int64_t eid, int64_t vid) const
+
259 {
+
260  auto fv = m_fv_accessor->index_access().const_vector_attribute(fid);
+
261  auto fe = m_fe_accessor->index_access().const_vector_attribute(fid);
+
262 
+
263  int64_t lvid = -1;
+
264  int64_t leid = -1;
+
265 
+
266  for (int j = 0; j < 3; ++j) {
+
267  if (fv(j) == vid) {
+
268  lvid = j;
+
269  }
+
270  if (fe(j) == eid) {
+
271  leid = j;
+
272  }
+
273  }
+
274  assert(lvid != -1);
+
275  assert(leid != -1);
+
276 
+
277  return Tuple(
+
278  lvid,
+
279  leid,
+
280  -1,
+
281  fid,
+
282  get_cell_hash_slow(fid)); // TODO replace by function that takes hash accessor as parameter
+
283 }
+
284 
+
285 Tuple TriMesh::tuple_from_id(const PrimitiveType type, const int64_t gid) const
+
286 {
+
287  switch (type) {
+
288  case PrimitiveType::Vertex: {
+
289  return vertex_tuple_from_id(gid);
+
290  }
+
291  case PrimitiveType::Edge: {
+
292  return edge_tuple_from_id(gid);
+
293  }
+
294  case PrimitiveType::Face: {
+
295  return face_tuple_from_id(gid);
+
296  }
+
297  case PrimitiveType::HalfEdge:
+
298  case PrimitiveType::Tetrahedron: {
+
299  throw std::runtime_error("no tet tuple supported for trimesh");
+
300  break;
+
301  }
+
302  default: throw std::runtime_error("Invalid primitive type"); break;
+
303  }
+
304 }
+
305 
+
306 Tuple TriMesh::vertex_tuple_from_id(int64_t id) const
+
307 {
+
308  auto f = m_vf_accessor->index_access().const_scalar_attribute(id);
+
309  auto fv = m_fv_accessor->index_access().const_vector_attribute(f);
+
310  for (int64_t i = 0; i < 3; ++i) {
+
311  if (fv(i) == id) {
+
312  assert(autogen::tri_mesh::auto_2d_table_complete_vertex[i][0] == i);
+
313  const int64_t leid = autogen::tri_mesh::auto_2d_table_complete_vertex[i][1];
+
314  Tuple v_tuple = Tuple(
+
315  i,
+
316  leid,
+
317  -1,
+
318  f,
+
319  get_cell_hash_slow(f)); // TODO replace by function that takes hash
+
320  // accessor as parameter
+
321  assert(is_ccw(v_tuple)); // is_ccw also checks for validity
+
322  return v_tuple;
+
323  }
+
324  }
+
325  throw std::runtime_error("vertex_tuple_from_id failed");
+
326 }
+
327 
+
328 Tuple TriMesh::edge_tuple_from_id(int64_t id) const
+
329 {
+
330  auto f = m_ef_accessor->index_access().const_scalar_attribute(id);
+
331  auto fe = m_fe_accessor->index_access().const_vector_attribute(f);
+
332  for (int64_t i = 0; i < 3; ++i) {
+
333  if (fe(i) == id) {
+
334  assert(autogen::tri_mesh::auto_2d_table_complete_edge[i][1] == i);
+
335  const int64_t lvid = autogen::tri_mesh::auto_2d_table_complete_edge[i][0];
+
336 
+
337  ConstAccessor<int64_t> hash_accessor = get_const_cell_hash_accessor();
+
338 
+
339  Tuple e_tuple = Tuple(lvid, i, -1, f, get_cell_hash(f, hash_accessor));
+
340  assert(is_ccw(e_tuple));
+
341  assert(is_valid(e_tuple, hash_accessor));
+
342  return e_tuple;
+
343  }
+
344  }
+
345  throw std::runtime_error("edge_tuple_from_id failed");
+
346 }
+
347 
+
348 Tuple TriMesh::face_tuple_from_id(int64_t id) const
+
349 {
+
350  Tuple f_tuple = Tuple(
+
351  autogen::tri_mesh::auto_2d_table_complete_vertex[0][0],
+
352  autogen::tri_mesh::auto_2d_table_complete_vertex[0][1],
+
353  -1,
+
354  id,
+
355  get_cell_hash_slow(id)
+
356 
+
357 
+
358  );
+
359  assert(is_ccw(f_tuple));
+
360  assert(is_valid_slow(f_tuple));
+
361  return f_tuple;
+
362 }
+
363 
+
364 bool TriMesh::is_valid(const Tuple& tuple, ConstAccessor<int64_t>& hash_accessor) const
+
365 {
+
366  if (tuple.is_null()) {
+
367  logger().debug("Tuple was null and therefore not valid");
+
368  return false;
+
369  }
370 
-
371  if (!is_connectivity_valid) {
-
372 #if !defined(NDEBUG)
-
373  assert(tuple.m_local_vid >= 0);
-
374  assert(tuple.m_local_eid >= 0);
-
375  assert(tuple.m_global_cid);
-
376  assert(autogen::tri_mesh::tuple_is_valid_for_ccw(tuple));
-
377  logger().debug(
-
378  "tuple.m_local_vid={} >= 0 && tuple.m_local_eid={} >= 0 &&"
-
379  " tuple.m_global_cid={} >= 0 &&"
-
380  " autogen::tri_mesh::tuple_is_valid_for_ccw(tuple)={}",
-
381  tuple.m_local_vid,
-
382  tuple.m_local_eid,
-
383  tuple.m_global_cid,
-
384  autogen::tri_mesh::tuple_is_valid_for_ccw(tuple));
-
385  ;
-
386 #endif
-
387  return false;
-
388  }
-
389 
-
390  return Mesh::is_hash_valid(tuple, hash_accessor);
-
391 }
-
392 
-
393 bool TriMesh::is_connectivity_valid() const
-
394 {
-
395  // get Accessors for topology
-
396  ConstAccessor<int64_t> fv_accessor = create_const_accessor<int64_t>(m_fv_handle);
-
397  ConstAccessor<int64_t> fe_accessor = create_const_accessor<int64_t>(m_fe_handle);
-
398  ConstAccessor<int64_t> ff_accessor = create_const_accessor<int64_t>(m_ff_handle);
-
399  ConstAccessor<int64_t> vf_accessor = create_const_accessor<int64_t>(m_vf_handle);
-
400  ConstAccessor<int64_t> ef_accessor = create_const_accessor<int64_t>(m_ef_handle);
-
401  ConstAccessor<char> v_flag_accessor = get_flag_accessor(PrimitiveType::Vertex);
-
402  ConstAccessor<char> e_flag_accessor = get_flag_accessor(PrimitiveType::Edge);
-
403  ConstAccessor<char> f_flag_accessor = get_flag_accessor(PrimitiveType::Face);
-
404 
-
405  // EF and FE
-
406  for (int64_t i = 0; i < capacity(PrimitiveType::Edge); ++i) {
-
407  if (e_flag_accessor.index_access().const_scalar_attribute(i) == 0) {
-
408  wmtk::logger().debug("Edge {} is deleted", i);
-
409  continue;
-
410  }
-
411  int cnt = 0;
-
412  long ef_val = ef_accessor.index_access().const_scalar_attribute(i);
-
413 
-
414  auto fe_val = fe_accessor.index_access().const_vector_attribute(ef_val);
-
415  for (int64_t j = 0; j < 3; ++j) {
-
416  if (fe_val(j) == i) {
-
417  cnt++;
-
418  }
-
419  }
-
420  if (cnt == 0) {
-
421  wmtk::logger().debug(
-
422  "EF[{0}] {1} and FE:[EF[{0}]] = {2} are not "
-
423  "compatible ",
-
424  i,
-
425  ef_val,
-
426  fmt::join(fe_val, ","));
-
427 
-
428  // std::cout << "EF and FE not compatible" << std::endl;
-
429  return false;
-
430  }
-
431  }
-
432 
-
433  // VF and FV
-
434  for (int64_t i = 0; i < capacity(PrimitiveType::Vertex); ++i) {
-
435  const int64_t vf = vf_accessor.index_access().const_scalar_attribute(i);
-
436  if (v_flag_accessor.index_access().const_scalar_attribute(i) == 0) {
-
437  wmtk::logger().debug("Vertex {} is deleted", i);
-
438  continue;
-
439  }
-
440  int cnt = 0;
-
441 
-
442  auto fv = fv_accessor.index_access().const_vector_attribute(vf);
-
443  for (int64_t j = 0; j < 3; ++j) {
-
444  if (fv(j) == i) {
-
445  cnt++;
-
446  }
-
447  }
-
448  if (cnt == 0) {
-
449  wmtk::logger().debug(
-
450  "VF and FV not compatible, could not find VF[{}] = {} "
-
451  "in FV[{}] = [{}]",
-
452  i,
-
453  vf,
-
454  vf,
-
455  fmt::join(fv, ","));
-
456  return false;
-
457  }
-
458  }
-
459 
-
460  // FE and EF
-
461  for (int64_t i = 0; i < capacity(PrimitiveType::Face); ++i) {
-
462  if (f_flag_accessor.index_access().const_scalar_attribute(i) == 0) {
-
463  wmtk::logger().debug("Face {} is deleted", i);
-
464  continue;
-
465  }
-
466  auto fe = fe_accessor.index_access().const_vector_attribute(i);
-
467  auto ff = ff_accessor.index_access().const_vector_attribute(i);
-
468 
-
469  for (int64_t j = 0; j < 3; ++j) {
-
470  int neighbor_fid = ff(j);
-
471  const bool is_boundary = neighbor_fid == -1;
-
472  if (is_boundary) {
-
473  auto ef = ef_accessor.index_access().const_scalar_attribute(fe(j));
-
474  if (ef != i) {
-
475  wmtk::logger().debug(
-
476  "Even though local edge {} of face {} is "
-
477  "boundary (global eid is {}), "
-
478  "ef[{}] = {} != {}",
-
479  j,
-
480  i,
-
481  fe(j),
-
482  fe(j),
-
483  ef,
-
484  i);
-
485  return false;
-
486  }
-
487  } else {
-
488  if (neighbor_fid == i) {
-
489  logger().warn(
-
490  "Connectivity check cannot work when mapping a "
-
491  "face to itself (face {})",
-
492  i);
-
493  assert(false);
-
494  continue;
-
495  }
-
496  auto neighbor_ff = ff_accessor.index_access().const_vector_attribute(neighbor_fid);
-
497 
-
498  if ((neighbor_ff.array() == i).any()) {
-
499  auto neighbor_fe =
-
500  fe_accessor.index_access().const_vector_attribute(neighbor_fid);
+
371  const bool is_connectivity_valid = tuple.m_local_vid >= 0 && tuple.m_local_eid >= 0 &&
+
372  tuple.m_global_cid >= 0 &&
+
373  autogen::tri_mesh::tuple_is_valid_for_ccw(tuple);
+
374 
+
375  if (!is_connectivity_valid) {
+
376 #if !defined(NDEBUG)
+
377  assert(tuple.m_local_vid >= 0);
+
378  assert(tuple.m_local_eid >= 0);
+
379  assert(tuple.m_global_cid);
+
380  assert(autogen::tri_mesh::tuple_is_valid_for_ccw(tuple));
+
381  logger().debug(
+
382  "tuple.m_local_vid={} >= 0 && tuple.m_local_eid={} >= 0 &&"
+
383  " tuple.m_global_cid={} >= 0 &&"
+
384  " autogen::tri_mesh::tuple_is_valid_for_ccw(tuple)={}",
+
385  tuple.m_local_vid,
+
386  tuple.m_local_eid,
+
387  tuple.m_global_cid,
+
388  autogen::tri_mesh::tuple_is_valid_for_ccw(tuple));
+
389  ;
+
390 #endif
+
391  return false;
+
392  }
+
393 
+
394  return Mesh::is_hash_valid(tuple, hash_accessor);
+
395 }
+
396 
+
397 bool TriMesh::is_connectivity_valid() const
+
398 {
+
399  // get Accessors for topology
+
400  ConstAccessor<int64_t> fv_accessor = create_const_accessor<int64_t>(m_fv_handle);
+
401  ConstAccessor<int64_t> fe_accessor = create_const_accessor<int64_t>(m_fe_handle);
+
402  ConstAccessor<int64_t> ff_accessor = create_const_accessor<int64_t>(m_ff_handle);
+
403  ConstAccessor<int64_t> vf_accessor = create_const_accessor<int64_t>(m_vf_handle);
+
404  ConstAccessor<int64_t> ef_accessor = create_const_accessor<int64_t>(m_ef_handle);
+
405  ConstAccessor<char> v_flag_accessor = get_flag_accessor(PrimitiveType::Vertex);
+
406  ConstAccessor<char> e_flag_accessor = get_flag_accessor(PrimitiveType::Edge);
+
407  ConstAccessor<char> f_flag_accessor = get_flag_accessor(PrimitiveType::Face);
+
408 
+
409  // EF and FE
+
410  for (int64_t i = 0; i < capacity(PrimitiveType::Edge); ++i) {
+
411  if (e_flag_accessor.index_access().const_scalar_attribute(i) == 0) {
+
412  wmtk::logger().debug("Edge {} is deleted", i);
+
413  continue;
+
414  }
+
415  int cnt = 0;
+
416  long ef_val = ef_accessor.index_access().const_scalar_attribute(i);
+
417 
+
418  auto fe_val = fe_accessor.index_access().const_vector_attribute(ef_val);
+
419  for (int64_t j = 0; j < 3; ++j) {
+
420  if (fe_val(j) == i) {
+
421  cnt++;
+
422  }
+
423  }
+
424  if (cnt == 0) {
+
425  wmtk::logger().debug(
+
426  "EF[{0}] {1} and FE:[EF[{0}]] = {2} are not "
+
427  "compatible ",
+
428  i,
+
429  ef_val,
+
430  fmt::join(fe_val, ","));
+
431 
+
432  // std::cout << "EF and FE not compatible" << std::endl;
+
433  return false;
+
434  }
+
435  }
+
436 
+
437  // VF and FV
+
438  for (int64_t i = 0; i < capacity(PrimitiveType::Vertex); ++i) {
+
439  const int64_t vf = vf_accessor.index_access().const_scalar_attribute(i);
+
440  if (v_flag_accessor.index_access().const_scalar_attribute(i) == 0) {
+
441  wmtk::logger().debug("Vertex {} is deleted", i);
+
442  continue;
+
443  }
+
444  int cnt = 0;
+
445 
+
446  auto fv = fv_accessor.index_access().const_vector_attribute(vf);
+
447  for (int64_t j = 0; j < 3; ++j) {
+
448  if (fv(j) == i) {
+
449  cnt++;
+
450  }
+
451  }
+
452  if (cnt == 0) {
+
453  wmtk::logger().debug(
+
454  "VF and FV not compatible, could not find VF[{}] = {} "
+
455  "in FV[{}] = [{}]",
+
456  i,
+
457  vf,
+
458  vf,
+
459  fmt::join(fv, ","));
+
460  return false;
+
461  }
+
462  }
+
463 
+
464  // FE and EF
+
465  for (int64_t i = 0; i < capacity(PrimitiveType::Face); ++i) {
+
466  if (f_flag_accessor.index_access().const_scalar_attribute(i) == 0) {
+
467  wmtk::logger().debug("Face {} is deleted", i);
+
468  continue;
+
469  }
+
470  auto fe = fe_accessor.index_access().const_vector_attribute(i);
+
471  auto ff = ff_accessor.index_access().const_vector_attribute(i);
+
472 
+
473  for (int64_t j = 0; j < 3; ++j) {
+
474  int neighbor_fid = ff(j);
+
475  const bool is_boundary = neighbor_fid == -1;
+
476  if (is_boundary) {
+
477  auto ef = ef_accessor.index_access().const_scalar_attribute(fe(j));
+
478  if (ef != i) {
+
479  wmtk::logger().debug(
+
480  "Even though local edge {} of face {} is "
+
481  "boundary (global eid is {}), "
+
482  "ef[{}] = {} != {}",
+
483  j,
+
484  i,
+
485  fe(j),
+
486  fe(j),
+
487  ef,
+
488  i);
+
489  return false;
+
490  }
+
491  } else {
+
492  if (neighbor_fid == i) {
+
493  logger().warn(
+
494  "Connectivity check cannot work when mapping a "
+
495  "face to itself (face {})",
+
496  i);
+
497  assert(false);
+
498  continue;
+
499  }
+
500  auto neighbor_ff = ff_accessor.index_access().const_vector_attribute(neighbor_fid);
501 
-
502  int edge_shared_count = 0;
-
503  for (int local_neighbor_eid = 0; local_neighbor_eid < 3; ++local_neighbor_eid) {
-
504  // find some edge which is shared
-
505  if (neighbor_ff(local_neighbor_eid) == i) {
-
506  if (fe(j) == neighbor_fe(local_neighbor_eid)) {
-
507  edge_shared_count++;
-
508  }
-
509  }
-
510  }
-
511  if (edge_shared_count != 1) {
-
512  wmtk::logger().debug(
-
513  "face {} with fe={} neighbor fe[{}] = {} "
-
514  "was unable to find itself "
-
515  "uniquely (found {})",
-
516  i,
-
517  fmt::join(fe, ","),
-
518  neighbor_fid,
-
519  fmt::join(neighbor_fe, ","),
-
520  edge_shared_count);
-
521  return false;
-
522  }
-
523  } else {
-
524  wmtk::logger().debug(
-
525  "face {} with ff={} neighbor ff[{}] = {} was "
-
526  "unable to find itself",
-
527  i,
-
528  fmt::join(ff, ","),
-
529  neighbor_fid,
-
530  fmt::join(neighbor_ff, ","));
-
531  return false;
-
532  }
-
533  }
-
534  }
-
535  }
-
536 
-
537  return true;
-
538 }
-
539 
-
540 Tuple TriMesh::with_different_cid(const Tuple& t, int64_t cid)
-
541 {
-
542  Tuple r = t;
-
543  r.m_global_cid = cid;
-
544  return r;
-
545 }
-
546 
-
547 std::vector<std::vector<TypedAttributeHandle<int64_t>>> TriMesh::connectivity_attributes() const
-
548 {
-
549  std::vector<std::vector<TypedAttributeHandle<int64_t>>> handles(3);
+
502  if ((neighbor_ff.array() == i).any()) {
+
503  auto neighbor_fe =
+
504  fe_accessor.index_access().const_vector_attribute(neighbor_fid);
+
505 
+
506  int edge_shared_count = 0;
+
507  for (int local_neighbor_eid = 0; local_neighbor_eid < 3; ++local_neighbor_eid) {
+
508  // find some edge which is shared
+
509  if (neighbor_ff(local_neighbor_eid) == i) {
+
510  if (fe(j) == neighbor_fe(local_neighbor_eid)) {
+
511  edge_shared_count++;
+
512  }
+
513  }
+
514  }
+
515  if (edge_shared_count != 1) {
+
516  wmtk::logger().debug(
+
517  "face {} with fe={} neighbor fe[{}] = {} "
+
518  "was unable to find itself "
+
519  "uniquely (found {})",
+
520  i,
+
521  fmt::join(fe, ","),
+
522  neighbor_fid,
+
523  fmt::join(neighbor_fe, ","),
+
524  edge_shared_count);
+
525  return false;
+
526  }
+
527  } else {
+
528  wmtk::logger().debug(
+
529  "face {} with ff={} neighbor ff[{}] = {} was "
+
530  "unable to find itself",
+
531  i,
+
532  fmt::join(ff, ","),
+
533  neighbor_fid,
+
534  fmt::join(neighbor_ff, ","));
+
535  return false;
+
536  }
+
537  }
+
538  }
+
539  }
+
540 
+
541  return true;
+
542 }
+
543 
+
544 Tuple TriMesh::with_different_cid(const Tuple& t, int64_t cid)
+
545 {
+
546  Tuple r = t;
+
547  r.m_global_cid = cid;
+
548  return r;
+
549 }
550 
-
551  handles[2].push_back(m_vf_handle);
-
552  handles[2].push_back(m_ef_handle);
-
553  handles[2].push_back(m_ff_handle);
+
551 std::vector<std::vector<TypedAttributeHandle<int64_t>>> TriMesh::connectivity_attributes() const
+
552 {
+
553  std::vector<std::vector<TypedAttributeHandle<int64_t>>> handles(3);
554 
-
555  handles[1].push_back(m_fe_handle);
-
556 
-
557  handles[0].push_back(m_fv_handle);
+
555  handles[2].push_back(m_vf_handle);
+
556  handles[2].push_back(m_ef_handle);
+
557  handles[2].push_back(m_ff_handle);
558 
-
559  return handles;
-
560 }
-
561 
+
559  handles[1].push_back(m_fe_handle);
+
560 
+
561  handles[0].push_back(m_fv_handle);
562 
-
563 } // namespace wmtk
+
563  return handles;
+
564 }
+
565 
+
566 
+
567 } // namespace wmtk
@@ -690,41 +694,46 @@
int64_t get_cell_hash_slow(int64_t cell_index) const
Definition: Mesh.cpp:154
Tuple switch_face(const Tuple &tuple) const
Definition: Mesh.hpp:948
ConstAccessor< int64_t > get_const_cell_hash_accessor() const
Definition: Mesh.cpp:92
+
Mesh & operator=(const Mesh &other)=delete
bool is_valid_slow(const Tuple &tuple) const
Definition: Mesh.cpp:72
int64_t get_cell_hash(int64_t cell_index, const ConstAccessor< int64_t > &hash_accessor) const
Definition: Mesh.cpp:149
-
std::vector< std::vector< TypedAttributeHandle< int64_t > > > connectivity_attributes() const override
Returns a vector of vectors of attribute handles.
Definition: TriMesh.cpp:547
-
Tuple face_tuple_from_id(int64_t id) const
Definition: TriMesh.cpp:344
-
bool is_boundary_vertex(const Tuple &tuple) const
Definition: TriMesh.cpp:73
+
Definition: TriMesh.hpp:18
+
std::vector< std::vector< TypedAttributeHandle< int64_t > > > connectivity_attributes() const override
Returns a vector of vectors of attribute handles.
Definition: TriMesh.cpp:551
+
Tuple face_tuple_from_id(int64_t id) const
Definition: TriMesh.cpp:348
+
bool is_boundary_vertex(const Tuple &tuple) const
Definition: TriMesh.cpp:95
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_ff_accessor
Definition: TriMesh.hpp:101
attribute::TypedAttributeHandle< int64_t > m_vf_handle
Definition: TriMesh.hpp:90
-
int64_t id(const Tuple &tuple, PrimitiveType type) const override
return the global id of the Tuple of the given dimension
Definition: TriMesh.cpp:26
+
TriMesh & operator=(const TriMesh &o)=delete
+
int64_t id(const Tuple &tuple, PrimitiveType type) const override
return the global id of the Tuple of the given dimension
Definition: TriMesh.cpp:54
bool is_boundary(const simplex::Simplex &tuple) const
check if a simplex lies on a boundary or not
Definition: Mesh.cpp:54
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_vf_accessor
Definition: TriMesh.hpp:97
-
Tuple vertex_tuple_from_id(int64_t id) const
Definition: TriMesh.cpp:294
-
Tuple tuple_from_global_ids(int64_t fid, int64_t eid, int64_t vid) const
Definition: TriMesh.cpp:242
-
static Tuple with_different_cid(const Tuple &t, int64_t cid)
Definition: TriMesh.cpp:540
-
void initialize(Eigen::Ref< const RowVectors3l > FV, Eigen::Ref< const RowVectors3l > FE, Eigen::Ref< const RowVectors3l > FF, Eigen::Ref< const VectorXl > VF, Eigen::Ref< const VectorXl > EF)
Definition: TriMesh.cpp:185
-
bool is_connectivity_valid() const override
Definition: TriMesh.cpp:393
+
Tuple vertex_tuple_from_id(int64_t id) const
Definition: TriMesh.cpp:306
+
Tuple tuple_from_global_ids(int64_t fid, int64_t eid, int64_t vid) const
Definition: TriMesh.cpp:258
+
void make_cached_accessors()
Definition: TriMesh.cpp:21
+
static Tuple with_different_cid(const Tuple &t, int64_t cid)
Definition: TriMesh.cpp:544
+
void initialize(Eigen::Ref< const RowVectors3l > FV, Eigen::Ref< const RowVectors3l > FE, Eigen::Ref< const RowVectors3l > FF, Eigen::Ref< const VectorXl > VF, Eigen::Ref< const VectorXl > EF)
Definition: TriMesh.cpp:201
+
bool is_connectivity_valid() const override
Definition: TriMesh.cpp:397
attribute::TypedAttributeHandle< int64_t > m_ff_handle
Definition: TriMesh.hpp:95
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_fv_accessor
Definition: TriMesh.hpp:99
attribute::TypedAttributeHandle< int64_t > m_ef_handle
Definition: TriMesh.hpp:91
-
Tuple switch_tuple(const Tuple &tuple, PrimitiveType type) const override
switch the orientation of the Tuple of the given dimension
Definition: TriMesh.cpp:94
+
Tuple switch_tuple(const Tuple &tuple, PrimitiveType type) const override
switch the orientation of the Tuple of the given dimension
Definition: TriMesh.cpp:116
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_fe_accessor
Definition: TriMesh.hpp:100
-
bool is_ccw(const Tuple &tuple) const override
TODO this needs dimension?
Definition: TriMesh.cpp:179
-
bool is_boundary_edge(const Tuple &tuple) const
Definition: TriMesh.cpp:65
+
bool is_ccw(const Tuple &tuple) const override
TODO this needs dimension?
Definition: TriMesh.cpp:195
+
bool is_boundary_edge(const Tuple &tuple) const
Definition: TriMesh.cpp:89
attribute::TypedAttributeHandle< int64_t > m_fv_handle
Definition: TriMesh.hpp:93
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_ef_accessor
Definition: TriMesh.hpp:98
TriMesh()
Definition: TriMesh.cpp:10
-
Tuple edge_tuple_from_id(int64_t id) const
Definition: TriMesh.cpp:320
-
bool is_valid(const Tuple &tuple, ConstAccessor< int64_t > &hash_accessor) const override
check validity of tuple including its hash
Definition: TriMesh.cpp:360
+
Tuple edge_tuple_from_id(int64_t id) const
Definition: TriMesh.cpp:328
+
bool is_valid(const Tuple &tuple, ConstAccessor< int64_t > &hash_accessor) const override
check validity of tuple including its hash
Definition: TriMesh.cpp:364
attribute::TypedAttributeHandle< int64_t > m_fe_handle
Definition: TriMesh.hpp:94
-
Tuple tuple_from_id(const PrimitiveType type, const int64_t gid) const override
internal function that returns the tuple of requested type, and has the global index cid
Definition: TriMesh.cpp:273
+
Tuple tuple_from_id(const PrimitiveType type, const int64_t gid) const override
internal function that returns the tuple of requested type, and has the global index cid
Definition: TriMesh.cpp:285
Definition: Tuple.hpp:30
bool is_null() const
Definition: Tuple.cpp:56
int8_t m_local_vid
Definition: Tuple.hpp:34
int8_t m_local_eid
Definition: Tuple.hpp:35
int64_t m_global_cid
Definition: Tuple.hpp:38
int8_t m_local_fid
Definition: Tuple.hpp:36
+
Definition: autodiff.h:995
const int64_t auto_2d_table_complete_vertex[3][2]
const int64_t auto_2d_table_complete_edge[3][2]
bool tuple_is_valid_for_ccw(const Tuple &t)
Definition: is_ccw.hxx:17
diff --git a/_tri_mesh_8hpp_source.html b/_tri_mesh_8hpp_source.html index 55dc77fa0b..70e4f95203 100644 --- a/_tri_mesh_8hpp_source.html +++ b/_tri_mesh_8hpp_source.html @@ -139,58 +139,58 @@
22  friend class operations::utils::UpdateEdgeOperationMultiMeshMapFunctor;
23  TriMesh();
24  TriMesh(const TriMesh& o) = delete;
-
25  TriMesh(TriMesh&& o) = default;
-
26  TriMesh& operator=(const TriMesh& o) = delete;
-
27  TriMesh& operator=(TriMesh&& o) = default;
-
28 
-
29  int64_t top_cell_dimension() const override { return 2; }
-
30 
-
31  Tuple switch_tuple(const Tuple& tuple, PrimitiveType type) const override;
-
32 
-
36  Tuple next_edge(const Tuple& tuple) const { return switch_edge(switch_vertex(tuple)); }
-
40  Tuple prev_edge(const Tuple& tuple) const { return switch_vertex(switch_edge(tuple)); }
-
41 
-
42  bool is_ccw(const Tuple& tuple) const override;
-
43  using Mesh::is_boundary;
-
44  bool is_boundary(PrimitiveType pt, const Tuple& tuple) const override;
-
45  bool is_boundary_vertex(const Tuple& tuple) const;
-
46  bool is_boundary_edge(const Tuple& tuple) const;
-
47 
-
48  void initialize(
-
49  Eigen::Ref<const RowVectors3l> FV,
-
50  Eigen::Ref<const RowVectors3l> FE,
-
51  Eigen::Ref<const RowVectors3l> FF,
-
52  Eigen::Ref<const VectorXl> VF,
-
53  Eigen::Ref<const VectorXl> EF);
-
54  void initialize(Eigen::Ref<const RowVectors3l> F);
-
55 
-
56  bool is_valid(const Tuple& tuple, ConstAccessor<int64_t>& hash_accessor) const override;
-
57 
-
58  bool is_connectivity_valid() const override;
-
59 
-
60  std::vector<std::vector<TypedAttributeHandle<int64_t>>> connectivity_attributes()
-
61  const override;
-
62 
-
63 #if defined(MTAO_PUBLICIZING_ID)
-
64 public: // TODO remove
-
65 #else
-
66 protected:
-
67 #endif
-
68  int64_t id(const Tuple& tuple, PrimitiveType type) const override;
-
69  int64_t id(const simplex::Simplex& simplex) const
-
70  {
-
71  return id(simplex.tuple(), simplex.primitive_type());
-
72  }
-
73 
-
74  int64_t id_vertex(const Tuple& tuple) const { return id(tuple, PrimitiveType::Vertex); }
-
75  int64_t id_edge(const Tuple& tuple) const { return id(tuple, PrimitiveType::Edge); }
-
76  int64_t id_face(const Tuple& tuple) const { return id(tuple, PrimitiveType::Face); }
-
77 
-
85  Tuple tuple_from_id(const PrimitiveType type, const int64_t gid) const override;
-
86  Tuple tuple_from_global_ids(int64_t fid, int64_t eid, int64_t vid) const;
-
87 
-
88 protected:
-
89 
+
25  TriMesh& operator=(const TriMesh& o) = delete;
+
26  TriMesh(TriMesh&& o);
+
27  TriMesh& operator=(TriMesh&& o);
+
28  void make_cached_accessors();
+
29 
+
30  int64_t top_cell_dimension() const override { return 2; }
+
31 
+
32  Tuple switch_tuple(const Tuple& tuple, PrimitiveType type) const override;
+
33 
+
37  Tuple next_edge(const Tuple& tuple) const { return switch_edge(switch_vertex(tuple)); }
+
41  Tuple prev_edge(const Tuple& tuple) const { return switch_vertex(switch_edge(tuple)); }
+
42 
+
43  bool is_ccw(const Tuple& tuple) const override;
+
44  using Mesh::is_boundary;
+
45  bool is_boundary(PrimitiveType pt, const Tuple& tuple) const override;
+
46  bool is_boundary_vertex(const Tuple& tuple) const;
+
47  bool is_boundary_edge(const Tuple& tuple) const;
+
48 
+
49  void initialize(
+
50  Eigen::Ref<const RowVectors3l> FV,
+
51  Eigen::Ref<const RowVectors3l> FE,
+
52  Eigen::Ref<const RowVectors3l> FF,
+
53  Eigen::Ref<const VectorXl> VF,
+
54  Eigen::Ref<const VectorXl> EF);
+
55  void initialize(Eigen::Ref<const RowVectors3l> F);
+
56 
+
57  bool is_valid(const Tuple& tuple, ConstAccessor<int64_t>& hash_accessor) const override;
+
58 
+
59  bool is_connectivity_valid() const override;
+
60 
+
61  std::vector<std::vector<TypedAttributeHandle<int64_t>>> connectivity_attributes()
+
62  const override;
+
63 
+
64 #if defined(MTAO_PUBLICIZING_ID)
+
65 public: // TODO remove
+
66 #else
+
67 protected:
+
68 #endif
+
69  int64_t id(const Tuple& tuple, PrimitiveType type) const override;
+
70  int64_t id(const simplex::Simplex& simplex) const
+
71  {
+
72  return id(simplex.tuple(), simplex.primitive_type());
+
73  }
+
74 
+
75  int64_t id_vertex(const Tuple& tuple) const { return id(tuple, PrimitiveType::Vertex); }
+
76  int64_t id_edge(const Tuple& tuple) const { return id(tuple, PrimitiveType::Edge); }
+
77  int64_t id_face(const Tuple& tuple) const { return id(tuple, PrimitiveType::Face); }
+
78 
+
86  Tuple tuple_from_id(const PrimitiveType type, const int64_t gid) const override;
+
87  Tuple tuple_from_global_ids(int64_t fid, int64_t eid, int64_t vid) const;
+
88 
+
89 protected:
90  attribute::TypedAttributeHandle<int64_t> m_vf_handle;
91  attribute::TypedAttributeHandle<int64_t> m_ef_handle;
92 
@@ -223,44 +223,43 @@
Tuple switch_vertex(const Tuple &tuple) const
Definition: Mesh.hpp:940
Definition: TriMesh.hpp:18
-
std::vector< std::vector< TypedAttributeHandle< int64_t > > > connectivity_attributes() const override
Returns a vector of vectors of attribute handles.
Definition: TriMesh.cpp:547
-
Tuple next_edge(const Tuple &tuple) const
jump to the next edge by performing a switch of vertex and edge
Definition: TriMesh.hpp:36
-
Tuple face_tuple_from_id(int64_t id) const
Definition: TriMesh.cpp:344
-
int64_t id_face(const Tuple &tuple) const
Definition: TriMesh.hpp:76
-
bool is_boundary_vertex(const Tuple &tuple) const
Definition: TriMesh.cpp:73
-
int64_t top_cell_dimension() const override
Definition: TriMesh.hpp:29
+
std::vector< std::vector< TypedAttributeHandle< int64_t > > > connectivity_attributes() const override
Returns a vector of vectors of attribute handles.
Definition: TriMesh.cpp:551
+
Tuple next_edge(const Tuple &tuple) const
jump to the next edge by performing a switch of vertex and edge
Definition: TriMesh.hpp:37
+
Tuple face_tuple_from_id(int64_t id) const
Definition: TriMesh.cpp:348
+
int64_t id_face(const Tuple &tuple) const
Definition: TriMesh.hpp:77
+
bool is_boundary_vertex(const Tuple &tuple) const
Definition: TriMesh.cpp:95
+
int64_t top_cell_dimension() const override
Definition: TriMesh.hpp:30
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_ff_accessor
Definition: TriMesh.hpp:101
attribute::TypedAttributeHandle< int64_t > m_vf_handle
Definition: TriMesh.hpp:90
TriMesh & operator=(const TriMesh &o)=delete
-
int64_t id_vertex(const Tuple &tuple) const
Definition: TriMesh.hpp:74
-
int64_t id(const Tuple &tuple, PrimitiveType type) const override
return the global id of the Tuple of the given dimension
Definition: TriMesh.cpp:26
+
int64_t id_vertex(const Tuple &tuple) const
Definition: TriMesh.hpp:75
+
int64_t id(const Tuple &tuple, PrimitiveType type) const override
return the global id of the Tuple of the given dimension
Definition: TriMesh.cpp:54
bool is_boundary(const simplex::Simplex &tuple) const
check if a simplex lies on a boundary or not
Definition: Mesh.cpp:54
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_vf_accessor
Definition: TriMesh.hpp:97
-
Tuple vertex_tuple_from_id(int64_t id) const
Definition: TriMesh.cpp:294
-
Tuple tuple_from_global_ids(int64_t fid, int64_t eid, int64_t vid) const
Definition: TriMesh.cpp:242
-
int64_t id_edge(const Tuple &tuple) const
Definition: TriMesh.hpp:75
-
static Tuple with_different_cid(const Tuple &t, int64_t cid)
Definition: TriMesh.cpp:540
-
Tuple prev_edge(const Tuple &tuple) const
jump to the previous edge by performing a switch of edge and vertex
Definition: TriMesh.hpp:40
-
void initialize(Eigen::Ref< const RowVectors3l > FV, Eigen::Ref< const RowVectors3l > FE, Eigen::Ref< const RowVectors3l > FF, Eigen::Ref< const VectorXl > VF, Eigen::Ref< const VectorXl > EF)
Definition: TriMesh.cpp:185
-
bool is_connectivity_valid() const override
Definition: TriMesh.cpp:393
+
Tuple vertex_tuple_from_id(int64_t id) const
Definition: TriMesh.cpp:306
+
Tuple tuple_from_global_ids(int64_t fid, int64_t eid, int64_t vid) const
Definition: TriMesh.cpp:258
+
void make_cached_accessors()
Definition: TriMesh.cpp:21
+
int64_t id_edge(const Tuple &tuple) const
Definition: TriMesh.hpp:76
+
static Tuple with_different_cid(const Tuple &t, int64_t cid)
Definition: TriMesh.cpp:544
+
Tuple prev_edge(const Tuple &tuple) const
jump to the previous edge by performing a switch of edge and vertex
Definition: TriMesh.hpp:41
+
void initialize(Eigen::Ref< const RowVectors3l > FV, Eigen::Ref< const RowVectors3l > FE, Eigen::Ref< const RowVectors3l > FF, Eigen::Ref< const VectorXl > VF, Eigen::Ref< const VectorXl > EF)
Definition: TriMesh.cpp:201
+
bool is_connectivity_valid() const override
Definition: TriMesh.cpp:397
attribute::TypedAttributeHandle< int64_t > m_ff_handle
Definition: TriMesh.hpp:95
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_fv_accessor
Definition: TriMesh.hpp:99
attribute::TypedAttributeHandle< int64_t > m_ef_handle
Definition: TriMesh.hpp:91
-
Tuple switch_tuple(const Tuple &tuple, PrimitiveType type) const override
switch the orientation of the Tuple of the given dimension
Definition: TriMesh.cpp:94
-
int64_t id(const simplex::Simplex &simplex) const
Definition: TriMesh.hpp:69
-
TriMesh(TriMesh &&o)=default
+
Tuple switch_tuple(const Tuple &tuple, PrimitiveType type) const override
switch the orientation of the Tuple of the given dimension
Definition: TriMesh.cpp:116
+
int64_t id(const simplex::Simplex &simplex) const
Definition: TriMesh.hpp:70
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_fe_accessor
Definition: TriMesh.hpp:100
-
bool is_ccw(const Tuple &tuple) const override
TODO this needs dimension?
Definition: TriMesh.cpp:179
-
TriMesh & operator=(TriMesh &&o)=default
-
bool is_boundary_edge(const Tuple &tuple) const
Definition: TriMesh.cpp:65
+
bool is_ccw(const Tuple &tuple) const override
TODO this needs dimension?
Definition: TriMesh.cpp:195
+
bool is_boundary_edge(const Tuple &tuple) const
Definition: TriMesh.cpp:89
attribute::TypedAttributeHandle< int64_t > m_fv_handle
Definition: TriMesh.hpp:93
std::unique_ptr< attribute::MutableAccessor< int64_t > > m_ef_accessor
Definition: TriMesh.hpp:98
TriMesh()
Definition: TriMesh.cpp:10
TriMesh(const TriMesh &o)=delete
-
Tuple edge_tuple_from_id(int64_t id) const
Definition: TriMesh.cpp:320
-
bool is_valid(const Tuple &tuple, ConstAccessor< int64_t > &hash_accessor) const override
check validity of tuple including its hash
Definition: TriMesh.cpp:360
+
Tuple edge_tuple_from_id(int64_t id) const
Definition: TriMesh.cpp:328
+
bool is_valid(const Tuple &tuple, ConstAccessor< int64_t > &hash_accessor) const override
check validity of tuple including its hash
Definition: TriMesh.cpp:364
attribute::TypedAttributeHandle< int64_t > m_fe_handle
Definition: TriMesh.hpp:94
-
Tuple tuple_from_id(const PrimitiveType type, const int64_t gid) const override
internal function that returns the tuple of requested type, and has the global index cid
Definition: TriMesh.cpp:273
+
Tuple tuple_from_id(const PrimitiveType type, const int64_t gid) const override
internal function that returns the tuple of requested type, and has the global index cid
Definition: TriMesh.cpp:285
Definition: Tuple.hpp:30
diff --git a/_tri_mesh_operation_executor_8cpp_source.html b/_tri_mesh_operation_executor_8cpp_source.html index bcf7ef9f12..4852ae9b6b 100644 --- a/_tri_mesh_operation_executor_8cpp_source.html +++ b/_tri_mesh_operation_executor_8cpp_source.html @@ -691,7 +691,7 @@
void connect_faces_across_spine()
void update_ids_in_ear(const EarData &ear, const int64_t new_fid, const int64_t old_fid)
handling the topology glueing of ear to non-ear face, transfering data from ear-oldface to ear-newfac...
Definition: TriMesh.hpp:18
-
int64_t id(const Tuple &tuple, PrimitiveType type) const override
return the global id of the Tuple of the given dimension
Definition: TriMesh.cpp:26
+
int64_t id(const Tuple &tuple, PrimitiveType type) const override
return the global id of the Tuple of the given dimension
Definition: TriMesh.cpp:54
Definition: Tuple.hpp:30
void add(const Simplex &simplex)
Add simplex to the collection.
diff --git a/_triangle_fan_options_8cpp_source.html b/_triangle_fan_options_8cpp_source.html index 65b0b65b50..9d862e0cf4 100644 --- a/_triangle_fan_options_8cpp_source.html +++ b/_triangle_fan_options_8cpp_source.html @@ -172,7 +172,7 @@
Definition: TriMesh.hpp:18
-
void initialize(Eigen::Ref< const RowVectors3l > FV, Eigen::Ref< const RowVectors3l > FE, Eigen::Ref< const RowVectors3l > FF, Eigen::Ref< const VectorXl > VF, Eigen::Ref< const VectorXl > EF)
Definition: TriMesh.cpp:185
+
void initialize(Eigen::Ref< const RowVectors3l > FV, Eigen::Ref< const RowVectors3l > FE, Eigen::Ref< const RowVectors3l > FF, Eigen::Ref< const VectorXl > VF, Eigen::Ref< const VectorXl > EF)
Definition: TriMesh.cpp:201
std::optional< Coordinates > coordinates
int64_t size
diff --git a/_update_edge_operation_multi_mesh_map_functor_8cpp_source.html b/_update_edge_operation_multi_mesh_map_functor_8cpp_source.html index 87bb18a6ae..4914e94aa3 100644 --- a/_update_edge_operation_multi_mesh_map_functor_8cpp_source.html +++ b/_update_edge_operation_multi_mesh_map_functor_8cpp_source.html @@ -1049,12 +1049,12 @@
TypedAttributeHandle< int64_t > map_to_parent_handle
static int64_t parent_global_cid(const attribute::ConstAccessor< int64_t > &child_to_parent, int64_t child_gid)
Definition: TetMesh.hpp:13
-
Tuple tuple_from_global_ids(int64_t tid, int64_t fid, int64_t eid, int64_t vid) const
Definition: TetMesh.cpp:553
-
int64_t id_vertex(const Tuple &tuple) const
Definition: TetMesh.hpp:58
-
int64_t id_edge(const Tuple &tuple) const
Definition: TetMesh.hpp:59
+
Tuple tuple_from_global_ids(int64_t tid, int64_t fid, int64_t eid, int64_t vid) const
Definition: TetMesh.cpp:583
+
int64_t id_vertex(const Tuple &tuple) const
Definition: TetMesh.hpp:59
+
int64_t id_edge(const Tuple &tuple) const
Definition: TetMesh.hpp:60
Definition: TriMesh.hpp:18
-
int64_t id_vertex(const Tuple &tuple) const
Definition: TriMesh.hpp:74
-
Tuple tuple_from_global_ids(int64_t fid, int64_t eid, int64_t vid) const
Definition: TriMesh.cpp:242
+
int64_t id_vertex(const Tuple &tuple) const
Definition: TriMesh.hpp:75
+
Tuple tuple_from_global_ids(int64_t fid, int64_t eid, int64_t vid) const
Definition: TriMesh.cpp:258
Definition: Tuple.hpp:30
bool is_null() const
Definition: Tuple.cpp:56
A TupleAccessor that can only read from attributes.
diff --git a/classwmtk_1_1_mesh.html b/classwmtk_1_1_mesh.html index 9e71dff732..1179bfbb87 100644 --- a/classwmtk_1_1_mesh.html +++ b/classwmtk_1_1_mesh.html @@ -847,7 +847,7 @@

References wmtk::get_primitive_type_id(), m_attribute_manager, and wmtk::attribute::AttributeManager::m_capacities.

-

Referenced by consolidate(), get_all(), wmtk::EdgeMesh::initialize(), wmtk::TriMesh::initialize(), wmtk::TetMesh::initialize(), wmtk::PointMesh::initialize(), wmtk::EdgeMesh::is_connectivity_valid(), wmtk::TetMesh::is_connectivity_valid(), wmtk::TriMesh::is_connectivity_valid(), request_simplex_indices(), wmtk::multimesh::utils::internal::TupleTag::run(), wmtk::multimesh::same_simplex_dimension_bijection(), wmtk::MultiMeshManager::same_simplex_dimension_surjection(), and wmtk::MultiMeshManager::update_map_tuple_hashes().

+

Referenced by consolidate(), get_all(), wmtk::EdgeMesh::initialize(), wmtk::TriMesh::initialize(), wmtk::TetMesh::initialize(), wmtk::PointMesh::initialize(), wmtk::EdgeMesh::is_connectivity_valid(), wmtk::TetMesh::is_connectivity_valid(), wmtk::TriMesh::is_connectivity_valid(), request_simplex_indices(), wmtk::multimesh::utils::internal::TupleTag::run(), wmtk::multimesh::same_simplex_dimension_bijection(), wmtk::MultiMeshManager::same_simplex_dimension_surjection(), and wmtk::MultiMeshManager::update_map_tuple_hashes().

Here is the call graph for this function:
@@ -1718,7 +1718,7 @@

Definition at line 149 of file Mesh.cpp.

-

Referenced by wmtk::TetMesh::edge_tuple_from_id(), wmtk::TriMesh::edge_tuple_from_id(), wmtk::TetMesh::face_tuple_from_id(), get_cell_hash_slow(), is_hash_valid(), resurrect_tuple(), wmtk::EdgeMesh::switch_tuple(), wmtk::TriMesh::switch_tuple(), wmtk::TetMesh::tet_tuple_from_id(), and wmtk::TetMesh::vertex_tuple_from_id().

+

Referenced by wmtk::TetMesh::edge_tuple_from_id(), wmtk::TriMesh::edge_tuple_from_id(), wmtk::TetMesh::face_tuple_from_id(), get_cell_hash_slow(), is_hash_valid(), resurrect_tuple(), wmtk::EdgeMesh::switch_tuple(), wmtk::TriMesh::switch_tuple(), wmtk::TetMesh::tet_tuple_from_id(), and wmtk::TetMesh::vertex_tuple_from_id().

Here is the caller graph for this function:
@@ -1818,7 +1818,7 @@

References get_cell_hash(), and get_cell_hash_accessor().

-

Referenced by wmtk::EdgeMesh::edge_tuple_from_id(), wmtk::TriMesh::face_tuple_from_id(), wmtk::MultiMeshManager::find_valid_tuple_from_split(), wmtk::TetMesh::switch_tuple(), wmtk::EdgeMesh::tuple_from_global_ids(), wmtk::TriMesh::tuple_from_global_ids(), wmtk::TetMesh::tuple_from_global_ids(), wmtk::EdgeMesh::vertex_tuple_from_id(), wmtk::PointMesh::vertex_tuple_from_id(), and wmtk::TriMesh::vertex_tuple_from_id().

+

Referenced by wmtk::EdgeMesh::edge_tuple_from_id(), wmtk::TriMesh::face_tuple_from_id(), wmtk::MultiMeshManager::find_valid_tuple_from_split(), wmtk::TetMesh::switch_tuple(), wmtk::EdgeMesh::tuple_from_global_ids(), wmtk::TriMesh::tuple_from_global_ids(), wmtk::TetMesh::tuple_from_global_ids(), wmtk::EdgeMesh::vertex_tuple_from_id(), wmtk::PointMesh::vertex_tuple_from_id(), and wmtk::TriMesh::vertex_tuple_from_id().

Here is the call graph for this function:
@@ -1890,7 +1890,7 @@

References create_const_accessor(), and m_cell_hash_handle.

-

Referenced by wmtk::TetMesh::edge_tuple_from_id(), wmtk::TriMesh::edge_tuple_from_id(), wmtk::TetMesh::face_tuple_from_id(), get_cell_hash_accessor(), wmtk::operations::Operation::hash_accessor(), is_valid_slow(), wmtk::simplex::RawSimplex::opposite_face(), wmtk::simplex::RawSimplex::RawSimplex(), wmtk::EdgeMesh::switch_tuple(), wmtk::TriMesh::switch_tuple(), wmtk::TetMesh::tet_tuple_from_id(), wmtk::operations::utils::UpdateEdgeOperationMultiMeshMapFunctor::update_ear_replacement(), wmtk::MultiMeshManager::update_map_tuple_hashes(), and wmtk::TetMesh::vertex_tuple_from_id().

+

Referenced by wmtk::TetMesh::edge_tuple_from_id(), wmtk::TriMesh::edge_tuple_from_id(), wmtk::TetMesh::face_tuple_from_id(), get_cell_hash_accessor(), wmtk::operations::Operation::hash_accessor(), is_valid_slow(), wmtk::simplex::RawSimplex::opposite_face(), wmtk::simplex::RawSimplex::RawSimplex(), wmtk::EdgeMesh::switch_tuple(), wmtk::TriMesh::switch_tuple(), wmtk::TetMesh::tet_tuple_from_id(), wmtk::operations::utils::UpdateEdgeOperationMultiMeshMapFunctor::update_ear_replacement(), wmtk::MultiMeshManager::update_map_tuple_hashes(), and wmtk::TetMesh::vertex_tuple_from_id().

Here is the call graph for this function:
@@ -1998,7 +1998,7 @@

References get_const_flag_accessor().

-

Referenced by wmtk::MultiMeshManager::check_child_map_valid(), consolidate(), wmtk::EdgeMesh::EdgeMeshOperationExecutor::EdgeMeshOperationExecutor(), get_all(), wmtk::EdgeMesh::initialize(), wmtk::TriMesh::initialize(), wmtk::TetMesh::initialize(), wmtk::PointMesh::initialize(), wmtk::EdgeMesh::is_connectivity_valid(), wmtk::TetMesh::is_connectivity_valid(), wmtk::TriMesh::is_connectivity_valid(), request_simplex_indices(), wmtk::TetMesh::TetMeshOperationExecutor::TetMeshOperationExecutor(), and wmtk::TriMesh::TriMeshOperationExecutor::TriMeshOperationExecutor().

+

Referenced by wmtk::MultiMeshManager::check_child_map_valid(), consolidate(), wmtk::EdgeMesh::EdgeMeshOperationExecutor::EdgeMeshOperationExecutor(), get_all(), wmtk::EdgeMesh::initialize(), wmtk::TriMesh::initialize(), wmtk::TetMesh::initialize(), wmtk::PointMesh::initialize(), wmtk::EdgeMesh::is_connectivity_valid(), wmtk::TetMesh::is_connectivity_valid(), wmtk::TriMesh::is_connectivity_valid(), request_simplex_indices(), wmtk::TetMesh::TetMeshOperationExecutor::TetMeshOperationExecutor(), and wmtk::TriMesh::TriMeshOperationExecutor::TriMeshOperationExecutor().

Here is the call graph for this function:
@@ -2879,7 +2879,7 @@

References get_cell_hash(), wmtk::logger(), wmtk::Tuple::m_global_cid, and wmtk::Tuple::m_hash.

-

Referenced by wmtk::EdgeMesh::is_valid(), wmtk::PointMesh::is_valid(), wmtk::TetMesh::is_valid(), and wmtk::TriMesh::is_valid().

+

Referenced by wmtk::EdgeMesh::is_valid(), wmtk::PointMesh::is_valid(), wmtk::TetMesh::is_valid(), and wmtk::TriMesh::is_valid().

Here is the call graph for this function:
@@ -3010,7 +3010,7 @@

References get_const_cell_hash_accessor(), and is_valid().

-

Referenced by wmtk::MultiMeshManager::check_child_map_valid(), wmtk::simplex::closed_star(), wmtk::EdgeMesh::edge_tuple_from_id(), wmtk::multimesh::MultiMeshSimplexVisitor< cell_dimension_, NodeFunctor_ >::execute_from_root(), wmtk::TriMesh::face_tuple_from_id(), wmtk::MultiMeshManager::find_valid_tuple_from_split(), wmtk::TriMesh::is_boundary_edge(), wmtk::EdgeMesh::is_boundary_vertex(), wmtk::EdgeMesh::is_ccw(), wmtk::TetMesh::is_ccw(), wmtk::TriMesh::is_ccw(), wmtk::operations::VertexTangentialLaplacianSmooth::operator()(), wmtk::operations::utils::UpdateEdgeOperationMultiMeshMapFunctor::operator()(), wmtk::EdgeMesh::switch_tuple(), wmtk::TetMesh::switch_tuple(), wmtk::TriMesh::switch_tuple(), and wmtk::MultiMeshManager::update_map_tuple_hashes().

+

Referenced by wmtk::MultiMeshManager::check_child_map_valid(), wmtk::simplex::closed_star(), wmtk::EdgeMesh::edge_tuple_from_id(), wmtk::multimesh::MultiMeshSimplexVisitor< cell_dimension_, NodeFunctor_ >::execute_from_root(), wmtk::TriMesh::face_tuple_from_id(), wmtk::MultiMeshManager::find_valid_tuple_from_split(), wmtk::TriMesh::is_boundary_edge(), wmtk::EdgeMesh::is_boundary_vertex(), wmtk::EdgeMesh::is_ccw(), wmtk::TetMesh::is_ccw(), wmtk::TriMesh::is_ccw(), wmtk::operations::VertexTangentialLaplacianSmooth::operator()(), wmtk::operations::utils::UpdateEdgeOperationMultiMeshMapFunctor::operator()(), wmtk::EdgeMesh::switch_tuple(), wmtk::TetMesh::switch_tuple(), wmtk::TriMesh::switch_tuple(), and wmtk::MultiMeshManager::update_map_tuple_hashes().

Here is the call graph for this function:
@@ -3702,6 +3702,14 @@

+

Referenced by wmtk::TetMesh::operator=(), and wmtk::TriMesh::operator=().

+
+Here is the caller graph for this function:
+
+
+
+
+

@@ -4413,7 +4421,7 @@

References m_attribute_manager, and wmtk::attribute::AttributeManager::set_capacities().

-

Referenced by wmtk::EdgeMesh::initialize(), wmtk::TriMesh::initialize(), wmtk::TetMesh::initialize(), and wmtk::PointMesh::initialize().

+

Referenced by wmtk::EdgeMesh::initialize(), wmtk::TriMesh::initialize(), wmtk::TetMesh::initialize(), and wmtk::PointMesh::initialize().

Here is the call graph for this function:
@@ -4514,7 +4522,7 @@

References wmtk::Edge, and switch_tuple().

-

Referenced by wmtk::MultiMeshManager::check_child_map_valid(), wmtk::mesh_utils::compute_face_normal_area_weighted(), wmtk::simplex::edges(), wmtk::invariants::EnvelopeInvariant::EnvelopeInvariant(), wmtk::operations::composite::TetCellSplit::execute(), wmtk::operations::composite::TriFaceSplit::execute(), wmtk::multimesh::utils::internal::TupleTag::extract_and_register_child_mesh_from_tag_handle(), wmtk::simplex::faces(), wmtk::TriMesh::is_boundary_vertex(), wmtk::simplex::link_condition(), wmtk::TriMesh::next_edge(), wmtk::simplex::open_star(), wmtk::operations::VertexTangentialLaplacianSmooth::operator()(), wmtk::TriMesh::prev_edge(), wmtk::simplex::top_dimension_cofaces_tuples(), and wmtk::simplex::vertices().

+

Referenced by wmtk::MultiMeshManager::check_child_map_valid(), wmtk::mesh_utils::compute_face_normal_area_weighted(), wmtk::simplex::edges(), wmtk::invariants::EnvelopeInvariant::EnvelopeInvariant(), wmtk::operations::composite::TetCellSplit::execute(), wmtk::operations::composite::TriFaceSplit::execute(), wmtk::multimesh::utils::internal::TupleTag::extract_and_register_child_mesh_from_tag_handle(), wmtk::simplex::faces(), wmtk::TriMesh::is_boundary_vertex(), wmtk::simplex::link_condition(), wmtk::TriMesh::next_edge(), wmtk::simplex::open_star(), wmtk::operations::VertexTangentialLaplacianSmooth::operator()(), wmtk::TriMesh::prev_edge(), wmtk::simplex::top_dimension_cofaces_tuples(), and wmtk::simplex::vertices().

Here is the call graph for this function:
@@ -4558,7 +4566,7 @@

References wmtk::Face, and switch_tuple().

-

Referenced by wmtk::MultiMeshManager::check_child_map_valid(), wmtk::simplex::edges(), wmtk::operations::composite::TetCellSplit::execute(), wmtk::operations::composite::TriEdgeSwap::execute(), wmtk::multimesh::utils::internal::TupleTag::extract_and_register_child_mesh_from_tag_handle(), wmtk::simplex::faces(), wmtk::TetMesh::TetMeshOperationExecutor::get_incident_tets_and_faces(), wmtk::TriMesh::is_boundary_vertex(), wmtk::MultiMeshManager::map_tuple_between_meshes(), wmtk::operations::VertexTangentialLaplacianSmooth::operator()(), and wmtk::simplex::vertices().

+

Referenced by wmtk::MultiMeshManager::check_child_map_valid(), wmtk::simplex::edges(), wmtk::operations::composite::TetCellSplit::execute(), wmtk::operations::composite::TriEdgeSwap::execute(), wmtk::multimesh::utils::internal::TupleTag::extract_and_register_child_mesh_from_tag_handle(), wmtk::simplex::faces(), wmtk::TetMesh::TetMeshOperationExecutor::get_incident_tets_and_faces(), wmtk::TriMesh::is_boundary_vertex(), wmtk::MultiMeshManager::map_tuple_between_meshes(), wmtk::operations::VertexTangentialLaplacianSmooth::operator()(), and wmtk::simplex::vertices().

Here is the call graph for this function:
@@ -4850,7 +4858,7 @@

References switch_tuple(), and wmtk::Vertex.

-

Referenced by wmtk::SimplexInversionInvariant::after(), wmtk::MultiMeshEdgeTopologyInvariant::before(), wmtk::simplex::boundary_tuples(), wmtk::MultiMeshManager::check_child_map_valid(), wmtk::mesh_utils::compute_face_normal_area_weighted(), wmtk::mesh_utils::compute_vertex_normal(), wmtk::simplex::edges(), wmtk::invariants::EnvelopeInvariant::EnvelopeInvariant(), wmtk::operations::composite::TriEdgeSwap::execute(), wmtk::operations::composite::TriFaceSplit::execute(), wmtk::multimesh::utils::internal::TupleTag::extract_and_register_child_mesh_from_tag_handle(), wmtk::simplex::faces(), wmtk::function::utils::get_simplex_attributes(), wmtk::function::EdgeValenceEnergy::get_value(), wmtk::simplex::link_condition(), wmtk::simplex::link_condition_closed_tetmesh(), wmtk::TriMesh::next_edge(), wmtk::operations::VertexTangentialLaplacianSmooth::operator()(), wmtk::TriMesh::prev_edge(), wmtk::components::internal::Marching::process(), wmtk::multimesh::utils::internal::TupleTag::run(), wmtk::operations::EdgeCollapse::unmodified_primitives_aux(), and wmtk::simplex::vertices().

+

Referenced by wmtk::SimplexInversionInvariant::after(), wmtk::MultiMeshEdgeTopologyInvariant::before(), wmtk::simplex::boundary_tuples(), wmtk::MultiMeshManager::check_child_map_valid(), wmtk::mesh_utils::compute_face_normal_area_weighted(), wmtk::mesh_utils::compute_vertex_normal(), wmtk::simplex::edges(), wmtk::invariants::EnvelopeInvariant::EnvelopeInvariant(), wmtk::operations::composite::TriEdgeSwap::execute(), wmtk::operations::composite::TriFaceSplit::execute(), wmtk::multimesh::utils::internal::TupleTag::extract_and_register_child_mesh_from_tag_handle(), wmtk::simplex::faces(), wmtk::function::utils::get_simplex_attributes(), wmtk::function::EdgeValenceEnergy::get_value(), wmtk::simplex::link_condition(), wmtk::simplex::link_condition_closed_tetmesh(), wmtk::TriMesh::next_edge(), wmtk::operations::VertexTangentialLaplacianSmooth::operator()(), wmtk::TriMesh::prev_edge(), wmtk::components::internal::Marching::process(), wmtk::multimesh::utils::internal::TupleTag::run(), wmtk::operations::EdgeCollapse::unmodified_primitives_aux(), and wmtk::simplex::vertices().

Here is the call graph for this function:
diff --git a/classwmtk_1_1_mesh_a05eaf6f3eeb78949f3b95c359cc6df68_cgraph.svg b/classwmtk_1_1_mesh_a05eaf6f3eeb78949f3b95c359cc6df68_cgraph.svg index d6a40d21fd..53a771dbfd 100644 --- a/classwmtk_1_1_mesh_a05eaf6f3eeb78949f3b95c359cc6df68_cgraph.svg +++ b/classwmtk_1_1_mesh_a05eaf6f3eeb78949f3b95c359cc6df68_cgraph.svg @@ -48,7 +48,7 @@ if (edges && edges.length) {