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
0a5aec29
Commit
0a5aec29
authored
12 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fix compile 2
parent
28d9ea13
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/GFaceCompound.cpp
+1
-17
1 addition, 17 deletions
Geo/GFaceCompound.cpp
Geo/GFaceCompound.h
+9
-15
9 additions, 15 deletions
Geo/GFaceCompound.h
with
10 additions
and
32 deletions
Geo/GFaceCompound.cpp
+
1
−
17
View file @
0a5aec29
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
#include
"GEdgeCompound.h"
#include
"GEdgeCompound.h"
#include
"intersectCurveSurface.h"
#include
"intersectCurveSurface.h"
#if defined(HAVE_SOLVER)
#if defined(HAVE_SOLVER)
&& defined(HAVE_ANN)
#include
"Options.h"
#include
"Options.h"
#include
"MLine.h"
#include
"MLine.h"
...
@@ -45,9 +45,7 @@
...
@@ -45,9 +45,7 @@
#include
"MPoint.h"
#include
"MPoint.h"
#include
"Numeric.h"
#include
"Numeric.h"
#include
"meshGFace.h"
#include
"meshGFace.h"
#if defined(HAVE_ANN)
#include
<ANN/ANN.h>
#include
<ANN/ANN.h>
#endif
static
void
fixEdgeToValue
(
GEdge
*
ed
,
double
value
,
dofManager
<
double
>
&
myAssembler
)
static
void
fixEdgeToValue
(
GEdge
*
ed
,
double
value
,
dofManager
<
double
>
&
myAssembler
)
{
{
...
@@ -1217,14 +1215,12 @@ GFaceCompound::GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound,
...
@@ -1217,14 +1215,12 @@ GFaceCompound::GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound,
nbSplit
=
0
;
nbSplit
=
0
;
fillTris
.
clear
();
fillTris
.
clear
();
#if defined(HAVE_ANN)
kdtree
=
NULL
;
kdtree
=
NULL
;
uv_kdtree
=
NULL
;
uv_kdtree
=
NULL
;
uv_nodes
=
NULL
;
uv_nodes
=
NULL
;
nodes
=
NULL
;
nodes
=
NULL
;
index
=
new
ANNidx
[
2
];
index
=
new
ANNidx
[
2
];
dist
=
new
ANNdist
[
2
];
dist
=
new
ANNdist
[
2
];
#endif
}
}
GFaceCompound
::
GFaceCompound
(
GModel
*
m
,
int
tag
,
std
::
list
<
GFace
*>
&
compound
,
GFaceCompound
::
GFaceCompound
(
GModel
*
m
,
int
tag
,
std
::
list
<
GFace
*>
&
compound
,
...
@@ -1272,14 +1268,12 @@ GFaceCompound::GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound,
...
@@ -1272,14 +1268,12 @@ GFaceCompound::GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound,
nbSplit
=
0
;
nbSplit
=
0
;
fillTris
.
clear
();
fillTris
.
clear
();
#if defined(HAVE_ANN)
uv_kdtree
=
NULL
;
uv_kdtree
=
NULL
;
kdtree
=
NULL
;
kdtree
=
NULL
;
uv_nodes
=
NULL
;
uv_nodes
=
NULL
;
nodes
=
NULL
;
nodes
=
NULL
;
index
=
new
ANNidx
[
2
];
index
=
new
ANNidx
[
2
];
dist
=
new
ANNdist
[
2
];
dist
=
new
ANNdist
[
2
];
#endif
}
}
GFaceCompound
::~
GFaceCompound
()
GFaceCompound
::~
GFaceCompound
()
...
@@ -1295,15 +1289,12 @@ GFaceCompound::~GFaceCompound()
...
@@ -1295,15 +1289,12 @@ GFaceCompound::~GFaceCompound()
if
(
_lsys
)
delete
_lsys
;
if
(
_lsys
)
delete
_lsys
;
delete
ONE
;
delete
ONE
;
delete
MONE
;
delete
MONE
;
#if defined(HAVE_ANN)
if
(
uv_kdtree
)
delete
uv_kdtree
;
if
(
uv_kdtree
)
delete
uv_kdtree
;
if
(
kdtree
)
delete
kdtree
;
if
(
kdtree
)
delete
kdtree
;
if
(
uv_nodes
)
annDeallocPts
(
uv_nodes
);
if
(
uv_nodes
)
annDeallocPts
(
uv_nodes
);
if
(
nodes
)
annDeallocPts
(
nodes
);
if
(
nodes
)
annDeallocPts
(
nodes
);
delete
[]
index
;
delete
[]
index
;
delete
[]
dist
;
delete
[]
dist
;
#endif
}
}
SPoint2
GFaceCompound
::
getCoordinates
(
MVertex
*
v
)
const
SPoint2
GFaceCompound
::
getCoordinates
(
MVertex
*
v
)
const
...
@@ -1972,7 +1963,6 @@ GPoint GFaceCompound::pointInRemeshedOctree(double par1, double par2) const
...
@@ -1972,7 +1963,6 @@ GPoint GFaceCompound::pointInRemeshedOctree(double par1, double par2) const
octNew
=
new
MElementOctree
(
myParamElems
);
octNew
=
new
MElementOctree
(
myParamElems
);
//build kdtree boundary nodes in parametric space
//build kdtree boundary nodes in parametric space
#if defined(HAVE_ANN)
uv_nodes
=
annAllocPts
(
myBCNodes
.
size
(),
3
);
uv_nodes
=
annAllocPts
(
myBCNodes
.
size
(),
3
);
std
::
set
<
SPoint2
>::
iterator
itp
=
myBCNodes
.
begin
();
std
::
set
<
SPoint2
>::
iterator
itp
=
myBCNodes
.
begin
();
int
ind
=
0
;
int
ind
=
0
;
...
@@ -1984,7 +1974,6 @@ GPoint GFaceCompound::pointInRemeshedOctree(double par1, double par2) const
...
@@ -1984,7 +1974,6 @@ GPoint GFaceCompound::pointInRemeshedOctree(double par1, double par2) const
itp
++
;
ind
++
;
itp
++
;
ind
++
;
}
}
uv_kdtree
=
new
ANNkd_tree
(
uv_nodes
,
myBCNodes
.
size
(),
3
);
uv_kdtree
=
new
ANNkd_tree
(
uv_nodes
,
myBCNodes
.
size
(),
3
);
#endif
}
}
//now use new octree to find point
//now use new octree to find point
...
@@ -2012,7 +2001,6 @@ GPoint GFaceCompound::pointInRemeshedOctree(double par1, double par2) const
...
@@ -2012,7 +2001,6 @@ GPoint GFaceCompound::pointInRemeshedOctree(double par1, double par2) const
//if element not found in new octree find closest point
//if element not found in new octree find closest point
else
{
else
{
GPoint
gp
(
50
,
50
,
50
);
GPoint
gp
(
50
,
50
,
50
);
#if defined(HAVE_ANN)
double
pt
[
3
]
=
{
par1
,
par2
,
0.0
};
double
pt
[
3
]
=
{
par1
,
par2
,
0.0
};
uv_kdtree
->
annkSearch
(
pt
,
2
,
index
,
dist
);
uv_kdtree
->
annkSearch
(
pt
,
2
,
index
,
dist
);
SPoint3
p1
(
uv_nodes
[
index
[
0
]][
0
],
uv_nodes
[
index
[
0
]][
1
],
uv_nodes
[
index
[
0
]][
2
]);
SPoint3
p1
(
uv_nodes
[
index
[
0
]][
0
],
uv_nodes
[
index
[
0
]][
1
],
uv_nodes
[
index
[
0
]][
2
]);
...
@@ -2040,9 +2028,6 @@ GPoint GFaceCompound::pointInRemeshedOctree(double par1, double par2) const
...
@@ -2040,9 +2028,6 @@ GPoint GFaceCompound::pointInRemeshedOctree(double par1, double par2) const
else
{
else
{
gp
.
setNoSuccess
();
gp
.
setNoSuccess
();
}
}
#else
gp
.
setNoSuccess
();
#endif
if
(
gp
.
succeeded
())
return
gp
;
if
(
gp
.
succeeded
())
return
gp
;
else
{
else
{
...
@@ -2274,7 +2259,6 @@ void GFaceCompound::secondDer(const SPoint2 ¶m,
...
@@ -2274,7 +2259,6 @@ void GFaceCompound::secondDer(const SPoint2 ¶m,
void
GFaceCompound
::
computeHessianMapping
()
const
void
GFaceCompound
::
computeHessianMapping
()
const
{
{
#if defined(HAVE_MESH)
#if defined(HAVE_MESH)
unsigned
int
sysDim
=
6
;
//for 2D
unsigned
int
sysDim
=
6
;
//for 2D
unsigned
int
minNbPtBlob
=
3
*
sysDim
;
unsigned
int
minNbPtBlob
=
3
*
sysDim
;
...
...
This diff is collapsed.
Click to expand it.
Geo/GFaceCompound.h
+
9
−
15
View file @
0a5aec29
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
#include
"GFace.h"
#include
"GFace.h"
template
<
class
scalar
>
class
simpleFunction
;
template
<
class
scalar
>
class
simpleFunction
;
#if defined(HAVE_SOLVER)
#if defined(HAVE_SOLVER)
&& defined(HAVE_ANN)
#include
"GEdge.h"
#include
"GEdge.h"
#include
"GEdgeCompound.h"
#include
"GEdgeCompound.h"
...
@@ -21,11 +21,8 @@ template <class scalar> class simpleFunction;
...
@@ -21,11 +21,8 @@ template <class scalar> class simpleFunction;
#include
"linearSystem.h"
#include
"linearSystem.h"
#include
"GRbf.h"
#include
"GRbf.h"
#include
"MElementOctree.h"
#include
"MElementOctree.h"
#if defined(HAVE_ANN)
#include
<ANN/ANN.h>
#include
<ANN/ANN.h>
class
ANNkd_tree
;
class
ANNkd_tree
;
#endif
#define AR_MAX 5 //maximal geometrical aspect ratio
#define AR_MAX 5 //maximal geometrical aspect ratio
...
@@ -101,14 +98,12 @@ class GFaceCompound : public GFace {
...
@@ -101,14 +98,12 @@ class GFaceCompound : public GFace {
mutable
std
::
vector
<
double
>
_coords
;
mutable
std
::
vector
<
double
>
_coords
;
mutable
std
::
map
<
MVertex
*
,
int
>
_mapV
;
mutable
std
::
map
<
MVertex
*
,
int
>
_mapV
;
linearSystem
<
double
>
*
_lsys
;
linearSystem
<
double
>
*
_lsys
;
#if defined(HAVE_ANN)
mutable
ANNkd_tree
*
uv_kdtree
;
mutable
ANNkd_tree
*
uv_kdtree
;
mutable
ANNkd_tree
*
kdtree
;
mutable
ANNkd_tree
*
kdtree
;
mutable
ANNpointArray
uv_nodes
;
mutable
ANNpointArray
uv_nodes
;
mutable
ANNpointArray
nodes
;
mutable
ANNpointArray
nodes
;
ANNidxArray
index
;
ANNidxArray
index
;
ANNdistArray
dist
;
ANNdistArray
dist
;
#endif
void
buildOct
()
const
;
void
buildOct
()
const
;
void
buildAllNodes
()
const
;
void
buildAllNodes
()
const
;
...
@@ -200,7 +195,6 @@ class GFaceCompound : public GFace {
...
@@ -200,7 +195,6 @@ class GFaceCompound : public GFace {
#else
#else
//define empty class ifndef HAVE_SOLVER
template
<
class
scalar
>
class
linearSystem
;
template
<
class
scalar
>
class
linearSystem
;
class
GFaceCompound
:
public
GFace
{
class
GFaceCompound
:
public
GFace
{
public:
public:
...
@@ -215,7 +209,7 @@ class GFaceCompound : public GFace {
...
@@ -215,7 +209,7 @@ class GFaceCompound : public GFace {
linearSystem
<
double
>*
lsys
=
0
)
linearSystem
<
double
>*
lsys
=
0
)
:
GFace
(
m
,
tag
)
:
GFace
(
m
,
tag
)
{
{
Msg
::
Error
(
"Gmsh has to be compiled with
s
olver support to use GFaceCompounds"
);
Msg
::
Error
(
"Gmsh has to be compiled with
S
olver
and ANN
support to use GFaceCompounds"
);
}
}
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
,
...
@@ -225,7 +219,7 @@ class GFaceCompound : public GFace {
...
@@ -225,7 +219,7 @@ class GFaceCompound : public GFace {
linearSystem
<
double
>*
lsys
=
0
)
linearSystem
<
double
>*
lsys
=
0
)
:
GFace
(
m
,
tag
)
:
GFace
(
m
,
tag
)
{
{
Msg
::
Error
(
"Gmsh has to be compiled with
s
olver support to use GFaceCompounds"
);
Msg
::
Error
(
"Gmsh has to be compiled with
S
olver
and ANN
support to use GFaceCompounds"
);
}
}
virtual
~
GFaceCompound
()
{}
virtual
~
GFaceCompound
()
{}
GPoint
point
(
double
par1
,
double
par2
)
const
{
return
GPoint
();
}
GPoint
point
(
double
par1
,
double
par2
)
const
{
return
GPoint
();
}
...
...
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