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
2c56a0e0
Commit
2c56a0e0
authored
13 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fix compile
parent
12c39b7f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Geo/GEdge.cpp
+4
-7
4 additions, 7 deletions
Geo/GEdge.cpp
Geo/GFaceCompound.h
+19
-18
19 additions, 18 deletions
Geo/GFaceCompound.h
with
23 additions
and
25 deletions
Geo/GEdge.cpp
+
4
−
7
View file @
2c56a0e0
...
@@ -318,12 +318,10 @@ double goldenSectionSearch(const GEdge *ge, const SPoint3 &q, double x1,
...
@@ -318,12 +318,10 @@ double goldenSectionSearch(const GEdge *ge, const SPoint3 &q, double x1,
GPoint
GEdge
::
closestPoint
(
const
SPoint3
&
q
,
double
&
t
)
const
GPoint
GEdge
::
closestPoint
(
const
SPoint3
&
q
,
double
&
t
)
const
{
{
//
printf("looking for closest point in curve %d to point %g %g\n",tag(),q.x(),q.y());
// printf("looking for closest point in curve %d to point %g %g\n",tag(),q.x(),q.y());
const
int
nbSamples
=
100
;
const
int
nbSamples
=
100
;
double
tolerance
=
1.e-12
;
Range
<
double
>
interval
=
parBounds
(
0
);
Range
<
double
>
interval
=
parBounds
(
0
);
double
tMin
=
std
::
min
(
interval
.
high
(),
interval
.
low
());
double
tMin
=
std
::
min
(
interval
.
high
(),
interval
.
low
());
...
@@ -342,7 +340,7 @@ GPoint GEdge::closestPoint(const SPoint3 &q, double &t) const
...
@@ -342,7 +340,7 @@ GPoint GEdge::closestPoint(const SPoint3 &q, double &t) const
}
}
}
}
//
printf("parameter %g as an initial guess (dist = %g)\n",topt,DMIN);
// printf("parameter %g as an initial guess (dist = %g)\n",topt,DMIN);
if
(
topt
==
tMin
)
if
(
topt
==
tMin
)
t
=
goldenSectionSearch
(
this
,
q
,
topt
,
topt
+
DT
/
2
,
topt
+
DT
,
1.e-7
);
t
=
goldenSectionSearch
(
this
,
q
,
topt
,
topt
+
DT
/
2
,
topt
+
DT
,
1.e-7
);
...
@@ -352,9 +350,8 @@ GPoint GEdge::closestPoint(const SPoint3 &q, double &t) const
...
@@ -352,9 +350,8 @@ GPoint GEdge::closestPoint(const SPoint3 &q, double &t) const
t
=
goldenSectionSearch
(
this
,
q
,
topt
-
DT
,
topt
,
topt
+
DT
,
1.e-7
);
t
=
goldenSectionSearch
(
this
,
q
,
topt
-
DT
,
topt
,
topt
+
DT
,
1.e-7
);
const
SVector3
dp
=
q
-
position
(
t
);
const
SVector3
dp
=
q
-
position
(
t
);
const
double
D
=
dp
.
norm
();
// const double D = dp.norm();
// printf("after golden section parameter %g (dist = %g)\n",t,D);
// printf("after golden section parameter %g (dist = %g)\n",t,D);
return
point
(
t
);
return
point
(
t
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Geo/GFaceCompound.h
+
19
−
18
View file @
2c56a0e0
...
@@ -59,7 +59,7 @@ class GRbf;
...
@@ -59,7 +59,7 @@ class GRbf;
class
GFaceCompound
:
public
GFace
{
class
GFaceCompound
:
public
GFace
{
public:
public:
typedef
enum
{
ITERU
=
0
,
ITERV
=
1
,
ITERD
=
2
}
iterationStep
;
typedef
enum
{
ITERU
=
0
,
ITERV
=
1
,
ITERD
=
2
}
iterationStep
;
typedef
enum
{
HARMONIC_CIRCLE
=
0
,
CONFORMAL_SPECTRAL
=
1
,
RADIAL_BASIS
=
2
,
HARMONIC_PLANE
=
3
,
typedef
enum
{
HARMONIC_CIRCLE
=
0
,
CONFORMAL_SPECTRAL
=
1
,
RADIAL_BASIS
=
2
,
HARMONIC_PLANE
=
3
,
CONVEX_CIRCLE
=
4
,
CONVEX_PLANE
=
5
,
HARMONIC_SQUARE
=
6
,
CONFORMAL_FE
=
7
}
typeOfCompound
;
CONVEX_CIRCLE
=
4
,
CONVEX_PLANE
=
5
,
HARMONIC_SQUARE
=
6
,
CONFORMAL_FE
=
7
}
typeOfCompound
;
typedef
enum
{
HARMONIC
=
0
,
CONFORMAL
=
1
,
RBF
=
2
,
CONVEX
=
3
}
typeOfMapping
;
typedef
enum
{
HARMONIC
=
0
,
CONFORMAL
=
1
,
RBF
=
2
,
CONVEX
=
3
}
typeOfMapping
;
typedef
enum
{
UNITCIRCLE
,
MEANPLANE
,
SQUARE
,
ALREADYFIXED
,
SPECTRAL
,
FE
}
typeOfIsomorphism
;
typedef
enum
{
UNITCIRCLE
,
MEANPLANE
,
SQUARE
,
ALREADYFIXED
,
SPECTRAL
,
FE
}
typeOfIsomorphism
;
...
@@ -102,7 +102,7 @@ class GFaceCompound : public GFace {
...
@@ -102,7 +102,7 @@ class GFaceCompound : public GFace {
ANNdistArray
dist
;
ANNdistArray
dist
;
#endif
#endif
void
buildOct
()
const
;
void
buildOct
()
const
;
void
buildAllNodes
()
const
;
void
buildAllNodes
()
const
;
//different type of parametrizations
//different type of parametrizations
void
parametrize
(
iterationStep
,
typeOfMapping
)
const
;
void
parametrize
(
iterationStep
,
typeOfMapping
)
const
;
...
@@ -121,12 +121,12 @@ class GFaceCompound : public GFace {
...
@@ -121,12 +121,12 @@ class GFaceCompound : public GFace {
void
fillNeumannBCS_Plane
()
const
;
void
fillNeumannBCS_Plane
()
const
;
void
orientFillTris
(
std
::
list
<
MTriangle
*>
loopfillTris
)
const
;
void
orientFillTris
(
std
::
list
<
MTriangle
*>
loopfillTris
)
const
;
void
printFillTris
()
const
;
void
printFillTris
()
const
;
void
computeNormals
()
const
;
void
computeNormals
()
const
;
void
getBoundingEdges
();
void
getBoundingEdges
();
void
getUniqueEdges
(
std
::
set
<
GEdge
*>
&
_unique
);
void
getUniqueEdges
(
std
::
set
<
GEdge
*>
&
_unique
);
void
computeALoop
(
std
::
set
<
GEdge
*>
&
_unique
,
std
::
list
<
GEdge
*>
&
);
void
computeALoop
(
std
::
set
<
GEdge
*>
&
_unique
,
std
::
list
<
GEdge
*>
&
);
void
getTriangle
(
double
u
,
double
v
,
GFaceCompoundTriangle
**
lt
,
void
getTriangle
(
double
u
,
double
v
,
GFaceCompoundTriangle
**
lt
,
double
&
_u
,
double
&
_v
)
const
;
double
&
_u
,
double
&
_v
)
const
;
virtual
double
locCurvature
(
MTriangle
*
t
,
double
u
,
double
v
)
const
;
virtual
double
locCurvature
(
MTriangle
*
t
,
double
u
,
double
v
)
const
;
...
@@ -135,20 +135,20 @@ class GFaceCompound : public GFace {
...
@@ -135,20 +135,20 @@ class GFaceCompound : public GFace {
bool
trivial
()
const
;
bool
trivial
()
const
;
void
printStuff
(
int
iNewton
=
0
)
const
;
void
printStuff
(
int
iNewton
=
0
)
const
;
public
:
public
:
GFaceCompound
(
GModel
*
m
,
int
tag
,
std
::
list
<
GFace
*>
&
compound
,
GFaceCompound
(
GModel
*
m
,
int
tag
,
std
::
list
<
GFace
*>
&
compound
,
std
::
list
<
GEdge
*>
&
U0
,
typeOfCompound
typ
=
HARMONIC_CIRCLE
,
std
::
list
<
GEdge
*>
&
U0
,
typeOfCompound
typ
=
HARMONIC_CIRCLE
,
int
allowPartition
=
1
,
int
allowPartition
=
1
,
linearSystem
<
double
>*
lsys
=
0
);
linearSystem
<
double
>*
lsys
=
0
);
GFaceCompound
(
GModel
*
m
,
int
tag
,
std
::
list
<
GFace
*>
&
compound
,
GFaceCompound
(
GModel
*
m
,
int
tag
,
std
::
list
<
GFace
*>
&
compound
,
std
::
list
<
GEdge
*>
&
U0
,
std
::
list
<
GEdge
*>
&
V0
,
std
::
list
<
GEdge
*>
&
U0
,
std
::
list
<
GEdge
*>
&
V0
,
std
::
list
<
GEdge
*>
&
U1
,
std
::
list
<
GEdge
*>
&
V1
,
std
::
list
<
GEdge
*>
&
U1
,
std
::
list
<
GEdge
*>
&
V1
,
typeOfCompound
typ
=
HARMONIC_CIRCLE
,
typeOfCompound
typ
=
HARMONIC_CIRCLE
,
int
allowPartition
=
1
,
int
allowPartition
=
1
,
linearSystem
<
double
>*
lsys
=
0
);
linearSystem
<
double
>*
lsys
=
0
);
~
GFaceCompound
();
~
GFaceCompound
();
Range
<
double
>
parBounds
(
int
i
)
const
Range
<
double
>
parBounds
(
int
i
)
const
{
return
trivial
()
?
(
*
(
_compound
.
begin
()))
->
parBounds
(
i
)
:
Range
<
double
>
(
-
1
,
1
);
}
{
return
trivial
()
?
(
*
(
_compound
.
begin
()))
->
parBounds
(
i
)
:
Range
<
double
>
(
-
1
,
1
);
}
GPoint
point
(
double
par1
,
double
par2
)
const
;
GPoint
point
(
double
par1
,
double
par2
)
const
;
...
@@ -156,7 +156,7 @@ class GFaceCompound : public GFace {
...
@@ -156,7 +156,7 @@ class GFaceCompound : public GFace {
SPoint2
parFromPoint
(
const
SPoint3
&
p
,
bool
onSurface
=
true
)
const
;
SPoint2
parFromPoint
(
const
SPoint3
&
p
,
bool
onSurface
=
true
)
const
;
SPoint2
parFromVertex
(
MVertex
*
v
)
const
;
SPoint2
parFromVertex
(
MVertex
*
v
)
const
;
virtual
Pair
<
SVector3
,
SVector3
>
firstDer
(
const
SPoint2
&
param
)
const
;
virtual
Pair
<
SVector3
,
SVector3
>
firstDer
(
const
SPoint2
&
param
)
const
;
virtual
void
secondDer
(
const
SPoint2
&
,
SVector3
*
,
SVector3
*
,
SVector3
*
)
const
;
virtual
void
secondDer
(
const
SPoint2
&
,
SVector3
*
,
SVector3
*
,
SVector3
*
)
const
;
virtual
GEntity
::
GeomType
geomType
()
const
{
return
CompoundSurface
;
}
virtual
GEntity
::
GeomType
geomType
()
const
{
return
CompoundSurface
;
}
ModelType
getNativeType
()
const
{
return
GmshModel
;
}
ModelType
getNativeType
()
const
{
return
GmshModel
;
}
void
*
getNativePtr
()
const
{
return
0
;
}
void
*
getNativePtr
()
const
{
return
0
;
}
...
@@ -177,8 +177,8 @@ class GFaceCompound : public GFace {
...
@@ -177,8 +177,8 @@ class GFaceCompound : public GFace {
int
allowPartition
()
const
{
return
_allowPartition
;
}
int
allowPartition
()
const
{
return
_allowPartition
;
}
void
setType
(
typeOfIsomorphism
type
){
_type
=
type
;}
void
setType
(
typeOfIsomorphism
type
){
_type
=
type
;}
// useful for mesh generators
// useful for mesh generators
GPoint
intersectionWithCircle
(
const
SVector3
&
n1
,
const
SVector3
&
n2
,
const
SVector3
&
p
,
GPoint
intersectionWithCircle
(
const
SVector3
&
n1
,
const
SVector3
&
n2
,
const
SVector3
&
p
,
const
double
&
d
,
double
uv
[
2
])
const
;
const
double
&
d
,
double
uv
[
2
])
const
;
private
:
private
:
...
@@ -195,13 +195,13 @@ template<class scalar> class linearSystem;
...
@@ -195,13 +195,13 @@ template<class scalar> class linearSystem;
class
GFaceCompound
:
public
GFace
{
class
GFaceCompound
:
public
GFace
{
public:
public:
typedef
enum
{
ITERU
=
0
,
ITERV
=
1
,
ITERD
=
2
}
iterationStep
;
typedef
enum
{
ITERU
=
0
,
ITERV
=
1
,
ITERD
=
2
}
iterationStep
;
typedef
enum
{
HARMONIC_CIRCLE
=
0
,
CONFORMAL_SPECTRAL
=
1
,
RADIAL_BASIS
=
2
,
HARMONIC_PLANE
=
3
,
typedef
enum
{
HARMONIC_CIRCLE
=
0
,
CONFORMAL_SPECTRAL
=
1
,
RADIAL_BASIS
=
2
,
HARMONIC_PLANE
=
3
,
CONVEX_CIRCLE
=
4
,
CONVEX_PLANE
=
5
,
HARMONIC_SQUARE
=
6
,
CONFORMAL_FE
=
7
}
typeOfCompound
;
CONVEX_CIRCLE
=
4
,
CONVEX_PLANE
=
5
,
HARMONIC_SQUARE
=
6
,
CONFORMAL_FE
=
7
}
typeOfCompound
;
typedef
enum
{
HARMONIC
=
0
,
CONFORMAL
=
1
,
RBF
=
2
,
CONVEX
=
3
}
typeOfMapping
;
typedef
enum
{
HARMONIC
=
0
,
CONFORMAL
=
1
,
RBF
=
2
,
CONVEX
=
3
}
typeOfMapping
;
typedef
enum
{
UNITCIRCLE
,
MEANPLANE
,
SQUARE
,
ALREADYFIXED
,
SPECTRAL
,
FE
}
typeOfIsomorphism
;
typedef
enum
{
UNITCIRCLE
,
MEANPLANE
,
SQUARE
,
ALREADYFIXED
,
SPECTRAL
,
FE
}
typeOfIsomorphism
;
GFaceCompound
(
GModel
*
m
,
int
tag
,
std
::
list
<
GFace
*>
&
compound
,
GFaceCompound
(
GModel
*
m
,
int
tag
,
std
::
list
<
GFace
*>
&
compound
,
std
::
list
<
GEdge
*>
&
U0
,
typeOfMapping
typ
=
HARMONIC
,
std
::
list
<
GEdge
*>
&
U0
,
typeOfMapping
typ
=
HARMONIC
,
int
allowPartition
=
1
,
int
allowPartition
=
1
,
linearSystem
<
double
>*
lsys
=
0
)
linearSystem
<
double
>*
lsys
=
0
)
:
GFace
(
m
,
tag
)
:
GFace
(
m
,
tag
)
{
{
...
@@ -210,8 +210,8 @@ class GFaceCompound : public GFace {
...
@@ -210,8 +210,8 @@ class GFaceCompound : public GFace {
GFaceCompound
(
GModel
*
m
,
int
tag
,
std
::
list
<
GFace
*>
&
compound
,
GFaceCompound
(
GModel
*
m
,
int
tag
,
std
::
list
<
GFace
*>
&
compound
,
std
::
list
<
GEdge
*>
&
U0
,
std
::
list
<
GEdge
*>
&
V0
,
std
::
list
<
GEdge
*>
&
U0
,
std
::
list
<
GEdge
*>
&
V0
,
std
::
list
<
GEdge
*>
&
U1
,
std
::
list
<
GEdge
*>
&
V1
,
std
::
list
<
GEdge
*>
&
U1
,
std
::
list
<
GEdge
*>
&
V1
,
typeOfCompound
typ
=
HARMONIC_CIRCLE
,
typeOfCompound
typ
=
HARMONIC_CIRCLE
,
int
allowPartition
=
1
,
int
allowPartition
=
1
,
linearSystem
<
double
>*
lsys
=
0
)
linearSystem
<
double
>*
lsys
=
0
)
:
GFace
(
m
,
tag
)
:
GFace
(
m
,
tag
)
{
{
...
@@ -223,7 +223,8 @@ class GFaceCompound : public GFace {
...
@@ -223,7 +223,8 @@ class GFaceCompound : public GFace {
{
{
return
Pair
<
SVector3
,
SVector3
>
(
SVector3
(
0
,
0
,
0
),
SVector3
(
0
,
0
,
0
));
return
Pair
<
SVector3
,
SVector3
>
(
SVector3
(
0
,
0
,
0
),
SVector3
(
0
,
0
,
0
));
}
}
void
secondDer
(
const
SPoint2
&
param
,
SPoint2
parFromVertex
(
MVertex
*
v
)
const
{
return
SPoint2
();
}
void
secondDer
(
const
SPoint2
&
param
,
SVector3
*
dudu
,
SVector3
*
dvdv
,
SVector3
*
dudv
)
const
{}
SVector3
*
dudu
,
SVector3
*
dvdv
,
SVector3
*
dudv
)
const
{}
virtual
SPoint2
getCoordinates
(
MVertex
*
v
)
const
{
return
SPoint2
();
}
virtual
SPoint2
getCoordinates
(
MVertex
*
v
)
const
{
return
SPoint2
();
}
void
parametrize
()
const
{}
void
parametrize
()
const
{}
...
...
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