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
f4a58880
Commit
f4a58880
authored
18 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
cleanup
parent
26238f06
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Geo/GModel.h
+1
-1
1 addition, 1 deletion
Geo/GModel.h
Geo/GeoInterpolation.cpp
+26
-25
26 additions, 25 deletions
Geo/GeoInterpolation.cpp
Mesh/BackgroundMesh.cpp
+2
-2
2 additions, 2 deletions
Mesh/BackgroundMesh.cpp
Mesh/meshGEdge.cpp
+7
-7
7 additions, 7 deletions
Mesh/meshGEdge.cpp
with
36 additions
and
35 deletions
Geo/GModel.h
+
1
−
1
View file @
f4a58880
...
...
@@ -101,7 +101,7 @@ class GModel
// loop over all vertices connected to elements and associate geo entity
void
associateEntityWithVertices
();
// Renumber all the mesh vertices in a continuous sequence
// Renumber all the
(used)
mesh vertices in a continuous sequence
int
renumberMeshVertices
(
bool
saveAll
);
// Deletes all invisble mesh elements
...
...
This diff is collapsed.
Click to expand it.
Geo/GeoInterpolation.cpp
+
26
−
25
View file @
f4a58880
// $Id: GeoInterpolation.cpp,v 1.2
5
2007-04-
16 09:08:27 remacl
e Exp $
// $Id: GeoInterpolation.cpp,v 1.2
6
2007-04-
22 08:46:04 geuzain
e Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -130,34 +130,35 @@ SPoint2 InterpolateCubicSpline(Vertex * v[4], double t, double mat[4][4],
}
// Uniform BSplines
Vertex
InterpolateUBS
(
Curve
*
Curve
,
double
u
,
int
derivee
)
{
int
NbControlPoints
,
NbCurves
,
iCurve
;
double
t
,
t1
,
t2
;
Vertex
InterpolateUBS
(
Curve
*
Curve
,
double
u
,
int
derivee
)
{
bool
periodic
=
(
Curve
->
end
==
Curve
->
beg
);
int
NbControlPoints
=
List_Nbr
(
Curve
->
Control_Points
);
int
NbCurves
=
NbControlPoints
+
(
periodic
?
-
1
:
1
);
int
iCurve
=
(
int
)
floor
(
u
*
(
double
)
NbCurves
);
if
(
iCurve
==
NbCurves
)
iCurve
-=
1
;
// u = 1
double
t1
=
(
double
)(
iCurve
)
/
(
double
)(
NbCurves
);
double
t2
=
(
double
)(
iCurve
+
1
)
/
(
double
)(
NbCurves
);
double
t
=
(
u
-
t1
)
/
(
t2
-
t1
);
Vertex
*
v
[
4
];
Vertex
V
;
bool
periodic
=
Curve
->
end
==
Curve
->
beg
;
NbControlPoints
=
List_Nbr
(
Curve
->
Control_Points
);
NbCurves
=
NbControlPoints
+
(
periodic
?
-
1
:+
1
)
;
iCurve
=
(
int
)
floor
(
u
*
(
double
)
NbCurves
);
if
(
iCurve
==
NbCurves
)
iCurve
-=
1
;
//u=1
t1
=
(
double
)(
iCurve
)
/
(
double
)(
NbCurves
);
t2
=
(
double
)(
iCurve
+
1
)
/
(
double
)(
NbCurves
);
t
=
(
u
-
t1
)
/
(
t2
-
t1
);
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
int
k
=
iCurve
-
(
periodic
?
1
:
2
)
+
i
;
if
(
k
<
0
)
k
=
periodic
?
k
+
NbControlPoints
-
1
:
0
;
if
(
k
>=
NbControlPoints
)
k
=
periodic
?
k
-
NbControlPoints
+
1
:
NbControlPoints
-
1
;
List_Read
(
Curve
->
Control_Points
,
k
,
&
v
[
i
]);
}
if
(
Curve
->
geometry
)
{
SPoint2
pp
=
InterpolateCubicSpline
(
v
,
t
,
Curve
->
mat
,
0
,
t1
,
t2
,
Curve
->
geometry
);
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
int
k
=
iCurve
-
(
periodic
?
1
:
2
)
+
i
;
if
(
k
<
0
)
k
=
periodic
?
k
+
NbControlPoints
-
1
:
0
;
if
(
k
>=
NbControlPoints
)
k
=
periodic
?
k
-
NbControlPoints
+
1
:
NbControlPoints
-
1
;
List_Read
(
Curve
->
Control_Points
,
k
,
&
v
[
i
]);
}
if
(
Curve
->
geometry
){
SPoint2
pp
=
InterpolateCubicSpline
(
v
,
t
,
Curve
->
mat
,
0
,
t1
,
t2
,
Curve
->
geometry
);
SPoint3
pt
=
Curve
->
geometry
->
point
(
pp
);
Vertex
V
;
V
.
Pos
.
X
=
pt
.
x
();
V
.
Pos
.
Y
=
pt
.
y
();
V
.
Pos
.
Z
=
pt
.
z
();
return
V
;
}
else
return
InterpolateCubicSpline
(
v
,
t
,
Curve
->
mat
,
0
,
t1
,
t2
);
}
else
return
InterpolateCubicSpline
(
v
,
t
,
Curve
->
mat
,
0
,
t1
,
t2
);
}
// Non Uniform BSplines
...
...
@@ -207,11 +208,11 @@ Vertex InterpolateNurbs(Curve * Curve, double u, int derivee)
{
static
double
Nb
[
1000
];
int
span
=
findSpan
(
u
,
Curve
->
degre
,
List_Nbr
(
Curve
->
Control_Points
),
Curve
->
k
);
Vertex
p
,
*
v
;
basisFuns
(
u
,
span
,
Curve
->
degre
,
Curve
->
k
,
Nb
);
Vertex
p
;
p
.
Pos
.
X
=
p
.
Pos
.
Y
=
p
.
Pos
.
Z
=
p
.
w
=
p
.
lc
=
0.0
;
for
(
int
i
=
Curve
->
degre
;
i
>=
0
;
--
i
)
{
Vertex
*
v
;
List_Read
(
Curve
->
Control_Points
,
span
-
Curve
->
degre
+
i
,
&
v
);
p
.
Pos
.
X
+=
Nb
[
i
]
*
v
->
Pos
.
X
;
p
.
Pos
.
Y
+=
Nb
[
i
]
*
v
->
Pos
.
Y
;
...
...
This diff is collapsed.
Click to expand it.
Mesh/BackgroundMesh.cpp
+
2
−
2
View file @
f4a58880
// $Id: BackgroundMesh.cpp,v 1.2
0
2007-04-2
1 19
:4
0
:0
0
geuzaine Exp $
// $Id: BackgroundMesh.cpp,v 1.2
1
2007-04-2
2 08
:4
6
:0
4
geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -131,7 +131,7 @@ double LC_MVertex_PNTS(GEntity *ge, double U, double V)
{
GVertex
*
gv
=
(
GVertex
*
)
ge
;
double
lc
=
gv
->
prescribedMeshSizeAtVertex
();
if
(
lc
>=
MAX_LC
)
{
return
CTX
.
lc
/
10.
;
}
if
(
lc
>=
MAX_LC
)
return
CTX
.
lc
/
10.
;
return
lc
;
}
case
1
:
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshGEdge.cpp
+
7
−
7
View file @
f4a58880
// $Id: meshGEdge.cpp,v 1.3
4
2007-04-2
1 22:26:51
geuzaine Exp $
// $Id: meshGEdge.cpp,v 1.3
5
2007-04-2
2 08:46:04
geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -189,11 +189,12 @@ void deMeshGEdge::operator() (GEdge *ge)
if
(
ge
->
meshRep
)
ge
->
meshRep
->
destroy
();
}
double
GPointDist
(
GPoint
&
p1
,
GPoint
&
p2
){
double
dx
=
p1
.
x
()
-
p2
.
x
();
double
dy
=
p1
.
y
()
-
p2
.
y
();
double
dz
=
p1
.
z
()
-
p2
.
z
();
return
sqrt
(
dx
*
dx
+
dy
*
dy
+
dz
*
dz
);
double
GPointDist
(
GPoint
&
p1
,
GPoint
&
p2
)
{
double
dx
=
p1
.
x
()
-
p2
.
x
();
double
dy
=
p1
.
y
()
-
p2
.
y
();
double
dz
=
p1
.
z
()
-
p2
.
z
();
return
sqrt
(
dx
*
dx
+
dy
*
dy
+
dz
*
dz
);
}
void
meshGEdge
::
operator
()
(
GEdge
*
ge
)
...
...
@@ -303,5 +304,4 @@ void meshGEdge::operator() (GEdge *ge)
v0
->
x
()
=
beg_p
.
x
();
v0
->
y
()
=
beg_p
.
y
();
v0
->
z
()
=
beg_p
.
z
();
}
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