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
0bc9114c
Commit
0bc9114c
authored
17 years ago
by
Akash Anand
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
92b12811
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
contrib/FourierModel/FM_Edge.h
+1
-1
1 addition, 1 deletion
contrib/FourierModel/FM_Edge.h
contrib/FourierModel/FM_Face.cpp
+10
-9
10 additions, 9 deletions
contrib/FourierModel/FM_Face.cpp
with
11 additions
and
10 deletions
contrib/FourierModel/FM_Edge.h
+
1
−
1
View file @
0bc9114c
...
...
@@ -34,7 +34,7 @@ class FM_Edge {
if
(
_curve
)
return
true
;
else
false
;
return
false
;
}
void
F
(
double
t
,
double
&
x
,
double
&
y
,
double
&
z
);
...
...
This diff is collapsed.
Click to expand it.
contrib/FourierModel/FM_Face.cpp
+
10
−
9
View file @
0bc9114c
...
...
@@ -2,17 +2,15 @@
#include
"Message.h"
void
FM_Face
::
F
(
double
u
,
double
v
,
double
&
x
,
double
&
y
,
double
&
z
)
{
if
(
_edge
.
size
()
==
4
)
{
_patch
->
F
(
u
,
v
,
x
,
y
,
z
);
}
else
if
(
_edge
.
size
()
==
1
)
{
// sanity check
if
(
_edge
.
size
()
==
1
)
{
double
U
=
sqrt
((
2
*
u
-
1
)
*
(
2
*
u
-
1
)
+
(
2
*
v
-
1
)
*
(
2
*
v
-
1
));
double
V
=
0.5
*
(
atan2
(
2
*
v
-
1
,
2
*
u
-
1
)
/
M_PI
+
1.
);
double
cx
,
cy
,
cz
;
_patch
->
F
(
0.
,
0.
,
cx
,
cy
,
cz
);
double
px
,
py
,
pz
;
_edge
[
0
]
->
F
(
v
,
px
,
py
,
pz
);
_edge
[
0
]
->
F
(
V
,
px
,
py
,
pz
);
double
R
=
sqrt
((
px
-
cx
)
*
(
px
-
cx
)
+
(
py
-
cy
)
*
(
py
-
cy
)
+
(
pz
-
cz
)
*
(
pz
-
cz
));
_patch
->
F
(
u
*
R
,
v
,
x
,
y
,
z
);
_patch
->
F
(
U
*
R
,
V
,
x
,
y
,
z
);
}
else
if
(
_edge
.
size
()
==
4
)
{
bool
isPhysical
=
(
_edge
[
0
]
->
IsPhysical
())
&&
(
_edge
[
1
]
->
IsPhysical
())
&&
...
...
@@ -65,12 +63,15 @@ bool FM_Face::Inverse(double x,double y,double z,double &u, double &v)
xx
+=
r
[
i
]
*
t
[
i
];
yy
+=
r
[
i
]
*
s
[
i
];
}
v
=
atan2
(
yy
,
xx
)
/
(
2.
*
M_PI
)
+
0.5
;
double
U
,
V
;
V
=
atan2
(
yy
,
xx
)
/
(
2.
*
M_PI
)
+
0.5
;
double
px
,
py
,
pz
;
_edge
[
0
]
->
F
(
v
,
px
,
py
,
pz
);
double
R
=
sqrt
((
px
-
c
[
0
])
*
(
px
-
c
[
0
])
+
(
py
-
c
[
1
])
*
(
py
-
c
[
1
])
+
(
pz
-
c
[
2
])
*
(
pz
-
c
[
2
]));
u
=
norm
/
R
;
U
=
norm
/
R
;
u
=
0.5
*
(
1
+
U
*
cos
(
2
*
M_PI
*
(
v
-
0.5
)));
v
=
0.5
*
(
1
+
U
*
cos
(
2
*
M_PI
*
(
v
-
0.5
)));
}
else
if
(
_edge
.
size
()
==
4
)
{
bool
isPhysical
=
(
_edge
[
0
]
->
IsPhysical
())
&&
(
_edge
[
1
]
->
IsPhysical
())
&&
...
...
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