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
5ce74bd2
Commit
5ce74bd2
authored
17 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fix position of BoundaryLayerPoints
parent
69445ed5
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
Geo/GPoint.h
+10
-6
10 additions, 6 deletions
Geo/GPoint.h
Geo/GVertex.cpp
+8
-2
8 additions, 2 deletions
Geo/GVertex.cpp
Geo/GVertex.h
+1
-0
1 addition, 0 deletions
Geo/GVertex.h
Geo/gmshVertex.h
+13
-0
13 additions, 0 deletions
Geo/gmshVertex.h
Mesh/BoundaryLayer.cpp
+5
-9
5 additions, 9 deletions
Mesh/BoundaryLayer.cpp
with
37 additions
and
17 deletions
Geo/GPoint.h
+
10
−
6
View file @
5ce74bd2
...
...
@@ -31,13 +31,17 @@ class GPoint
const
GEntity
*
e
;
double
par
[
2
];
public:
inline
double
x
()
const
{
return
X
;}
inline
double
y
()
const
{
return
Y
;}
inline
double
z
()
const
{
return
Z
;}
inline
double
u
()
const
{
return
par
[
0
];}
inline
double
v
()
const
{
return
par
[
1
];}
inline
double
x
()
const
{
return
X
;
}
inline
double
y
()
const
{
return
Y
;
}
inline
double
z
()
const
{
return
Z
;
}
inline
double
&
x
()
{
return
X
;
}
inline
double
&
y
()
{
return
Y
;
}
inline
double
&
z
()
{
return
Z
;
}
inline
double
u
()
const
{
return
par
[
0
];
}
inline
double
v
()
const
{
return
par
[
1
];
}
GPoint
(
double
_x
=
0
,
double
_y
=
0
,
double
_z
=
0
,
const
GEntity
*
onwhat
=
0
)
:
X
(
_x
),
Y
(
_y
),
Z
(
_z
),
e
(
onwhat
){
:
X
(
_x
),
Y
(
_y
),
Z
(
_z
),
e
(
onwhat
)
{
}
GPoint
(
double
_x
,
double
_y
,
double
_z
,
const
GEntity
*
onwhat
,
double
p
)
:
X
(
_x
),
Y
(
_y
),
Z
(
_z
),
e
(
onwhat
)
...
...
This diff is collapsed.
Click to expand it.
Geo/GVertex.cpp
+
8
−
2
View file @
5ce74bd2
// $Id: GVertex.cpp,v 1.1
2
2007-0
1-18 13:18:42
geuzaine Exp $
// $Id: GVertex.cpp,v 1.1
3
2007-0
9-03 12:00:28
geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -19,9 +19,10 @@
//
// Please report all bugs and problems to <gmsh@geuz.org>.
#include
<algorithm>
#include
"GVertex.h"
#include
"GFace.h"
#include
<algorithm>
#include
"Message.h"
GVertex
::
GVertex
(
GModel
*
m
,
int
tag
,
double
ms
)
:
GEntity
(
m
,
tag
),
meshSize
(
ms
)
{
...
...
@@ -33,6 +34,11 @@ GVertex::~GVertex()
delete
mesh_vertices
[
i
];
}
void
GVertex
::
setPosition
(
GPoint
&
p
)
{
Msg
(
GERROR
,
"Cannot set position of this kind of vertex"
);
}
void
GVertex
::
addEdge
(
GEdge
*
e
)
{
l_edges
.
push_back
(
e
);
...
...
This diff is collapsed.
Click to expand it.
Geo/GVertex.h
+
1
−
0
View file @
5ce74bd2
...
...
@@ -38,6 +38,7 @@ class GVertex : public GEntity
virtual
double
x
()
const
=
0
;
virtual
double
y
()
const
=
0
;
virtual
double
z
()
const
=
0
;
virtual
void
setPosition
(
GPoint
&
p
);
void
addEdge
(
GEdge
*
e
);
void
delEdge
(
GEdge
*
e
);
virtual
int
dim
()
const
{
return
0
;}
...
...
This diff is collapsed.
Click to expand it.
Geo/gmshVertex.h
+
13
−
0
View file @
5ce74bd2
...
...
@@ -59,6 +59,19 @@ class gmshVertex : public GVertex {
{
return
v
?
v
->
Pos
.
Z
:
mesh_vertices
.
size
()
?
mesh_vertices
[
0
]
->
z
()
:
0.
;
}
virtual
void
setPosition
(
GPoint
&
p
)
{
if
(
v
){
v
->
Pos
.
X
=
p
.
x
();
v
->
Pos
.
Y
=
p
.
y
();
v
->
Pos
.
Z
=
p
.
z
();
}
if
(
mesh_vertices
.
size
()){
mesh_vertices
[
0
]
->
x
()
=
p
.
x
();
mesh_vertices
[
0
]
->
y
()
=
p
.
y
();
mesh_vertices
[
0
]
->
z
()
=
p
.
z
();
}
}
virtual
GeomType
geomType
()
const
;
ModelType
getNativeType
()
const
{
return
GmshModel
;
}
void
*
getNativePtr
()
const
{
return
v
;
}
...
...
This diff is collapsed.
Click to expand it.
Mesh/BoundaryLayer.cpp
+
5
−
9
View file @
5ce74bd2
// $Id: BoundaryLayer.cpp,v 1.
2
2007-0
3
-0
5 09:30:53
geuzaine Exp $
// $Id: BoundaryLayer.cpp,v 1.
3
2007-0
9
-0
3 12:00:28
geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -45,7 +45,7 @@ static void addExtrudeNormals(std::vector<T*> &elements)
}
}
}
int
MeshBoundaryLayerFaces
(
GModel
*
m
)
{
bool
haveBoundaryLayers
=
false
;
...
...
@@ -107,14 +107,10 @@ int MeshBoundaryLayerFaces(GModel *m)
for
(
GModel
::
viter
it
=
m
->
firstVertex
();
it
!=
m
->
lastVertex
();
it
++
){
GVertex
*
gv
=
*
it
;
if
(
gv
->
geomType
()
==
GEntity
::
BoundaryLayerPoint
){
double
x
=
gv
->
x
();
double
y
=
gv
->
y
();
double
z
=
gv
->
z
();
GPoint
p
=
gv
->
point
();
myep
->
Extrude
(
myep
->
mesh
.
NbLayer
-
1
,
myep
->
mesh
.
NbElmLayer
[
myep
->
mesh
.
NbLayer
-
1
],
x
,
y
,
z
);
gv
->
mesh_vertices
[
0
]
->
x
()
=
x
;
gv
->
mesh_vertices
[
0
]
->
y
()
=
y
;
gv
->
mesh_vertices
[
0
]
->
z
()
=
z
;
p
.
x
(),
p
.
y
(),
p
.
z
());
gv
->
setPosition
(
p
);
}
}
...
...
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