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
e6865e83
Commit
e6865e83
authored
21 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
acos->myacos
parent
424c584d
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
Graphics/Entity.cpp
+3
-4
3 additions, 4 deletions
Graphics/Entity.cpp
Mesh/Utils.cpp
+2
-2
2 additions, 2 deletions
Mesh/Utils.cpp
Numeric/Numeric.cpp
+11
-1
11 additions, 1 deletion
Numeric/Numeric.cpp
Numeric/Numeric.h
+13
-13
13 additions, 13 deletions
Numeric/Numeric.h
with
29 additions
and
20 deletions
Graphics/Entity.cpp
+
3
−
4
View file @
e6865e83
// $Id: Entity.cpp,v 1.3
2
2004-0
3-01 23:43:53
geuzaine Exp $
// $Id: Entity.cpp,v 1.3
3
2004-0
4-13 18:47:32
geuzaine Exp $
//
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -88,8 +88,7 @@ void Draw_Cylinder(double width, double *x, double *y, double *z, int light)
prodve
(
zdir
,
vdir
,
axis
);
norme
(
axis
);
prosca
(
zdir
,
vdir
,
&
cosphi
);
phi
=
180.
*
acos
(
cosphi
)
/
M_PI
;
phi
=
180.
*
myacos
(
cosphi
)
/
M_PI
;
glTranslatef
(
x
[
0
],
y
[
0
],
z
[
0
]);
glRotatef
(
phi
,
axis
[
0
],
axis
[
1
],
axis
[
2
]);
gluCylinder
(
qua
,
radius
,
radius
,
length
,
CTX
.
quadric_subdivisions
,
1
);
...
...
@@ -352,7 +351,7 @@ void Draw_3DArrow(double relHeadRadius, double relStemLength, double relStemRadi
prodve
(
zdir
,
vdir
,
axis
);
norme
(
axis
);
prosca
(
zdir
,
vdir
,
&
cosphi
);
phi
=
180.
*
acos
(
cosphi
)
/
M_PI
;
phi
=
180.
*
my
acos
(
cosphi
)
/
M_PI
;
glTranslatef
(
x
,
y
,
z
);
glRotatef
(
phi
,
axis
[
0
],
axis
[
1
],
axis
[
2
]);
...
...
This diff is collapsed.
Click to expand it.
Mesh/Utils.cpp
+
2
−
2
View file @
e6865e83
// $Id: Utils.cpp,v 1.2
3
2004-0
3-28 01:16
:5
0
geuzaine Exp $
// $Id: Utils.cpp,v 1.2
4
2004-0
4-13 18:49
:5
8
geuzaine Exp $
//
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -615,7 +615,7 @@ double angle_3pts(Vertex * a, Vertex * b, Vertex * c)
prosca
=
((
a
->
Pos
.
X
-
b
->
Pos
.
X
)
*
(
c
->
Pos
.
X
-
b
->
Pos
.
X
)
+
(
a
->
Pos
.
Y
-
b
->
Pos
.
Y
)
*
(
c
->
Pos
.
Y
-
b
->
Pos
.
Y
))
/
L
;
angle
=
acos
(
prosca
)
*
180.
/
Pi
;
angle
=
my
acos
(
prosca
)
*
180.
/
Pi
;
return
(
angle
);
}
...
...
This diff is collapsed.
Click to expand it.
Numeric/Numeric.cpp
+
11
−
1
View file @
e6865e83
// $Id: Numeric.cpp,v 1.1
1
2004-0
2-07 01:40:2
2 geuzaine Exp $
// $Id: Numeric.cpp,v 1.1
2
2004-0
4-13 18:47:3
2 geuzaine Exp $
//
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -84,6 +84,16 @@ double myasin(double a)
return
asin
(
a
);
}
double
myacos
(
double
a
)
{
if
(
a
<=
-
1.
)
return
Pi
;
else
if
(
a
>=
1.
)
return
0.
;
else
return
acos
(
a
);
}
void
prodve
(
double
a
[
3
],
double
b
[
3
],
double
c
[
3
])
{
c
[
2
]
=
a
[
0
]
*
b
[
1
]
-
a
[
1
]
*
b
[
0
];
...
...
This diff is collapsed.
Click to expand it.
Numeric/Numeric.h
+
13
−
13
View file @
e6865e83
...
...
@@ -56,23 +56,23 @@
int
check_gsl
();
double
myatan2
(
double
a
,
double
b
);
double
myasin
(
double
a
);
void
prodve
(
double
a
[
3
],
double
b
[
3
],
double
c
[
3
]);
void
prosca
(
double
a
[
3
],
double
b
[
3
],
double
*
c
);
void
norme
(
double
a
[
3
]);
int
sys2x2
(
double
mat
[
2
][
2
],
double
b
[
2
],
double
res
[
2
]);
int
sys3x3
(
double
mat
[
3
][
3
],
double
b
[
3
],
double
res
[
3
],
double
*
det
);
int
sys3x3_with_tol
(
double
mat
[
3
][
3
],
double
b
[
3
],
double
res
[
3
],
double
*
det
);
int
det3x3
(
double
mat
[
3
][
3
],
double
*
det
);
int
inv3x3
(
double
mat
[
3
][
3
],
double
inv
[
3
][
3
],
double
*
det
);
double
angle_02pi
(
double
A3
);
double
myatan2
(
double
a
,
double
b
);
double
myasin
(
double
a
);
double
myacos
(
double
a
);
void
prodve
(
double
a
[
3
],
double
b
[
3
],
double
c
[
3
]);
void
prosca
(
double
a
[
3
],
double
b
[
3
],
double
*
c
);
void
norme
(
double
a
[
3
]);
int
sys2x2
(
double
mat
[
2
][
2
],
double
b
[
2
],
double
res
[
2
]);
int
sys3x3
(
double
mat
[
3
][
3
],
double
b
[
3
],
double
res
[
3
],
double
*
det
);
int
sys3x3_with_tol
(
double
mat
[
3
][
3
],
double
b
[
3
],
double
res
[
3
],
double
*
det
);
int
det3x3
(
double
mat
[
3
][
3
],
double
*
det
);
int
inv3x3
(
double
mat
[
3
][
3
],
double
inv
[
3
][
3
],
double
*
det
);
double
angle_02pi
(
double
A3
);
double
InterpolateIso
(
double
*
X
,
double
*
Y
,
double
*
Z
,
double
*
Val
,
double
V
,
int
I1
,
int
I2
,
double
*
XI
,
double
*
YI
,
double
*
ZI
);
void
gradSimplex
(
double
*
x
,
double
*
y
,
double
*
z
,
double
*
v
,
double
*
grad
);
void
gradSimplex
(
double
*
x
,
double
*
y
,
double
*
z
,
double
*
v
,
double
*
grad
);
/* Numerical routines implemented using either Numerical Recipes or
the GSL */
...
...
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