Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
ade94911
Commit
ade94911
authored
13 years ago
by
Matti Pellika
Browse files
Options
Downloads
Patches
Plain Diff
Added a function to find all mesh elements by coordinates.
parent
92bb2f31
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Geo/GModel.cpp
+8
-0
8 additions, 0 deletions
Geo/GModel.cpp
Geo/GModel.h
+1
-0
1 addition, 0 deletions
Geo/GModel.h
with
9 additions
and
0 deletions
Geo/GModel.cpp
+
8
−
0
View file @
ade94911
...
@@ -697,6 +697,14 @@ MElement *GModel::getMeshElementByCoord(SPoint3 &p, int dim)
...
@@ -697,6 +697,14 @@ MElement *GModel::getMeshElementByCoord(SPoint3 &p, int dim)
}
}
return
_octree
->
find
(
p
.
x
(),
p
.
y
(),
p
.
z
(),
dim
);
return
_octree
->
find
(
p
.
x
(),
p
.
y
(),
p
.
z
(),
dim
);
}
}
std
::
vector
<
MElement
*>
GModel
::
getMeshElementsByCoord
(
SPoint3
&
p
,
int
dim
)
{
if
(
!
_octree
){
Msg
::
Debug
(
"Rebuilding mesh element octree"
);
_octree
=
new
MElementOctree
(
this
);
}
return
_octree
->
findAll
(
p
.
x
(),
p
.
y
(),
p
.
z
(),
dim
);
}
MVertex
*
GModel
::
getMeshVertexByTag
(
int
n
)
MVertex
*
GModel
::
getMeshVertexByTag
(
int
n
)
{
{
...
...
This diff is collapsed.
Click to expand it.
Geo/GModel.h
+
1
−
0
View file @
ade94911
...
@@ -297,6 +297,7 @@ class GModel
...
@@ -297,6 +297,7 @@ class GModel
// access a mesh element by coordinates (using an octree search)
// access a mesh element by coordinates (using an octree search)
MElement
*
getMeshElementByCoord
(
SPoint3
&
p
,
int
dim
=
-
1
);
MElement
*
getMeshElementByCoord
(
SPoint3
&
p
,
int
dim
=
-
1
);
std
::
vector
<
MElement
*>
getMeshElementsByCoord
(
SPoint3
&
p
,
int
dim
=
-
1
);
// access a mesh element by tag, using the element cache
// access a mesh element by tag, using the element cache
MElement
*
getMeshElementByTag
(
int
n
);
MElement
*
getMeshElementByTag
(
int
n
);
...
...
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