Skip to content

Commit

Permalink
X3d 3d ssfile (#1086)
Browse files Browse the repository at this point in the history
* Add jerk, sh==shake as unit names in unit parser.

* Add a README.md file based on the "Why we did it that way" essay

* Fix bug in reading of boundary files for 3D X3D meshes.

* Fix inefficiency that lint kvetched about.
  • Loading branch information
kgbudge authored Jul 9, 2021
1 parent dcb5c56 commit 9859953
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/mesh/X3D_Draco_Mesh_Reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ void X3D_Draco_Mesh_Reader::read_bdy_files() {
std::sort(flag_node_vec.begin(), flag_node_vec.end());

// find the mesh faces that have nodes in this flags set
for (auto face_nodes : x3d_facenode_map) {
for (auto const &face_nodes : x3d_facenode_map) {

// sort vector of nodes associated with this face
std::vector<unsigned> fnode_vec = get_facenodes(face_nodes.first);
Expand All @@ -406,7 +406,8 @@ void X3D_Draco_Mesh_Reader::read_bdy_files() {
if (nodes_in_common == fnode_vec) {

// add to the side-node map
x3d_sidenode_map.insert(std::pair<int, std::vector<unsigned>>(num_side, fnode_vec));
x3d_sidenode_map.insert(
std::pair<int, std::vector<unsigned>>(num_side, get_facenodes(face_nodes.first)));

// add to the side-flag map
x3d_sideflag_map.insert(std::pair<int, unsigned>(num_side, flag_key));
Expand Down
2 changes: 1 addition & 1 deletion src/mesh/test/tstX3D_Draco_Mesh_Reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void read_x3d_mesh_2d(rtt_c4::ParallelUnitTest &ut) {

FAIL_IF_NOT(x3d_reader->get_numsides() == 4);

std::vector<std::vector<unsigned>> test_sidenodes = {{0, 1}, {1, 3}, {2, 3}, {0, 2}};
std::vector<std::vector<unsigned>> test_sidenodes = {{0, 1}, {1, 3}, {3, 2}, {2, 0}};

// check each side's data
for (int side = 0; side < 4; ++side) {
Expand Down

0 comments on commit 9859953

Please sign in to comment.