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
e82c2475
Commit
e82c2475
authored
14 years ago
by
Tristan Carrier Baudouin
Browse files
Options
Downloads
Patches
Plain Diff
lpcvt
parent
85984ab1
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Geo/GFaceCompound.h
+2
-0
2 additions, 0 deletions
Geo/GFaceCompound.h
Mesh/meshGFaceLloyd.cpp
+17
-2
17 additions, 2 deletions
Mesh/meshGFaceLloyd.cpp
Mesh/meshGFaceLloyd.h
+2
-0
2 additions, 0 deletions
Mesh/meshGFaceLloyd.h
with
21 additions
and
2 deletions
Geo/GFaceCompound.h
+
2
−
0
View file @
e82c2475
...
...
@@ -24,6 +24,8 @@
#endif
#define AR_MAX 5 //maximal geometrical aspect ratio
class
rbf
;
/*
A GFaceCompound is a model face that is the compound of model faces.
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshGFaceLloyd.cpp
+
17
−
2
View file @
e82c2475
...
...
@@ -402,7 +402,7 @@ void smoothing::optimize_model(){
for
(
it
=
model
->
firstFace
();
it
!=
model
->
lastFace
();
it
++
)
{
gf
=
*
it
;
if
(
gf
->
getNumMeshElements
()
>
0
){
if
(
gf
->
getNumMeshElements
()
>
0
&&
gf
->
geomType
()
==
GEntity
::
CompoundSurface
){
optimize_face
(
gf
);
recombineIntoQuads
(
gf
,
1
,
1
);
}
...
...
@@ -645,6 +645,9 @@ SPoint2 lpcvt::seed(DocRecord& triangulator,GFace* gf){
int
index2
;
double
x
,
y
;
SPoint2
x0
,
x1
,
x2
;
work_around
=
gf
;
for
(
i
=
0
;
i
<
triangulator
.
numPoints
;
i
++
){
if
(
interior
(
triangulator
,
gf
,
i
)){
num
=
triangulator
.
_adjacencies
[
i
].
t_length
;
...
...
@@ -1126,7 +1129,7 @@ double lpcvt::get_rho(SPoint2 point,int p){
x
=
point
.
x
();
y
=
point
.
y
();
h
=
backgroundMesh
::
current
()
->
operator
()(
x
,
y
,
0.0
);
//0.1;
h
=
backgroundMesh
::
current
()
->
operator
()(
x
,
y
,
0.0
)
*
ratio
(
point
)
;
//0.1;
if
(
h
>=
0.0
){
rho
=
pow_int
(
1.0
/
h
,
p
+
1
);
//integer only, theoric value : p+2
}
...
...
@@ -1220,6 +1223,18 @@ double lpcvt::drho_dy(SPoint2 point,int p){
return
val
;
}
double
lpcvt
::
ratio
(
SPoint2
point
){
double
val
;
double
uv
[
2
];
double
metric
[
3
];
uv
[
0
]
=
point
.
x
();
uv
[
1
]
=
point
.
y
();
buildMetric
(
work_around
,
uv
,
metric
);
val
=
1.0
/
pow
(
metric
[
0
]
*
metric
[
2
]
-
metric
[
1
]
*
metric
[
1
],
0.25
);
return
val
;
}
void
lpcvt
::
write
(
DocRecord
&
triangulator
,
GFace
*
gf
,
int
p
){
int
i
;
double
energy
;
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshGFaceLloyd.h
+
2
−
0
View file @
e82c2475
...
...
@@ -46,6 +46,7 @@ class lpcvt{
fullMatrix
<
double
>
gauss_weights
;
std
::
vector
<
metric
>
metrics
;
int
gauss_num
;
GFace
*
work_around
;
public
:
lpcvt
();
~
lpcvt
();
...
...
@@ -81,6 +82,7 @@ class lpcvt{
double
get_rho
(
SPoint2
,
int
);
double
drho_dx
(
SPoint2
,
int
);
double
drho_dy
(
SPoint2
,
int
);
double
ratio
(
SPoint2
);
void
write
(
DocRecord
&
,
GFace
*
,
int
);
void
eval
(
DocRecord
&
,
std
::
vector
<
SVector3
>&
,
double
&
,
int
);
void
swap
();
...
...
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