Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Karsten Rink
ogs
Commits
a594c371
Commit
a594c371
authored
9 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
[MeL] Remove unused searchByElementIDs variant.
parent
8e2ffac6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
MeshLib/MeshEditing/RemoveMeshComponents.cpp
+1
-1
1 addition, 1 deletion
MeshLib/MeshEditing/RemoveMeshComponents.cpp
MeshLib/MeshSearch/NodeSearch.cpp
+0
-19
0 additions, 19 deletions
MeshLib/MeshSearch/NodeSearch.cpp
MeshLib/MeshSearch/NodeSearch.h
+3
-6
3 additions, 6 deletions
MeshLib/MeshSearch/NodeSearch.h
with
4 additions
and
26 deletions
MeshLib/MeshEditing/RemoveMeshComponents.cpp
+
1
−
1
View file @
a594c371
...
@@ -63,7 +63,7 @@ MeshLib::Mesh* removeElements(const MeshLib::Mesh& mesh, const std::vector<std::
...
@@ -63,7 +63,7 @@ MeshLib::Mesh* removeElements(const MeshLib::Mesh& mesh, const std::vector<std::
// delete unused nodes
// delete unused nodes
NodeSearch
ns
(
mesh
);
NodeSearch
ns
(
mesh
);
ns
.
searchByElementIDs
(
removed_element_ids
,
true
);
ns
.
searchByElementIDs
(
removed_element_ids
);
auto
&
removed_node_ids
(
ns
.
getSearchedNodeIDs
());
auto
&
removed_node_ids
(
ns
.
getSearchedNodeIDs
());
INFO
(
"Removing total %d nodes..."
,
removed_node_ids
.
size
());
INFO
(
"Removing total %d nodes..."
,
removed_node_ids
.
size
());
for
(
auto
nodeid
:
removed_node_ids
)
for
(
auto
nodeid
:
removed_node_ids
)
...
...
This diff is collapsed.
Click to expand it.
MeshLib/MeshSearch/NodeSearch.cpp
+
0
−
19
View file @
a594c371
...
@@ -47,25 +47,6 @@ std::vector<std::size_t> NodeSearch::searchByElementIDsMatchAllConnectedElements
...
@@ -47,25 +47,6 @@ std::vector<std::size_t> NodeSearch::searchByElementIDsMatchAllConnectedElements
return
connected_nodes
;
return
connected_nodes
;
}
}
std
::
vector
<
std
::
size_t
>
NodeSearch
::
searchByElementIDsNotMatchAllConnectedElements
(
const
std
::
vector
<
std
::
size_t
>
&
elements
)
{
std
::
vector
<
std
::
size_t
>
connected_nodes
;
for
(
std
::
size_t
eid
:
elements
)
{
auto
*
e
=
_mesh
.
getElement
(
eid
);
for
(
unsigned
i
=
0
;
i
<
e
->
getNBaseNodes
();
i
++
)
{
connected_nodes
.
push_back
(
e
->
getNodeIndex
(
i
));
}
}
std
::
sort
(
connected_nodes
.
begin
(),
connected_nodes
.
end
());
auto
it
=
std
::
unique
(
connected_nodes
.
begin
(),
connected_nodes
.
end
());
connected_nodes
.
resize
(
std
::
distance
(
connected_nodes
.
begin
(),
it
));
return
connected_nodes
;
}
std
::
size_t
NodeSearch
::
searchUnused
()
std
::
size_t
NodeSearch
::
searchUnused
()
{
{
const
size_t
nNodes
(
_mesh
.
getNNodes
());
const
size_t
nNodes
(
_mesh
.
getNNodes
());
...
...
This diff is collapsed.
Click to expand it.
MeshLib/MeshSearch/NodeSearch.h
+
3
−
6
View file @
a594c371
...
@@ -29,13 +29,11 @@ public:
...
@@ -29,13 +29,11 @@ public:
/// return marked node IDs
/// return marked node IDs
const
std
::
vector
<
std
::
size_t
>&
getSearchedNodeIDs
()
const
{
return
_marked_nodes
;
}
const
std
::
vector
<
std
::
size_t
>&
getSearchedNodeIDs
()
const
{
return
_marked_nodes
;
}
/// Marks all nodes connect
ing
to any of the given elements
/// Marks all nodes connect
ed
to any of the given elements
ids.
std
::
size_t
searchByElementIDs
(
const
std
::
vector
<
std
::
size_t
>
&
element_ids
,
bool
only_match_all_connected_elements
=
false
)
std
::
size_t
searchByElementIDs
(
const
std
::
vector
<
std
::
size_t
>
&
element_ids
)
{
{
std
::
vector
<
std
::
size_t
>
connected_nodes
=
std
::
vector
<
std
::
size_t
>
connected_nodes
=
(
only_match_all_connected_elements
searchByElementIDsMatchAllConnectedElements
(
element_ids
);
?
searchByElementIDsMatchAllConnectedElements
(
element_ids
)
:
searchByElementIDsNotMatchAllConnectedElements
(
element_ids
));
this
->
updateUnion
(
connected_nodes
);
this
->
updateUnion
(
connected_nodes
);
return
connected_nodes
.
size
();
return
connected_nodes
.
size
();
...
@@ -46,7 +44,6 @@ public:
...
@@ -46,7 +44,6 @@ public:
private
:
private
:
std
::
vector
<
std
::
size_t
>
searchByElementIDsMatchAllConnectedElements
(
const
std
::
vector
<
std
::
size_t
>
&
element_ids
);
std
::
vector
<
std
::
size_t
>
searchByElementIDsMatchAllConnectedElements
(
const
std
::
vector
<
std
::
size_t
>
&
element_ids
);
std
::
vector
<
std
::
size_t
>
searchByElementIDsNotMatchAllConnectedElements
(
const
std
::
vector
<
std
::
size_t
>
&
element_ids
);
/// Updates the vector of marked items with values from vec.
/// Updates the vector of marked items with values from vec.
void
updateUnion
(
const
std
::
vector
<
std
::
size_t
>
&
vec
);
void
updateUnion
(
const
std
::
vector
<
std
::
size_t
>
&
vec
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment