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
fc01a8a9
Commit
fc01a8a9
authored
17 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
manage GModel::list automatically (like PView::list)
parent
7008d187
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Box/Box.cpp
+2
-2
2 additions, 2 deletions
Box/Box.cpp
Fltk/Main.cpp
+2
-2
2 additions, 2 deletions
Fltk/Main.cpp
Geo/GModel.cpp
+20
-6
20 additions, 6 deletions
Geo/GModel.cpp
Geo/GModel.h
+2
-6
2 additions, 6 deletions
Geo/GModel.h
with
26 additions
and
16 deletions
Box/Box.cpp
+
2
−
2
View file @
fc01a8a9
// $Id: Box.cpp,v 1.3
7
2007-09-
10 04:47
:0
1
geuzaine Exp $
// $Id: Box.cpp,v 1.3
8
2007-09-
21 21:14
:0
0
geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -78,7 +78,7 @@ int GMSHBOX(int argc, char *argv[])
{
ParUtil
::
Instance
()
->
init
(
argc
,
argv
);
GModel
::
list
.
push_back
(
new
GModel
)
;
new
GModel
;
THEM
=
new
Mesh
;
InitSymbols
();
...
...
This diff is collapsed.
Click to expand it.
Fltk/Main.cpp
+
2
−
2
View file @
fc01a8a9
// $Id: Main.cpp,v 1.11
0
2007-09-
10 05:31:35
geuzaine Exp $
// $Id: Main.cpp,v 1.11
1
2007-09-
21 21:14:00
geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
}
// Create a new model
GModel
::
list
.
push_back
(
new
GModel
)
;
new
GModel
;
THEM
=
new
Mesh
;
// Initialize the symbol tree that will hold variable names
...
...
This diff is collapsed.
Click to expand it.
Geo/GModel.cpp
+
20
−
6
View file @
fc01a8a9
// $Id: GModel.cpp,v 1.4
7
2007-09-
1
2 2
0
:14:
34
geuzaine Exp $
// $Id: GModel.cpp,v 1.4
8
2007-09-2
1
2
1
:14:
00
geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -27,6 +27,20 @@
std
::
vector
<
GModel
*>
GModel
::
list
;
GModel
::
GModel
(
std
::
string
name
)
:
modelName
(
name
),
normals
(
0
)
{
list
.
push_back
(
this
);
}
GModel
::~
GModel
()
{
std
::
vector
<
GModel
*>::
iterator
it
=
std
::
find
(
list
.
begin
(),
list
.
end
(),
this
);
if
(
it
!=
list
.
end
())
list
.
erase
(
it
);
deleteOCCInternals
();
destroy
();
}
GModel
*
GModel
::
current
()
{
if
(
list
.
empty
()){
...
...
@@ -68,7 +82,7 @@ void GModel::destroy()
BGMReset
();
}
GRegion
*
GModel
::
regionByTag
(
int
n
)
const
GRegion
*
GModel
::
regionByTag
(
int
n
)
const
{
GEntity
tmp
((
GModel
*
)
this
,
n
);
riter
it
=
regions
.
find
((
GRegion
*
)
&
tmp
);
...
...
@@ -78,7 +92,7 @@ GRegion * GModel::regionByTag(int n) const
return
0
;
}
GFace
*
GModel
::
faceByTag
(
int
n
)
const
GFace
*
GModel
::
faceByTag
(
int
n
)
const
{
GEntity
tmp
((
GModel
*
)
this
,
n
);
fiter
it
=
faces
.
find
((
GFace
*
)
&
tmp
);
...
...
@@ -88,7 +102,7 @@ GFace * GModel::faceByTag(int n) const
return
0
;
}
GEdge
*
GModel
::
edgeByTag
(
int
n
)
const
GEdge
*
GModel
::
edgeByTag
(
int
n
)
const
{
GEntity
tmp
((
GModel
*
)
this
,
n
);
eiter
it
=
edges
.
find
((
GEdge
*
)
&
tmp
);
...
...
@@ -98,7 +112,7 @@ GEdge * GModel::edgeByTag(int n) const
return
0
;
}
GVertex
*
GModel
::
vertexByTag
(
int
n
)
const
GVertex
*
GModel
::
vertexByTag
(
int
n
)
const
{
GEntity
tmp
((
GModel
*
)
this
,
n
);
viter
it
=
vertices
.
find
((
GVertex
*
)
&
tmp
);
...
...
@@ -291,7 +305,7 @@ bool GModel::noPhysicalGroups()
return
true
;
}
static
void
addInGroup
(
GEntity
*
ge
,
std
::
map
<
int
,
std
::
vector
<
GEntity
*>
>
&
group
)
static
void
addInGroup
(
GEntity
*
ge
,
std
::
map
<
int
,
std
::
vector
<
GEntity
*>
>
&
group
)
{
for
(
unsigned
int
i
=
0
;
i
<
ge
->
physicals
.
size
();
i
++
){
// physicals can be stored with negative signs when the entity
...
...
This diff is collapsed.
Click to expand it.
Geo/GModel.h
+
2
−
6
View file @
fc01a8a9
...
...
@@ -32,8 +32,6 @@
// OCC Internals have to be stored in the model
class
OCC_Internals
;
// Fourier Internals have to be stored in the model
class
F_Internals
;
// A geometric model. The model is a "not yet" non-manifold B-Rep.
class
GModel
...
...
@@ -41,7 +39,6 @@ class GModel
protected:
void
deleteOCCInternals
();
OCC_Internals
*
occ_internals
;
F_Internals
*
f_internals
;
std
::
string
modelName
;
std
::
set
<
GRegion
*
,
GEntityLessThan
>
regions
;
...
...
@@ -52,9 +49,8 @@ class GModel
std
::
map
<
int
,
std
::
string
>
physicalNames
;
public:
GModel
()
:
modelName
(
"Untitled"
),
normals
(
0
)
{}
GModel
(
const
std
::
string
&
name
)
:
modelName
(
name
),
normals
(
0
)
{}
~
GModel
(){
deleteOCCInternals
();
destroy
();
}
GModel
(
std
::
string
name
=
""
);
~
GModel
();
// the static list of all loaded models
static
std
::
vector
<
GModel
*>
list
;
...
...
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