Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nektar
Nektar
Commits
0d7bfd44
Commit
0d7bfd44
authored
Aug 01, 2016
by
Dave Moxey
Browse files
Switch map from linear search to lookup
parent
b36d04da
Changes
1
Hide whitespace changes
Inline
Side-by-side
library/SpatialDomains/MeshGraph.cpp
View file @
0d7bfd44
...
...
@@ -2325,19 +2325,14 @@ namespace Nektar
ExpansionShPtr
MeshGraph
::
GetExpansion
(
GeometrySharedPtr
geom
,
const
std
::
string
variable
)
{
ExpansionMapIter
iter
;
ExpansionShPtr
returnval
;
ExpansionMapShPtr
expansionMap
=
m_expansionMapShPtrMap
.
find
(
variable
)
->
second
;
for
(
iter
=
expansionMap
->
begin
();
iter
!=
expansionMap
->
end
();
++
iter
)
{
if
((
iter
->
second
)
->
m_geomShPtr
==
geom
)
{
returnval
=
iter
->
second
;
break
;
}
}
return
returnval
;
iter
=
expansionMap
->
find
(
geom
->
GetGlobalID
());
ASSERTL1
(
iter
!=
expansionMap
.
end
(),
"Could not find expansion "
+
boost
::
lexical_cast
<
string
>
(
geom
->
GetGlobalID
())
+
" in expansion for variable "
+
variable
);
return
iter
->
second
;
}
...
...
Dave Moxey
@dmoxey
mentioned in commit
cf4f9110
·
Aug 02, 2016
mentioned in commit
cf4f9110
mentioned in commit cf4f911097dcdf0f2bb5b1d4db039f421df591bc
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment