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
c090ab83
Commit
c090ab83
authored
9 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
try not to include GmshDefines.h in headers
parent
d2299f8b
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
Geo/GRegion.cpp
+27
-0
27 additions, 0 deletions
Geo/GRegion.cpp
Geo/GRegion.h
+3
-29
3 additions, 29 deletions
Geo/GRegion.h
Geo/MElement.h
+2
-1
2 additions, 1 deletion
Geo/MElement.h
Post/PView.h
+0
-2
0 additions, 2 deletions
Post/PView.h
with
32 additions
and
32 deletions
Geo/GRegion.cpp
+
27
−
0
View file @
c090ab83
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
#include
"GmshMessage.h"
#include
"GmshMessage.h"
#include
"VertexArray.h"
#include
"VertexArray.h"
#include
"boundaryLayersData.h"
#include
"boundaryLayersData.h"
#include
"GmshDefines.h"
GRegion
::
GRegion
(
GModel
*
model
,
int
tag
)
GRegion
::
GRegion
(
GModel
*
model
,
int
tag
)
:
GEntity
(
model
,
tag
),
compound
(
0
)
:
GEntity
(
model
,
tag
),
compound
(
0
)
...
@@ -432,3 +433,29 @@ std::list<GVertex*> GRegion::vertices() const
...
@@ -432,3 +433,29 @@ std::list<GVertex*> GRegion::vertices() const
res
.
insert
(
res
.
begin
(),
v
.
begin
(),
v
.
end
());
res
.
insert
(
res
.
begin
(),
v
.
begin
(),
v
.
end
());
return
res
;
return
res
;
}
}
void
GRegion
::
addElement
(
int
type
,
MElement
*
e
)
{
switch
(
type
){
case
TYPE_TET
:
addTetrahedron
((
MTetrahedron
*
)
e
);
break
;
case
TYPE_HEX
:
addHexahedron
((
MHexahedron
*
)
e
);
break
;
case
TYPE_PRI
:
addPrism
((
MPrism
*
)
e
);
break
;
case
TYPE_PYR
:
addPyramid
((
MPyramid
*
)
e
);
break
;
case
TYPE_TRIH
:
addTrihedron
((
MTrihedron
*
)
e
);
break
;
case
TYPE_POLYH
:
addPolyhedron
((
MPolyhedron
*
)
e
);
break
;
default:
Msg
::
Error
(
"Trying to add unsupported element in region"
);
}
}
This diff is collapsed.
Click to expand it.
Geo/GRegion.h
+
3
−
29
View file @
c090ab83
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
#include
<stdio.h>
#include
<stdio.h>
#include
"GEntity.h"
#include
"GEntity.h"
#include
"boundaryLayersData.h"
#include
"boundaryLayersData.h"
#include
"GmshDefines.h"
class
MElement
;
class
MElement
;
class
MTetrahedron
;
class
MTetrahedron
;
...
@@ -68,7 +67,6 @@ class GRegion : public GEntity {
...
@@ -68,7 +67,6 @@ class GRegion : public GEntity {
// vertices that bound the region
// vertices that bound the region
virtual
std
::
list
<
GVertex
*>
vertices
()
const
;
virtual
std
::
list
<
GVertex
*>
vertices
()
const
;
// get the bounding box
// get the bounding box
virtual
SBoundingBox3d
bounds
()
const
;
virtual
SBoundingBox3d
bounds
()
const
;
...
@@ -137,39 +135,15 @@ class GRegion : public GEntity {
...
@@ -137,39 +135,15 @@ class GRegion : public GEntity {
std
::
vector
<
MPolyhedron
*>
polyhedra
;
std
::
vector
<
MPolyhedron
*>
polyhedra
;
void
addTetrahedron
(
MTetrahedron
*
t
){
tetrahedra
.
push_back
(
t
);
}
void
addTetrahedron
(
MTetrahedron
*
t
){
tetrahedra
.
push_back
(
t
);
}
void
addHexahedron
(
MHexahedron
*
h
){
hexahedra
.
push_back
(
h
);
}
void
addHexahedron
(
MHexahedron
*
h
){
hexahedra
.
push_back
(
h
);
}
void
addPrism
(
MPrism
*
p
){
prisms
.
push_back
(
p
);
}
void
addPrism
(
MPrism
*
p
){
prisms
.
push_back
(
p
);
}
void
addPyramid
(
MPyramid
*
p
){
pyramids
.
push_back
(
p
);
}
void
addPyramid
(
MPyramid
*
p
){
pyramids
.
push_back
(
p
);
}
void
addPolyhedron
(
MPolyhedron
*
p
){
polyhedra
.
push_back
(
p
);
}
void
addPolyhedron
(
MPolyhedron
*
p
){
polyhedra
.
push_back
(
p
);
}
void
addTrihedron
(
MTrihedron
*
t
){
trihedra
.
push_back
(
t
);
}
void
addTrihedron
(
MTrihedron
*
t
){
trihedra
.
push_back
(
t
);
}
void
addElement
(
int
type
,
MElement
*
e
){
void
addElement
(
int
type
,
MElement
*
e
);
switch
(
type
){
case
TYPE_TET
:
addTetrahedron
((
MTetrahedron
*
)
e
);
break
;
case
TYPE_HEX
:
addHexahedron
((
MHexahedron
*
)
e
);
break
;
case
TYPE_PRI
:
addPrism
((
MPrism
*
)
e
);
break
;
case
TYPE_PYR
:
addPyramid
((
MPyramid
*
)
e
);
break
;
case
TYPE_TRIH
:
addTrihedron
((
MTrihedron
*
)
e
);
break
;
case
TYPE_POLYH
:
addPolyhedron
((
MPolyhedron
*
)
e
);
break
;
default:
Msg
::
Fatal
(
"Trying to add unsupported element"
);
}
}
// get the boundary layer columns
// get the boundary layer columns
BoundaryLayerColumns
*
getColumns
()
{
return
&
_columns
;}
BoundaryLayerColumns
*
getColumns
()
{
return
&
_columns
;
}
};
};
#endif
#endif
This diff is collapsed.
Click to expand it.
Geo/MElement.h
+
2
−
1
View file @
c090ab83
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#include
<stdio.h>
#include
<stdio.h>
#include
<algorithm>
#include
<algorithm>
#include
<string>
#include
<string>
#include
"GmshDefines.h"
#include
"GmshMessage.h"
#include
"GmshMessage.h"
#include
"MVertex.h"
#include
"MVertex.h"
#include
"MEdge.h"
#include
"MEdge.h"
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include
"JacobianBasis.h"
#include
"JacobianBasis.h"
#include
"MetricBasis.h"
#include
"MetricBasis.h"
#include
"GaussIntegration.h"
#include
"GaussIntegration.h"
class
GModel
;
class
GModel
;
// A mesh element.
// A mesh element.
...
...
This diff is collapsed.
Click to expand it.
Post/PView.h
+
0
−
2
View file @
c090ab83
...
@@ -10,8 +10,6 @@
...
@@ -10,8 +10,6 @@
#include
<map>
#include
<map>
#include
<string>
#include
<string>
#include
"SPoint3.h"
#include
"SPoint3.h"
//#include "drawContext.h"
class
PViewData
;
class
PViewData
;
class
PViewOptions
;
class
PViewOptions
;
...
...
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