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
Dmitri Naumov
ogs
Commits
bf41054c
Commit
bf41054c
authored
10 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[Cleanup] [MeL/MeshEditing] Use more const qualifier.
parent
aa6f6479
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MeshLib/MeshEditing/MeshRevision.cpp
+4
-4
4 additions, 4 deletions
MeshLib/MeshEditing/MeshRevision.cpp
with
4 additions
and
4 deletions
MeshLib/MeshEditing/MeshRevision.cpp
+
4
−
4
View file @
bf41054c
...
...
@@ -144,7 +144,7 @@ std::vector<std::size_t> MeshRevision::collapseNodeIndices(double eps) const
const
double
sqr_eps
(
eps
*
eps
);
std
::
iota
(
id_map
.
begin
(),
id_map
.
end
(),
0
);
GeoLib
::
Grid
<
MeshLib
::
Node
>
grid
(
nodes
.
begin
(),
nodes
.
end
(),
64
);
GeoLib
::
Grid
<
MeshLib
::
Node
>
const
grid
(
nodes
.
begin
(),
nodes
.
end
(),
64
);
for
(
std
::
size_t
k
=
0
;
k
<
nNodes
;
++
k
)
{
...
...
@@ -161,7 +161,7 @@ std::vector<std::size_t> MeshRevision::collapseNodeIndices(double eps) const
const
std
::
size_t
nGridCellNodes
(
cell_vector
.
size
());
for
(
std
::
size_t
j
=
0
;
j
<
nGridCellNodes
;
++
j
)
{
MeshLib
::
Node
*
test_node
(
cell_vector
[
j
]);
MeshLib
::
Node
const
*
const
test_node
(
cell_vector
[
j
]);
// are node indices already identical (i.e. nodes will be collapsed)
if
(
id_map
[
node
->
getID
()]
==
id_map
[
test_node
->
getID
()])
continue
;
...
...
@@ -191,7 +191,7 @@ std::vector<MeshLib::Node*> MeshRevision::constructNewNodesArray(const std::vect
// all nodes that have not been collapsed with other nodes are copied into new array
if
(
nodes
[
k
]
->
getID
()
==
id_map
[
k
])
{
std
::
size_t
id
(
new_nodes
.
size
());
std
::
size_t
const
id
(
new_nodes
.
size
());
new_nodes
.
push_back
(
new
MeshLib
::
Node
((
*
nodes
[
k
])[
0
],
(
*
nodes
[
k
])[
1
],
(
*
nodes
[
k
])[
2
],
id
));
nodes
[
k
]
->
setID
(
id
);
// the node in the old array gets the index of the same node in the new array
}
...
...
@@ -204,7 +204,7 @@ std::vector<MeshLib::Node*> MeshRevision::constructNewNodesArray(const std::vect
unsigned
MeshRevision
::
getNUniqueNodes
(
MeshLib
::
Element
const
*
const
element
)
const
{
unsigned
nNodes
(
element
->
getNBaseNodes
());
unsigned
const
nNodes
(
element
->
getNBaseNodes
());
unsigned
count
(
nNodes
);
for
(
unsigned
i
=
0
;
i
<
nNodes
-
1
;
++
i
)
...
...
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