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
ed024f9b
Commit
ed024f9b
authored
17 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
b8d179f9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Mesh/meshGEdge.cpp
+21
-21
21 additions, 21 deletions
Mesh/meshGEdge.cpp
with
21 additions
and
21 deletions
Mesh/meshGEdge.cpp
+
21
−
21
View file @
ed024f9b
// $Id: meshGEdge.cpp,v 1.5
7
2008-03-2
0 11:44:08
geuzaine Exp $
// $Id: meshGEdge.cpp,v 1.5
8
2008-03-2
1 22:22:49
geuzaine Exp $
//
//
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -31,15 +31,14 @@
...
@@ -31,15 +31,14 @@
extern
Context_T
CTX
;
extern
Context_T
CTX
;
typedef
struct
{
typedef
struct
{
int
Num
;
int
Num
;
double
t
,
lc
,
p
;
double
t
,
lc
,
p
;
}
IntPoint
;
}
IntPoint
;
struct
xi2lc
struct
xi2lc
{
{
double
xi
,
lc
;
double
xi
,
lc
;
xi2lc
(
const
double
&
_xi
,
const
double
_lc
)
xi2lc
(
const
double
&
_xi
,
const
double
_lc
)
:
xi
(
_xi
),
lc
(
_lc
)
:
xi
(
_xi
),
lc
(
_lc
)
{
{
}
}
...
@@ -282,7 +281,6 @@ void meshGEdge::operator() (GEdge *ge)
...
@@ -282,7 +281,6 @@ void meshGEdge::operator() (GEdge *ge)
if
(
ge
->
geomType
()
==
GEntity
::
DiscreteCurve
)
return
;
if
(
ge
->
geomType
()
==
GEntity
::
DiscreteCurve
)
return
;
if
(
ge
->
geomType
()
==
GEntity
::
BoundaryLayerCurve
)
return
;
if
(
ge
->
geomType
()
==
GEntity
::
BoundaryLayerCurve
)
return
;
deMeshGEdge
dem
;
deMeshGEdge
dem
;
dem
(
ge
);
dem
(
ge
);
...
@@ -299,22 +297,24 @@ void meshGEdge::operator() (GEdge *ge)
...
@@ -299,22 +297,24 @@ void meshGEdge::operator() (GEdge *ge)
double
t_end
=
bounds
.
high
();
double
t_end
=
bounds
.
high
();
// first compute the length of the curve by integrating one
// first compute the length of the curve by integrating one
SPoint3
p1
=
ge
->
model
()
->
bounds
().
min
();
SPoint3
p1
=
ge
->
model
()
->
bounds
().
min
();
SPoint3
p2
=
ge
->
model
()
->
bounds
().
max
();
SPoint3
p2
=
ge
->
model
()
->
bounds
().
max
();
double
length
=
Integration
(
ge
,
t_begin
,
t_end
,
F_One
,
Points
,
1.e-8
*
p1
.
distance
(
p2
));
double
length
=
Integration
(
ge
,
t_begin
,
t_end
,
F_One
,
Points
,
1.e-8
*
p1
.
distance
(
p2
));
ge
->
setLength
(
length
);
ge
->
setLength
(
length
);
// Send a messsage to the GMSH environment
if
(
length
==
0.0
)
Msg
(
DEBUG2
,
"Curve %d has a zero length"
,
ge
->
tag
());
if
(
length
==
0.0
)
Msg
(
DEBUG2
,
"Curve %d has a zero length"
,
ge
->
tag
());
List_Reset
(
Points
);
List_Reset
(
Points
);
// Integrate detJ/lc du
// Integrate detJ/lc du
double
a
;
double
a
;
int
N
;
int
N
;
if
(
ge
->
degenerate
(
0
)){
N
=
1
;
a
=
0.0
;}
if
(
ge
->
degenerate
(
0
)){
a
=
0.
;
N
=
1
;
}
else
if
(
ge
->
meshAttributes
.
Method
==
TRANSFINI
){
else
if
(
ge
->
meshAttributes
.
Method
==
TRANSFINI
){
a
=
Integration
(
ge
,
t_begin
,
t_end
,
F_Transfinite
,
Points
,
1.e-8
);
a
=
Integration
(
ge
,
t_begin
,
t_end
,
F_Transfinite
,
Points
,
1.e-8
);
N
=
ge
->
meshAttributes
.
nbPointsTransfinite
;
N
=
ge
->
meshAttributes
.
nbPointsTransfinite
;
...
@@ -324,9 +324,9 @@ void meshGEdge::operator() (GEdge *ge)
...
@@ -324,9 +324,9 @@ void meshGEdge::operator() (GEdge *ge)
Integration
(
ge
,
t_begin
,
t_end
,
F_Lc_usingInterpLcBis
,
lcPoints
,
Integration
(
ge
,
t_begin
,
t_end
,
F_Lc_usingInterpLcBis
,
lcPoints
,
CTX
.
mesh
.
lc_integration_precision
);
CTX
.
mesh
.
lc_integration_precision
);
buildInterpLc
(
lcPoints
);
buildInterpLc
(
lcPoints
);
//
printInterpLc("toto1.dat");
// printInterpLc("toto1.dat");
//
smoothInterpLc(20);
// smoothInterpLc(20);
//
printInterpLc("toto2.dat");
// printInterpLc("toto2.dat");
a
=
Integration
(
ge
,
t_begin
,
t_end
,
F_Lc_usingInterpLc
,
Points
,
1.e-8
);
a
=
Integration
(
ge
,
t_begin
,
t_end
,
F_Lc_usingInterpLc
,
Points
,
1.e-8
);
}
}
else
{
else
{
...
@@ -334,7 +334,7 @@ void meshGEdge::operator() (GEdge *ge)
...
@@ -334,7 +334,7 @@ void meshGEdge::operator() (GEdge *ge)
}
}
N
=
std
::
max
(
ge
->
minimumMeshSegments
()
+
1
,
(
int
)(
a
+
1.
));
N
=
std
::
max
(
ge
->
minimumMeshSegments
()
+
1
,
(
int
)(
a
+
1.
));
}
}
Msg
(
INFO
,
"Meshing curve %d (%s)"
,
ge
->
tag
(),
ge
->
getTypeString
().
c_str
());
Msg
(
INFO
,
"Meshing curve %d (%s)"
,
ge
->
tag
(),
ge
->
getTypeString
().
c_str
());
// if the curve is periodic and if the begin vertex is identical to
// if the curve is periodic and if the begin vertex is identical to
...
@@ -375,7 +375,7 @@ void meshGEdge::operator() (GEdge *ge)
...
@@ -375,7 +375,7 @@ void meshGEdge::operator() (GEdge *ge)
double
lc
=
d
/
(
P1
.
lc
+
dlc
/
dp
*
(
d
-
P1
.
p
));
double
lc
=
d
/
(
P1
.
lc
+
dlc
/
dp
*
(
d
-
P1
.
p
));
GPoint
V
=
ge
->
point
(
t
);
GPoint
V
=
ge
->
point
(
t
);
ge
->
mesh_vertices
[
NUMP
-
1
]
=
new
MEdgeVertex
(
V
.
x
(),
V
.
y
(),
V
.
z
(),
ge
,
t
,
lc
);
ge
->
mesh_vertices
[
NUMP
-
1
]
=
new
MEdgeVertex
(
V
.
x
(),
V
.
y
(),
V
.
z
(),
ge
,
t
,
lc
);
//
printf("lc = %12.5E %12.5E \n",lc,P1.lc,P2.lc);
// printf("lc = %12.5E %12.5E \n",lc,P1.lc,P2.lc);
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