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
35666aa6
"README.txt" did not exist on "0a2ecdc46597e12d28dd42fc4784f04aa92eede5"
Commit
35666aa6
authored
18 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
1D transfinite mesh algo was completely broken. sigh.
parent
23f2c1fc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Mesh/meshGEdge.cpp
+25
-17
25 additions, 17 deletions
Mesh/meshGEdge.cpp
with
25 additions
and
17 deletions
Mesh/meshGEdge.cpp
+
25
−
17
View file @
35666aa6
// $Id: meshGEdge.cpp,v 1.3
3
2007-04-
16 11:46:27 remacl
e Exp $
// $Id: meshGEdge.cpp,v 1.3
4
2007-04-
21 22:26:51 geuzain
e Exp $
//
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -236,21 +236,22 @@ void meshGEdge::operator() (GEdge *ge)
...
@@ -236,21 +236,22 @@ void meshGEdge::operator() (GEdge *ge)
}
}
const
double
b
=
a
/
(
double
)(
N
-
1
);
const
double
b
=
a
/
(
double
)(
N
-
1
);
MVertex
*
v0
=
ge
->
getBeginVertex
()
->
mesh_vertices
[
0
];
MVertex
*
v0
=
ge
->
getBeginVertex
()
->
mesh_vertices
[
0
];
MVertex
*
v1
=
ge
->
getEndVertex
()
->
mesh_vertices
[
0
];
MVertex
*
v1
=
ge
->
getEndVertex
()
->
mesh_vertices
[
0
];
// if the curve is periodic and if the begin vertex is identical to the end vertex
// if the curve is periodic and if the begin vertex is identical to the end vertex
// and if this vertex has only one model curve adjacent to it, then the vertex is
// and if this vertex has only one model curve adjacent to it, then the vertex is
// not connecting any other curve. So, the mesh vertex and its associated geom vertex
// not connecting any other curve. So, the mesh vertex and its associated geom vertex
// are not necessary at the same location
// are not necessary at the same location
GPoint
beg_p
,
end_p
;
GPoint
beg_p
,
end_p
;
if
(
ge
->
getBeginVertex
()
==
ge
->
getEndVertex
()
&&
ge
->
getBeginVertex
()
->
edges
().
size
()
==
1
)
if
(
ge
->
getBeginVertex
()
==
ge
->
getEndVertex
()
&&
{
ge
->
getBeginVertex
()
->
edges
().
size
()
==
1
){
end_p
=
beg_p
=
ge
->
point
(
t_begin
);
end_p
=
beg_p
=
ge
->
point
(
t_begin
);
}
else
{
}
beg_p
=
GPoint
(
v0
->
x
(),
v0
->
y
(),
v0
->
z
());
else
{
end_p
=
GPoint
(
v1
->
x
(),
v1
->
y
(),
v1
->
z
());
beg_p
=
GPoint
(
v0
->
x
(),
v0
->
y
(),
v0
->
z
());
}
end_p
=
GPoint
(
v1
->
x
(),
v1
->
y
(),
v1
->
z
());
}
int
count
=
1
,
NUMP
=
1
,
NUMP2
=
1
;
int
count
=
1
,
NUMP
=
1
,
NUMP2
=
1
;
IntPoint
P1
,
P2
;
IntPoint
P1
,
P2
;
...
@@ -259,7 +260,7 @@ void meshGEdge::operator() (GEdge *ge)
...
@@ -259,7 +260,7 @@ void meshGEdge::operator() (GEdge *ge)
// classified on this mesh edge)
// classified on this mesh edge)
if
(
N
>
1
){
if
(
N
>
1
){
ge
->
mesh_vertices
.
resize
(
N
-
2
);
ge
->
mesh_vertices
.
resize
(
N
-
2
);
GPoint
last_p
=
beg_p
;
GPoint
last_p
=
beg_p
;
while
(
NUMP
<
N
-
1
)
{
while
(
NUMP
<
N
-
1
)
{
List_Read
(
Points
,
count
-
1
,
&
P1
);
List_Read
(
Points
,
count
-
1
,
&
P1
);
List_Read
(
Points
,
count
,
&
P2
);
List_Read
(
Points
,
count
,
&
P2
);
...
@@ -269,12 +270,19 @@ void meshGEdge::operator() (GEdge *ge)
...
@@ -269,12 +270,19 @@ void meshGEdge::operator() (GEdge *ge)
double
dp
=
P2
.
p
-
P1
.
p
;
double
dp
=
P2
.
p
-
P1
.
p
;
double
t
=
P1
.
t
+
dt
/
dp
*
(
d
-
P1
.
p
);
double
t
=
P1
.
t
+
dt
/
dp
*
(
d
-
P1
.
p
);
GPoint
V
=
ge
->
point
(
t
);
GPoint
V
=
ge
->
point
(
t
);
double
lc
=
BGM_MeshSize
(
ge
,
t
,
0
,
V
.
x
(),
V
.
y
(),
V
.
z
());
if
(
ge
->
meshAttributes
.
Method
==
TRANSFINI
){
if
(
GPointDist
(
V
,
last_p
)
>
0.7
*
lc
&&
!
(
NUMP
==
N
-
2
&&
GPointDist
(
V
,
end_p
)
<
0.7
*
lc
)){
ge
->
mesh_vertices
[
NUMP2
-
1
]
=
new
MEdgeVertex
(
V
.
x
(),
V
.
y
(),
V
.
z
(),
ge
,
t
);
last_p
=
V
;
NUMP2
++
;
ge
->
mesh_vertices
[
NUMP2
-
1
]
=
new
MEdgeVertex
(
V
.
x
(),
V
.
y
(),
V
.
z
(),
ge
,
t
);
}
NUMP2
++
;
else
{
}
double
lc
=
BGM_MeshSize
(
ge
,
t
,
0
,
V
.
x
(),
V
.
y
(),
V
.
z
());
if
(
GPointDist
(
V
,
last_p
)
>
0.7
*
lc
&&
!
(
NUMP
==
N
-
2
&&
GPointDist
(
V
,
end_p
)
<
0.7
*
lc
)){
last_p
=
V
;
ge
->
mesh_vertices
[
NUMP2
-
1
]
=
new
MEdgeVertex
(
V
.
x
(),
V
.
y
(),
V
.
z
(),
ge
,
t
);
NUMP2
++
;
}
}
NUMP
++
;
NUMP
++
;
}
}
else
{
else
{
...
...
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