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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
e8d8852b
Commit
e8d8852b
authored
Apr 12, 2007
by
Jean-François Remacle
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
8935c92e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Mesh/BDS.cpp
+64
-1
64 additions, 1 deletion
Mesh/BDS.cpp
Mesh/BDS.h
+1
-0
1 addition, 0 deletions
Mesh/BDS.h
Mesh/meshGFace.cpp
+3
-3
3 additions, 3 deletions
Mesh/meshGFace.cpp
with
68 additions
and
4 deletions
Mesh/BDS.cpp
+
64
−
1
View file @
e8d8852b
// $Id: BDS.cpp,v 1.7
4
2007-0
3
-1
8
1
2:49:30 geuzain
e Exp $
// $Id: BDS.cpp,v 1.7
5
2007-0
4
-1
2
1
3:09:09 remacl
e Exp $
//
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -1010,6 +1010,69 @@ bool test_move_point_parametric_triangle (BDS_Point * p, double u, double v, BDS
...
@@ -1010,6 +1010,69 @@ bool test_move_point_parametric_triangle (BDS_Point * p, double u, double v, BDS
return
ori_init
*
ori_final
>
0
;
return
ori_init
*
ori_final
>
0
;
}
}
bool
BDS_Mesh
::
smooth_point_centroid
(
BDS_Point
*
p
,
GFace
*
gf
)
{
if
(
!
p
->
config_modified
)
return
false
;
if
(
p
->
g
&&
p
->
g
->
classif_degree
<=
1
)
return
false
;
std
::
list
<
BDS_Edge
*
>::
iterator
eit
=
p
->
edges
.
begin
();
while
(
eit
!=
p
->
edges
.
end
())
{
if
((
*
eit
)
->
numfaces
()
==
1
)
return
false
;
eit
++
;
}
double
U
=
0
;
double
V
=
0
;
double
LC
=
0
;
std
::
list
<
BDS_Face
*
>
ts
;
p
->
getTriangles
(
ts
);
std
::
list
<
BDS_Face
*
>::
iterator
it
=
ts
.
begin
();
std
::
list
<
BDS_Face
*
>::
iterator
ite
=
ts
.
end
();
double
sTot
=
0
;
while
(
it
!=
ite
)
{
BDS_Face
*
t
=
*
it
;
BDS_Point
*
n
[
4
];
t
->
getNodes
(
n
);
double
S
=
fabs
(
surface_triangle
(
n
[
0
],
n
[
1
],
n
[
2
]));
S
=
1
;
sTot
+=
S
;
U
+=
(
n
[
0
]
->
u
+
n
[
1
]
->
u
+
n
[
2
]
->
u
)
*
S
;
V
+=
(
n
[
0
]
->
v
+
n
[
1
]
->
v
+
n
[
2
]
->
v
)
*
S
;
LC
+=
(
n
[
0
]
->
lc
()
+
n
[
1
]
->
lc
()
+
n
[
2
]
->
lc
())
*
S
;
++
it
;
}
U
/=
(
3.
*
sTot
);
V
/=
(
3.
*
sTot
);
LC
/=
(
3.
*
sTot
);
it
=
ts
.
begin
();
while
(
it
!=
ite
)
{
BDS_Face
*
t
=
*
it
;
if
(
!
test_move_point_parametric_triangle
(
p
,
U
,
V
,
t
))
return
false
;
++
it
;
}
GPoint
gp
=
gf
->
point
(
U
*
scalingU
,
V
*
scalingV
);
p
->
u
=
U
;
p
->
v
=
V
;
p
->
lc
()
=
LC
;
p
->
X
=
gp
.
x
();
p
->
Y
=
gp
.
y
();
p
->
Z
=
gp
.
z
();
eit
=
p
->
edges
.
begin
();
while
(
eit
!=
p
->
edges
.
end
())
{
(
*
eit
)
->
update
();
++
eit
;
}
return
true
;
}
bool
BDS_Mesh
::
smooth_point_parametric
(
BDS_Point
*
p
,
GFace
*
gf
)
bool
BDS_Mesh
::
smooth_point_parametric
(
BDS_Point
*
p
,
GFace
*
gf
)
{
{
...
...
...
...
This diff is collapsed.
Click to expand it.
Mesh/BDS.h
+
1
−
0
View file @
e8d8852b
...
@@ -424,6 +424,7 @@ public:
...
@@ -424,6 +424,7 @@ public:
void
snap_point
(
BDS_Point
*
,
BDS_Mesh
*
geom
=
0
);
void
snap_point
(
BDS_Point
*
,
BDS_Mesh
*
geom
=
0
);
bool
smooth_point
(
BDS_Point
*
,
BDS_Mesh
*
geom
=
0
);
bool
smooth_point
(
BDS_Point
*
,
BDS_Mesh
*
geom
=
0
);
bool
smooth_point_parametric
(
BDS_Point
*
p
,
GFace
*
gf
);
bool
smooth_point_parametric
(
BDS_Point
*
p
,
GFace
*
gf
);
bool
smooth_point_centroid
(
BDS_Point
*
p
,
GFace
*
gf
);
bool
move_point
(
BDS_Point
*
p
,
double
X
,
double
Y
,
double
Z
);
bool
move_point
(
BDS_Point
*
p
,
double
X
,
double
Y
,
double
Z
);
void
split_edge
(
BDS_Edge
*
,
BDS_Point
*
);
void
split_edge
(
BDS_Edge
*
,
BDS_Point
*
);
bool
edge_constraint
(
BDS_Point
*
p1
,
BDS_Point
*
p2
);
bool
edge_constraint
(
BDS_Point
*
p1
,
BDS_Point
*
p2
);
...
...
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshGFace.cpp
+
3
−
3
View file @
e8d8852b
// $Id: meshGFace.cpp,v 1.7
0
2007-04-12
08:47:2
5 remacle Exp $
// $Id: meshGFace.cpp,v 1.7
1
2007-04-12
13:13:5
5 remacle Exp $
//
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -266,7 +266,7 @@ void OptimizeMesh(GFace *gf, BDS_Mesh &m, const int NIT)
...
@@ -266,7 +266,7 @@ void OptimizeMesh(GFace *gf, BDS_Mesh &m, const int NIT)
if
(
m
.
collapse_edge_parametric
(
(
*
ite
),
(
*
itp
)))
break
;
if
(
m
.
collapse_edge_parametric
(
(
*
ite
),
(
*
itp
)))
break
;
}
}
else
else
m
.
smooth_point_
parametric
(
*
itp
,
gf
);
m
.
smooth_point_
centroid
(
*
itp
,
gf
);
++
itp
;
++
itp
;
}
}
}
}
...
@@ -487,7 +487,7 @@ void RefineMesh ( GFace *gf, BDS_Mesh &m , const int NIT)
...
@@ -487,7 +487,7 @@ void RefineMesh ( GFace *gf, BDS_Mesh &m , const int NIT)
while
(
itp
!=
m
.
points
.
end
())
while
(
itp
!=
m
.
points
.
end
())
{
{
if
(
m
.
smooth_point_
parametric
(
*
itp
,
gf
))
if
(
m
.
smooth_point_
centroid
(
*
itp
,
gf
))
nb_smooth
++
;
nb_smooth
++
;
++
itp
;
++
itp
;
}
}
...
...
...
...
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