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
bd79636f
Commit
bd79636f
authored
6 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[MGTL] BoundaryElementsSearcher: modernize methods.
parent
ab02ba89
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
MeshGeoToolsLib/BoundaryElementsSearcher.cpp
+21
-14
21 additions, 14 deletions
MeshGeoToolsLib/BoundaryElementsSearcher.cpp
with
21 additions
and
14 deletions
MeshGeoToolsLib/BoundaryElementsSearcher.cpp
+
21
−
14
View file @
bd79636f
...
@@ -82,33 +82,40 @@ BoundaryElementsSearcher::getBoundaryElementsAtPoint(GeoLib::Point const& point)
...
@@ -82,33 +82,40 @@ BoundaryElementsSearcher::getBoundaryElementsAtPoint(GeoLib::Point const& point)
return
_boundary_elements_at_point
.
back
()
->
getBoundaryElements
();
return
_boundary_elements_at_point
.
back
()
->
getBoundaryElements
();
}
}
std
::
vector
<
MeshLib
::
Element
*>
const
&
BoundaryElementsSearcher
::
getBoundaryElementsAlongPolyline
(
GeoLib
::
Polyline
const
&
ply
)
std
::
vector
<
MeshLib
::
Element
*>
const
&
BoundaryElementsSearcher
::
getBoundaryElementsAlongPolyline
(
GeoLib
::
Polyline
const
&
polyline
)
{
{
std
::
vector
<
BoundaryElementsAlongPolyline
*>::
const_iterator
it
(
_boundary_elements_along_polylines
.
begin
());
// look for already saved polylines and return if found.
for
(;
it
!=
_boundary_elements_along_polylines
.
end
();
++
it
)
{
for
(
auto
const
&
boundary_elements
:
_boundary_elements_along_polylines
)
if
(
&
(
*
it
)
->
getPolyline
()
==
&
ply
)
{
{
// we calculated mesh nodes for this polyline already
if
(
&
boundary_elements
->
getPolyline
()
==
&
polyline
)
return
(
*
it
)
->
getBoundaryElements
();
{
return
boundary_elements
->
getBoundaryElements
();
}
}
}
}
// create new boundary elements at points.
_boundary_elements_along_polylines
.
push_back
(
_boundary_elements_along_polylines
.
push_back
(
new
BoundaryElementsAlongPolyline
(
_mesh
,
_mshNodeSearcher
,
ply
));
new
BoundaryElementsAlongPolyline
(
_mesh
,
_mshNodeSearcher
,
p
o
ly
line
));
return
_boundary_elements_along_polylines
.
back
()
->
getBoundaryElements
();
return
_boundary_elements_along_polylines
.
back
()
->
getBoundaryElements
();
}
}
std
::
vector
<
MeshLib
::
Element
*>
const
&
BoundaryElementsSearcher
::
getBoundaryElementsOnSurface
(
GeoLib
::
Surface
const
&
sfc
)
std
::
vector
<
MeshLib
::
Element
*>
const
&
BoundaryElementsSearcher
::
getBoundaryElementsOnSurface
(
GeoLib
::
Surface
const
&
surface
)
{
{
std
::
vector
<
BoundaryElementsOnSurface
*>::
const_iterator
it
(
_boundary_elements_along_surfaces
.
begin
());
// look for already saved surfaces and return if found.
for
(;
it
!=
_boundary_elements_along_surfaces
.
end
();
++
it
)
{
for
(
auto
const
&
boundary_elements
:
_boundary_elements_along_surfaces
)
if
(
&
(
*
it
)
->
getSurface
()
==
&
sfc
)
{
{
// we calculated mesh nodes for this surface already
if
(
&
boundary_elements
->
getSurface
()
==
&
surface
)
return
(
*
it
)
->
getBoundaryElements
();
{
return
boundary_elements
->
getBoundaryElements
();
}
}
}
}
_boundary_elements_along_surfaces
.
push_back
(
_boundary_elements_along_surfaces
.
push_back
(
new
BoundaryElementsOnSurface
(
_mesh
,
_mshNodeSearcher
,
s
fc
));
new
BoundaryElementsOnSurface
(
_mesh
,
_mshNodeSearcher
,
s
urface
));
return
_boundary_elements_along_surfaces
.
back
()
->
getBoundaryElements
();
return
_boundary_elements_along_surfaces
.
back
()
->
getBoundaryElements
();
}
}
...
...
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