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
13a0e854
Commit
13a0e854
authored
14 years ago
by
Laurent Van Migroet
Browse files
Options
Downloads
Patches
Plain Diff
setting filename when reading a geo file + add new function get all mesh vertices into GModel
parent
11aed392
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Geo/GModel.cpp
+15
-0
15 additions, 0 deletions
Geo/GModel.cpp
Geo/GModel.h
+3
-0
3 additions, 0 deletions
Geo/GModel.h
Geo/GModelIO_Geo.cpp
+3
-1
3 additions, 1 deletion
Geo/GModelIO_Geo.cpp
with
21 additions
and
1 deletion
Geo/GModel.cpp
+
15
−
0
View file @
13a0e854
...
@@ -642,6 +642,21 @@ int GModel::getNumMeshVertices()
...
@@ -642,6 +642,21 @@ int GModel::getNumMeshVertices()
return
n
;
return
n
;
}
}
void
GModel
::
getMeshVertices
(
std
::
vector
<
MVertex
*>
&
meshVertices
)
{
meshVertices
.
resize
(
getNumMeshVertices
());
std
::
vector
<
GEntity
*>
entities
;
getEntities
(
entities
);
int
n
=
-
1
;
for
(
unsigned
int
i
=
0
;
i
<
entities
.
size
();
i
++
)
{
GEntity
*
entity
=
entities
[
i
];
unsigned
msh_size
=
entity
->
mesh_vertices
.
size
();
for
(
unsigned
j
=
0
;
j
<
msh_size
;
++
j
)
meshVertices
[
++
n
]
=
entity
->
mesh_vertices
[
j
];
}
}
int
GModel
::
getNumMeshElements
()
int
GModel
::
getNumMeshElements
()
{
{
std
::
vector
<
GEntity
*>
entities
;
std
::
vector
<
GEntity
*>
entities
;
...
...
This diff is collapsed.
Click to expand it.
Geo/GModel.h
+
3
−
0
View file @
13a0e854
...
@@ -310,6 +310,9 @@ class GModel
...
@@ -310,6 +310,9 @@ class GModel
// return the total number of vertices in the mesh
// return the total number of vertices in the mesh
int
getNumMeshVertices
();
int
getNumMeshVertices
();
// return all the mesh vertices
void
getMeshVertices
(
std
::
vector
<
MVertex
*>
&
meshVertices
);
// access a mesh vertex by tag, using the vertex cache
// access a mesh vertex by tag, using the vertex cache
MVertex
*
getMeshVertexByTag
(
int
n
);
MVertex
*
getMeshVertexByTag
(
int
n
);
...
...
This diff is collapsed.
Click to expand it.
Geo/GModelIO_Geo.cpp
+
3
−
1
View file @
13a0e854
...
@@ -39,7 +39,9 @@ void GModel::_deleteGEOInternals()
...
@@ -39,7 +39,9 @@ void GModel::_deleteGEOInternals()
int
GModel
::
readGEO
(
const
std
::
string
&
name
)
int
GModel
::
readGEO
(
const
std
::
string
&
name
)
{
{
ParseFile
(
name
,
true
);
ParseFile
(
name
,
true
);
return
GModel
::
current
()
->
importGEOInternals
();
GModel
*
newModel
=
GModel
::
current
();
newModel
->
setFileName
(
name
);
return
newModel
->
importGEOInternals
();
}
}
int
GModel
::
exportDiscreteGEOInternals
()
int
GModel
::
exportDiscreteGEOInternals
()
...
...
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