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
0d91d692
Commit
0d91d692
authored
11 years ago
by
Jean-François Remacle
Browse files
Options
Downloads
Patches
Plain Diff
useless files
parent
90f4115f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Geo/CMakeLists.txt
+1
-1
1 addition, 1 deletion
Geo/CMakeLists.txt
Geo/gmshCurve.cpp
+0
-70
0 additions, 70 deletions
Geo/gmshCurve.cpp
Geo/gmshCurve.h
+0
-31
0 additions, 31 deletions
Geo/gmshCurve.h
with
1 addition
and
102 deletions
Geo/CMakeLists.txt
+
1
−
1
View file @
0d91d692
...
@@ -11,7 +11,7 @@ set(SRC
...
@@ -11,7 +11,7 @@ set(SRC
GEdgeLoop.cpp GEdgeCompound.cpp GFaceCompound.cpp
GEdgeLoop.cpp GEdgeCompound.cpp GFaceCompound.cpp
GRegionCompound.cpp GRbf.cpp
GRegionCompound.cpp GRbf.cpp
gmshVertex.cpp gmshEdge.cpp gmshFace.cpp gmshRegion.cpp
gmshVertex.cpp gmshEdge.cpp gmshFace.cpp gmshRegion.cpp
gmshCurve.cpp
gmshSurface.cpp
gmshSurface.cpp
OCCVertex.cpp OCCEdge.cpp OCCFace.cpp OCCRegion.cpp
OCCVertex.cpp OCCEdge.cpp OCCFace.cpp OCCRegion.cpp
discreteEdge.cpp discreteFace.cpp discreteRegion.cpp
discreteEdge.cpp discreteFace.cpp discreteRegion.cpp
fourierEdge.cpp fourierFace.cpp fourierProjectionFace.cpp
fourierEdge.cpp fourierFace.cpp fourierProjectionFace.cpp
...
...
This diff is collapsed.
Click to expand it.
Geo/gmshCurve.cpp
deleted
100644 → 0
+
0
−
70
View file @
90f4115f
#include
"gmshCurve.h"
#include
"Geo.h"
#include
"GeoInterpolation.h"
SVector3
gmshCurve
::
curvature
(
double
t
)
const
{
SVector3
dx
=
firstDer
(
t
);
SVector3
dxx
=
secondDer
(
t
);
double
normdx
=
dx
.
norm
();
double
oneovernormdx
=
1.
/
normdx
;
double
oneovernormdx3
=
oneovernormdx
*
oneovernormdx
*
oneovernormdx
;
SVector3
c
=
(
dxx
*
normdx
-
dx
*
(
dot
(
dx
,
dxx
)
*
oneovernormdx
))
*
oneovernormdx3
;
return
c
;
}
gmshCubicSpline
::
gmshCubicSpline
(
std
::
vector
<
SPoint3
>
&
data
)
{
c
=
Create_Curve
(
0
,
MSH_SEGM_BSPLN
,
3
,
0
,
0
,
0
,
0
,
0.
,
1.
)
;
c
->
Control_Points
=
List_Create
(
data
.
size
(),
1
,
sizeof
(
Vertex
*
));
for
(
unsigned
int
i
=
0
;
i
<
data
.
size
();
i
++
){
Vertex
*
v
=
new
Vertex
(
data
[
i
].
x
(),
data
[
i
].
y
(),
data
[
i
].
z
(),
0.0
);
List_Add
(
c
->
Control_Points
,
&
v
);
}
}
gmshCubicSpline
::
gmshCubicSpline
(
std
::
vector
<
SPoint2
>
&
data
)
{
c
=
Create_Curve
(
0
,
MSH_SEGM_BSPLN
,
3
,
0
,
0
,
0
,
0
,
0.
,
1.
)
;
c
->
Control_Points
=
List_Create
(
data
.
size
(),
1
,
sizeof
(
Vertex
*
));
for
(
unsigned
int
i
=
0
;
i
<
data
.
size
();
i
++
){
Vertex
*
v
=
new
Vertex
(
data
[
i
].
x
(),
data
[
i
].
y
(),
0.0
,
0.0
);
List_Add
(
c
->
Control_Points
,
&
v
);
}
}
SPoint3
gmshCubicSpline
::
point
(
double
t
)
const
{
Vertex
v
=
InterpolateCurve
(
c
,
t
,
0
);
return
SPoint3
(
v
.
Pos
.
X
,
v
.
Pos
.
Y
,
v
.
Pos
.
Z
);
}
SVector3
gmshCubicSpline
::
firstDer
(
double
t
)
const
{
Vertex
v
=
InterpolateCurve
(
c
,
t
,
1
);
return
SVector3
(
v
.
Pos
.
X
,
v
.
Pos
.
Y
,
v
.
Pos
.
Z
);
}
SVector3
gmshCubicSpline
::
secondDer
(
double
t
)
const
{
Vertex
v
=
InterpolateCurve
(
c
,
t
,
2
);
return
SVector3
(
v
.
Pos
.
X
,
v
.
Pos
.
Y
,
v
.
Pos
.
Z
);
}
gmshCubicSpline
::~
gmshCubicSpline
()
{
for
(
int
i
=
0
;
i
<
List_Nbr
(
c
->
Control_Points
);
i
++
){
Vertex
*
v
;
List_Read
(
c
->
Control_Points
,
i
,
&
v
);
delete
v
;
}
List_Delete
(
c
->
Control_Points
);
}
This diff is collapsed.
Click to expand it.
Geo/gmshCurve.h
deleted
100644 → 0
+
0
−
31
View file @
90f4115f
#ifndef _GMSH_CURVE_
#define _GMSH_CURVE_
#include
<vector>
#include
"SVector3.h"
#include
"SPoint3.h"
#include
"SPoint2.h"
class
Curve
;
class
gmshCurve
{
public
:
virtual
SPoint3
point
(
double
t
)
const
=
0
;
virtual
SVector3
firstDer
(
double
t
)
const
=
0
;
virtual
SVector3
secondDer
(
double
t
)
const
=
0
;
SVector3
curvature
(
double
t
)
const
;
};
class
gmshCubicSpline
:
public
gmshCurve
{
Curve
*
c
;
public:
gmshCubicSpline
(
std
::
vector
<
SPoint3
>
&
data
);
gmshCubicSpline
(
std
::
vector
<
SPoint2
>
&
data
);
~
gmshCubicSpline
();
virtual
SPoint3
point
(
double
t
)
const
;
virtual
SVector3
firstDer
(
double
t
)
const
;
virtual
SVector3
secondDer
(
double
t
)
const
;
};
#endif
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