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
3b10f62f
Commit
3b10f62f
authored
23 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
Generalized Boundary handling + nicer displacement maps
parent
74913f04
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Graphics/PostSimplex.cpp
+46
-51
46 additions, 51 deletions
Graphics/PostSimplex.cpp
doc/VERSIONS
+4
-1
4 additions, 1 deletion
doc/VERSIONS
with
50 additions
and
52 deletions
Graphics/PostSimplex.cpp
+
46
−
51
View file @
3b10f62f
// $Id: PostSimplex.cpp,v 1.2
1
2001-08-03
09:34:56
geuzaine Exp $
// $Id: PostSimplex.cpp,v 1.2
2
2001-08-03
17:46:48
geuzaine Exp $
#include
"Gmsh.h"
#include
"Gmsh.h"
#include
"GmshUI.h"
#include
"GmshUI.h"
...
@@ -24,6 +24,8 @@ void Draw_ScalarPoint(Post_View *View,
...
@@ -24,6 +24,8 @@ void Draw_ScalarPoint(Post_View *View,
d
=
V
[
View
->
TimeStep
];
d
=
V
[
View
->
TimeStep
];
RaiseFill
(
0
,
d
,
ValMin
,
Raise
);
RaiseFill
(
0
,
d
,
ValMin
,
Raise
);
if
(
View
->
Boundary
>
0
)
return
;
if
(
View
->
ShowElement
){
if
(
View
->
ShowElement
){
glColor4ubv
((
GLubyte
*
)
&
CTX
.
color
.
fg
);
glColor4ubv
((
GLubyte
*
)
&
CTX
.
color
.
fg
);
Draw_Point
(
X
,
Y
,
Z
,
View
->
Offset
,
Raise
);
Draw_Point
(
X
,
Y
,
Z
,
View
->
Offset
,
Raise
);
...
@@ -52,6 +54,14 @@ void Draw_ScalarLine(Post_View *View,
...
@@ -52,6 +54,14 @@ void Draw_ScalarLine(Post_View *View,
double
Xp
[
5
],
Yp
[
5
],
Zp
[
5
],
Val
[
5
],
value
[
5
],
thev
;
double
Xp
[
5
],
Yp
[
5
],
Zp
[
5
],
Val
[
5
],
value
[
5
],
thev
;
char
Num
[
100
]
;
char
Num
[
100
]
;
if
(
View
->
Boundary
>
0
){
View
->
Boundary
--
;
Draw_ScalarPoint
(
View
,
ValMin
,
ValMax
,
Raise
,
&
X
[
0
],
&
Y
[
0
],
&
Z
[
0
],
&
V
[
0
]);
//0
Draw_ScalarPoint
(
View
,
ValMin
,
ValMax
,
Raise
,
&
X
[
1
],
&
Y
[
1
],
&
Z
[
1
],
&
V
[
1
]);
//1
View
->
Boundary
++
;
return
;
}
double
*
vv
=
&
V
[
2
*
View
->
TimeStep
];
double
*
vv
=
&
V
[
2
*
View
->
TimeStep
];
if
(
View
->
SaturateValues
){
if
(
View
->
SaturateValues
){
for
(
i
=
0
;
i
<
2
;
i
++
){
for
(
i
=
0
;
i
<
2
;
i
++
){
...
@@ -149,6 +159,17 @@ void Draw_ScalarTriangle(Post_View *View, int preproNormals,
...
@@ -149,6 +159,17 @@ void Draw_ScalarTriangle(Post_View *View, int preproNormals,
double
Xp
[
5
],
Yp
[
5
],
Zp
[
5
],
Val
[
3
],
value
[
5
],
thev
;
double
Xp
[
5
],
Yp
[
5
],
Zp
[
5
],
Val
[
3
],
value
[
5
],
thev
;
char
Num
[
100
]
;
char
Num
[
100
]
;
if
(
!
preproNormals
&&
View
->
Boundary
>
0
){
View
->
Boundary
--
;
Draw_ScalarLine
(
View
,
ValMin
,
ValMax
,
Raise
,
&
X
[
0
],
&
Y
[
0
],
&
Z
[
0
],
&
V
[
0
]);
//01
Draw_ScalarLine
(
View
,
ValMin
,
ValMax
,
Raise
,
&
X
[
1
],
&
Y
[
1
],
&
Z
[
1
],
&
V
[
1
]);
//12
Xp
[
0
]
=
X
[
0
];
Yp
[
0
]
=
Y
[
0
];
Zp
[
0
]
=
Z
[
0
];
Val
[
0
]
=
V
[
0
];
Xp
[
1
]
=
X
[
2
];
Yp
[
1
]
=
Y
[
2
];
Zp
[
1
]
=
Z
[
2
];
Val
[
1
]
=
V
[
2
];
Draw_ScalarLine
(
View
,
ValMin
,
ValMax
,
Raise
,
Xp
,
Yp
,
Zp
,
Val
);
//02
View
->
Boundary
++
;
return
;
}
double
*
vv
=
&
V
[
3
*
View
->
TimeStep
];
double
*
vv
=
&
V
[
3
*
View
->
TimeStep
];
if
(
View
->
SaturateValues
){
if
(
View
->
SaturateValues
){
for
(
i
=
0
;
i
<
3
;
i
++
){
for
(
i
=
0
;
i
<
3
;
i
++
){
...
@@ -317,22 +338,17 @@ void Draw_ScalarTetrahedron(Post_View *View, int preproNormals,
...
@@ -317,22 +338,17 @@ void Draw_ScalarTetrahedron(Post_View *View, int preproNormals,
char
Num
[
100
];
char
Num
[
100
];
double
Val
[
4
];
double
Val
[
4
];
if
(
!
preproNormals
&&
View
->
Boundary
==
2
){
if
(
!
preproNormals
&&
View
->
Boundary
>
0
){
// boundary == 0 should draw the tet
View
->
Boundary
--
;
// boundary == 1 should draw the faces
Draw_ScalarTriangle
(
View
,
0
,
ValMin
,
ValMax
,
Raise
,
&
X
[
0
],
&
Y
[
0
],
&
Z
[
0
],
&
V
[
0
]);
//012
// boundary == 2 should draw the edges
Draw_ScalarTriangle
(
View
,
0
,
ValMin
,
ValMax
,
Raise
,
&
X
[
1
],
&
Y
[
1
],
&
Z
[
1
],
&
V
[
1
]);
//123
// boundary == 3 should draw the vertices
Draw_ScalarLine
(
View
,
ValMin
,
ValMax
,
Raise
,
&
X
[
0
],
&
Y
[
0
],
&
Z
[
0
],
&
V
[
0
]);
//01
Draw_ScalarLine
(
View
,
ValMin
,
ValMax
,
Raise
,
&
X
[
1
],
&
Y
[
1
],
&
Z
[
1
],
&
V
[
1
]);
//12
Draw_ScalarLine
(
View
,
ValMin
,
ValMax
,
Raise
,
&
X
[
2
],
&
Y
[
2
],
&
Z
[
2
],
&
V
[
2
]);
//23
// beeek...
xx
[
0
]
=
X
[
0
];
yy
[
0
]
=
Y
[
0
];
zz
[
0
]
=
Z
[
0
];
Val
[
0
]
=
V
[
0
];
xx
[
0
]
=
X
[
0
];
yy
[
0
]
=
Y
[
0
];
zz
[
0
]
=
Z
[
0
];
Val
[
0
]
=
V
[
0
];
xx
[
1
]
=
X
[
1
];
yy
[
1
]
=
Y
[
1
];
zz
[
1
]
=
Z
[
1
];
Val
[
1
]
=
V
[
1
];
xx
[
2
]
=
X
[
3
];
yy
[
2
]
=
Y
[
3
];
zz
[
2
]
=
Z
[
3
];
Val
[
2
]
=
V
[
3
];
Draw_ScalarTriangle
(
View
,
0
,
ValMin
,
ValMax
,
Raise
,
xx
,
yy
,
zz
,
Val
);
//013
xx
[
1
]
=
X
[
2
];
yy
[
1
]
=
Y
[
2
];
zz
[
1
]
=
Z
[
2
];
Val
[
1
]
=
V
[
2
];
xx
[
1
]
=
X
[
2
];
yy
[
1
]
=
Y
[
2
];
zz
[
1
]
=
Z
[
2
];
Val
[
1
]
=
V
[
2
];
Draw_ScalarLine
(
View
,
ValMin
,
ValMax
,
Raise
,
xx
,
yy
,
zz
,
Val
);
//02
Draw_ScalarTriangle
(
View
,
0
,
ValMin
,
ValMax
,
Raise
,
xx
,
yy
,
zz
,
Val
);
//023
xx
[
1
]
=
X
[
3
];
yy
[
1
]
=
Y
[
3
];
zz
[
1
]
=
Z
[
3
];
Val
[
1
]
=
V
[
3
];
View
->
Boundary
++
;
Draw_ScalarLine
(
View
,
ValMin
,
ValMax
,
Raise
,
xx
,
yy
,
zz
,
Val
);
//03
xx
[
0
]
=
X
[
1
];
yy
[
0
]
=
Y
[
1
];
zz
[
0
]
=
Z
[
1
];
Val
[
0
]
=
V
[
1
];
Draw_ScalarLine
(
View
,
ValMin
,
ValMax
,
Raise
,
xx
,
yy
,
zz
,
Val
);
//13
return
;
return
;
}
}
...
@@ -408,7 +424,7 @@ void Draw_VectorSimplex(int nbnod, Post_View *View,
...
@@ -408,7 +424,7 @@ void Draw_VectorSimplex(int nbnod, Post_View *View,
double
ValMin
,
double
ValMax
,
double
Raise
[
3
][
5
],
double
ValMin
,
double
ValMax
,
double
Raise
[
3
][
5
],
double
*
X
,
double
*
Y
,
double
*
Z
,
double
*
V
){
double
*
X
,
double
*
Y
,
double
*
Z
,
double
*
V
){
int
j
,
k
;
int
j
,
k
;
double
d
,
dx
,
dy
,
dz
,
fact
,
xx
[
4
],
yy
[
4
],
zz
[
4
],
xc
=
0.
,
yc
=
0.
,
zc
=
0.
;
double
d
,
dx
,
dy
,
dz
,
fact
,
xx
[
4
],
yy
[
4
],
zz
[
4
],
vv
[
4
],
xc
=
0.
,
yc
=
0.
,
zc
=
0.
;
char
Num
[
100
];
char
Num
[
100
];
for
(
k
=
0
;
k
<
nbnod
;
k
++
){
for
(
k
=
0
;
k
<
nbnod
;
k
++
){
...
@@ -431,8 +447,7 @@ void Draw_VectorSimplex(int nbnod, Post_View *View,
...
@@ -431,8 +447,7 @@ void Draw_VectorSimplex(int nbnod, Post_View *View,
Raise
[
2
][
k
]
+
View
->
Offset
[
2
];
Raise
[
2
][
k
]
+
View
->
Offset
[
2
];
}
}
switch
(
nbnod
){
if
(
nbnod
==
1
){
//draw trajectories
case
1
:
glColor4ubv
((
GLubyte
*
)
&
CTX
.
color
.
fg
);
glColor4ubv
((
GLubyte
*
)
&
CTX
.
color
.
fg
);
glBegin
(
GL_POINTS
);
glBegin
(
GL_POINTS
);
glVertex3d
(
xx
[
0
],
yy
[
0
],
zz
[
0
]);
glVertex3d
(
xx
[
0
],
yy
[
0
],
zz
[
0
]);
...
@@ -445,41 +460,21 @@ void Draw_VectorSimplex(int nbnod, Post_View *View,
...
@@ -445,41 +460,21 @@ void Draw_VectorSimplex(int nbnod, Post_View *View,
Z
[
0
]
+
fact
*
V
[
3
*
(
View
->
TimeStep
-
j
)
+
2
]
+
Raise
[
2
][
0
]
+
View
->
Offset
[
2
]);
Z
[
0
]
+
fact
*
V
[
3
*
(
View
->
TimeStep
-
j
)
+
2
]
+
Raise
[
2
][
0
]
+
View
->
Offset
[
2
]);
glEnd
();
glEnd
();
}
}
break
;
}
case
2
:
else
{
glColor4ubv
((
GLubyte
*
)
&
CTX
.
color
.
fg
);
for
(
k
=
0
;
k
<
nbnod
;
k
++
){
glBegin
(
GL_LINES
);
dx
=
V
[
3
*
nbnod
*
View
->
TimeStep
+
3
*
k
]
;
glVertex3d
(
xx
[
0
],
yy
[
0
],
zz
[
0
]);
dy
=
V
[
3
*
nbnod
*
View
->
TimeStep
+
1
+
3
*
k
]
;
glVertex3d
(
xx
[
1
],
yy
[
1
],
zz
[
1
]);
dz
=
V
[
3
*
nbnod
*
View
->
TimeStep
+
2
+
3
*
k
]
;
glEnd
();
vv
[
k
]
=
sqrt
(
dx
*
dx
+
dy
*
dy
+
dz
*
dz
);
break
;
}
case
3
:
switch
(
nbnod
){
if
(
View
->
IntervalsType
!=
DRAW_POST_ISO
){
case
2
:
Draw_ScalarLine
(
View
,
ValMin
,
ValMax
,
Raise
,
xx
,
yy
,
zz
,
vv
);
break
;
glColor4ubv
((
GLubyte
*
)
&
CTX
.
color
.
bg
);
case
3
:
Draw_ScalarTriangle
(
View
,
0
,
ValMin
,
ValMax
,
Raise
,
xx
,
yy
,
zz
,
vv
);
break
;
glBegin
(
GL_TRIANGLES
);
case
4
:
Draw_ScalarTetrahedron
(
View
,
0
,
ValMin
,
ValMax
,
Raise
,
xx
,
yy
,
zz
,
vv
);
break
;
glVertex3d
(
xx
[
0
],
yy
[
0
],
zz
[
0
]);
glVertex3d
(
xx
[
1
],
yy
[
1
],
zz
[
1
]);
glVertex3d
(
xx
[
2
],
yy
[
2
],
zz
[
2
]);
glEnd
();
}
}
glColor4ubv
((
GLubyte
*
)
&
CTX
.
color
.
fg
);
glBegin
(
GL_LINE_LOOP
);
for
(
k
=
0
;
k
<
3
;
k
++
)
glVertex3d
(
xx
[
k
],
yy
[
k
],
zz
[
k
]);
glEnd
();
break
;
case
4
:
glColor4ubv
((
GLubyte
*
)
&
CTX
.
color
.
fg
);
glBegin
(
GL_LINES
);
glVertex3d
(
xx
[
0
],
yy
[
0
],
zz
[
0
]);
glVertex3d
(
xx
[
1
],
yy
[
1
],
zz
[
1
]);
glVertex3d
(
xx
[
0
],
yy
[
0
],
zz
[
0
]);
glVertex3d
(
xx
[
2
],
yy
[
2
],
zz
[
2
]);
glVertex3d
(
xx
[
0
],
yy
[
0
],
zz
[
0
]);
glVertex3d
(
xx
[
3
],
yy
[
3
],
zz
[
3
]);
glVertex3d
(
xx
[
1
],
yy
[
1
],
zz
[
1
]);
glVertex3d
(
xx
[
2
],
yy
[
2
],
zz
[
2
]);
glVertex3d
(
xx
[
1
],
yy
[
1
],
zz
[
1
]);
glVertex3d
(
xx
[
3
],
yy
[
3
],
zz
[
3
]);
glVertex3d
(
xx
[
2
],
yy
[
2
],
zz
[
2
]);
glVertex3d
(
xx
[
3
],
yy
[
3
],
zz
[
3
]);
glEnd
();
break
;
}
}
return
;
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
doc/VERSIONS
+
4
−
1
View file @
3b10f62f
$Id: VERSIONS,v 1.44 2001-08-01 09:31:57 geuzaine Exp $
$Id: VERSIONS,v 1.45 2001-08-03 17:46:48 geuzaine Exp $
New in 1.23: Better display of displacement maps and enhanced boundary
operator;
New in 1.22: Fixed (yet another) bug for 2D mesh in the mean plane;
New in 1.22: Fixed (yet another) bug for 2D mesh in the mean plane;
fixed surface coherence bug in extruded meshes; new double logarithmic
fixed surface coherence bug in extruded meshes; new double logarithmic
...
...
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