Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KennethVanhoey
CGoGN
Commits
05a091e4
Commit
05a091e4
authored
Jun 12, 2014
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove some warnings
parent
22d81ee3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
67 deletions
+51
-67
include/Algo/Geometry/area.hpp
include/Algo/Geometry/area.hpp
+6
-7
include/Algo/Geometry/centroid.hpp
include/Algo/Geometry/centroid.hpp
+18
-24
include/Algo/Geometry/curvature.hpp
include/Algo/Geometry/curvature.hpp
+6
-8
include/Algo/Geometry/normal.hpp
include/Algo/Geometry/normal.hpp
+13
-19
include/Algo/Geometry/volume.hpp
include/Algo/Geometry/volume.hpp
+5
-6
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
+2
-2
include/Topology/generic/traversor/traversor3.h
include/Topology/generic/traversor/traversor3.h
+1
-1
No files found.
include/Algo/Geometry/area.hpp
View file @
05a091e4
...
@@ -233,7 +233,7 @@ void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP
...
@@ -233,7 +233,7 @@ void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP
// },nbth,false,AUTO);
// },nbth,false,AUTO);
// }
// }
CGoGN
::
Parallel
::
foreach_cell
<
FACE
>
(
map
,
[
&
](
Face
f
,
unsigned
int
thr
)
CGoGN
::
Parallel
::
foreach_cell
<
FACE
>
(
map
,
[
&
]
(
Face
f
,
unsigned
int
/*thr*/
)
{
{
area
[
f
]
=
convexFaceArea
<
PFP
>
(
map
,
f
,
position
)
;
area
[
f
]
=
convexFaceArea
<
PFP
>
(
map
,
f
,
position
)
;
});
});
...
@@ -243,10 +243,10 @@ void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP
...
@@ -243,10 +243,10 @@ void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP
template
<
typename
PFP
>
template
<
typename
PFP
>
void
computeOneRingAreaVertices
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
VertexAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
>&
area
)
void
computeOneRingAreaVertices
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
VertexAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
>&
area
)
{
{
CGoGN
::
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,
[
&
](
Vertex
v
,
unsigned
int
thr
)
CGoGN
::
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,
[
&
]
(
Vertex
v
,
unsigned
int
/*thr*/
)
{
{
area
[
v
]
=
vertexOneRingArea
<
PFP
>
(
map
,
v
,
position
)
;
area
[
v
]
=
vertexOneRingArea
<
PFP
>
(
map
,
v
,
position
)
;
},
FORCE_CELL_MARKING
);
},
FORCE_CELL_MARKING
);
}
}
template
<
typename
PFP
>
template
<
typename
PFP
>
...
@@ -255,17 +255,16 @@ void computeBarycentricAreaVertices(typename PFP::MAP& map, const VertexAttribut
...
@@ -255,17 +255,16 @@ void computeBarycentricAreaVertices(typename PFP::MAP& map, const VertexAttribut
CGoGN
::
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,
[
&
]
(
Vertex
v
,
unsigned
int
thr
)
CGoGN
::
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,
[
&
]
(
Vertex
v
,
unsigned
int
thr
)
{
{
vertex_area
[
v
]
=
vertexBarycentricArea
<
PFP
>
(
map
,
v
,
position
)
;
vertex_area
[
v
]
=
vertexBarycentricArea
<
PFP
>
(
map
,
v
,
position
)
;
}
},
FORCE_CELL_MARKING
);
,
FORCE_CELL_MARKING
);
}
}
template
<
typename
PFP
>
template
<
typename
PFP
>
void
computeVoronoiAreaVertices
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
VertexAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
>&
area
)
void
computeVoronoiAreaVertices
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
VertexAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
>&
area
)
{
{
CGoGN
::
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,
[
&
](
Vertex
v
,
unsigned
int
thr
)
CGoGN
::
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,
[
&
]
(
Vertex
v
,
unsigned
int
/*thr*/
)
{
{
area
[
v
]
=
vertexVoronoiArea
<
PFP
>
(
map
,
v
,
position
)
;
area
[
v
]
=
vertexVoronoiArea
<
PFP
>
(
map
,
v
,
position
)
;
},
FORCE_CELL_MARKING
);
},
FORCE_CELL_MARKING
);
}
}
}
// namespace Parallel
}
// namespace Parallel
...
...
include/Algo/Geometry/centroid.hpp
View file @
05a091e4
...
@@ -164,7 +164,7 @@ void computeCentroidELWFaces(typename PFP::MAP& map, const V_ATT& position, F_AT
...
@@ -164,7 +164,7 @@ void computeCentroidELWFaces(typename PFP::MAP& map, const V_ATT& position, F_AT
template
<
typename
PFP
,
typename
V_ATT
>
template
<
typename
PFP
,
typename
V_ATT
>
void
computeNeighborhoodCentroidVertices
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
V_ATT
&
vertex_centroid
,
unsigned
int
thread
)
void
computeNeighborhoodCentroidVertices
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
V_ATT
&
vertex_centroid
,
unsigned
int
thread
)
{
{
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
{
{
Parallel
::
computeNeighborhoodCentroidVertices
<
PFP
,
V_ATT
>
(
map
,
position
,
vertex_centroid
);
Parallel
::
computeNeighborhoodCentroidVertices
<
PFP
,
V_ATT
>
(
map
,
position
,
vertex_centroid
);
return
;
return
;
...
@@ -173,8 +173,7 @@ void computeNeighborhoodCentroidVertices(typename PFP::MAP& map, const V_ATT& po
...
@@ -173,8 +173,7 @@ void computeNeighborhoodCentroidVertices(typename PFP::MAP& map, const V_ATT& po
foreach_cell
<
VERTEX
>
(
map
,
[
&
]
(
Vertex
v
)
foreach_cell
<
VERTEX
>
(
map
,
[
&
]
(
Vertex
v
)
{
{
vertex_centroid
[
v
]
=
vertexNeighborhoodCentroid
<
PFP
,
V_ATT
>
(
map
,
v
,
position
)
;
vertex_centroid
[
v
]
=
vertexNeighborhoodCentroid
<
PFP
,
V_ATT
>
(
map
,
v
,
position
)
;
}
},
AUTO
,
thread
);
,
AUTO
,
thread
);
}
}
...
@@ -184,7 +183,7 @@ namespace Parallel
...
@@ -184,7 +183,7 @@ namespace Parallel
template
<
typename
PFP
,
typename
V_ATT
,
typename
F_ATT
>
template
<
typename
PFP
,
typename
V_ATT
,
typename
F_ATT
>
void
computeCentroidFaces
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
F_ATT
&
face_centroid
)
void
computeCentroidFaces
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
F_ATT
&
face_centroid
)
{
{
CGoGN
::
Parallel
::
foreach_cell
<
FACE
>
(
map
,[
&
](
Face
f
,
unsigned
int
thr
)
CGoGN
::
Parallel
::
foreach_cell
<
FACE
>
(
map
,[
&
](
Face
f
,
unsigned
int
/*thr*/
)
{
{
face_centroid
[
f
]
=
faceCentroid
<
PFP
>
(
map
,
f
,
position
)
;
face_centroid
[
f
]
=
faceCentroid
<
PFP
>
(
map
,
f
,
position
)
;
});
});
...
@@ -193,7 +192,7 @@ void computeCentroidFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT&
...
@@ -193,7 +192,7 @@ void computeCentroidFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT&
template
<
typename
PFP
,
typename
V_ATT
,
typename
F_ATT
>
template
<
typename
PFP
,
typename
V_ATT
,
typename
F_ATT
>
void
computeCentroidELWFaces
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
F_ATT
&
face_centroid
)
void
computeCentroidELWFaces
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
F_ATT
&
face_centroid
)
{
{
CGoGN
::
Parallel
::
foreach_cell
<
FACE
>
(
map
,[
&
](
Face
f
,
unsigned
int
thr
)
CGoGN
::
Parallel
::
foreach_cell
<
FACE
>
(
map
,[
&
](
Face
f
,
unsigned
int
/*thr*/
)
{
{
face_centroid
[
f
]
=
faceCentroidELW
<
PFP
>
(
map
,
f
,
position
)
;
face_centroid
[
f
]
=
faceCentroidELW
<
PFP
>
(
map
,
f
,
position
)
;
});
});
...
@@ -204,10 +203,10 @@ template <typename PFP, typename V_ATT>
...
@@ -204,10 +203,10 @@ template <typename PFP, typename V_ATT>
void
computeNeighborhoodCentroidVertices
(
typename
PFP
::
MAP
&
map
,
void
computeNeighborhoodCentroidVertices
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
V_ATT
&
vertex_centroid
)
const
V_ATT
&
position
,
V_ATT
&
vertex_centroid
)
{
{
CGoGN
::
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,[
&
](
Vertex
v
,
unsigned
int
thr
)
CGoGN
::
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,[
&
](
Vertex
v
,
unsigned
int
/*thr*/
)
{
{
vertex_centroid
[
v
]
=
vertexNeighborhoodCentroid
<
PFP
>
(
map
,
v
,
position
)
;
vertex_centroid
[
v
]
=
vertexNeighborhoodCentroid
<
PFP
>
(
map
,
v
,
position
)
;
},
FORCE_CELL_MARKING
);
},
FORCE_CELL_MARKING
);
}
}
}
// namespace Parallel
}
// namespace Parallel
...
@@ -229,12 +228,11 @@ typename V_ATT::DATA_TYPE vertexNeighborhoodCentroid(typename PFP::MAP& map, Ver
...
@@ -229,12 +228,11 @@ typename V_ATT::DATA_TYPE vertexNeighborhoodCentroid(typename PFP::MAP& map, Ver
{
{
typename
V_ATT
::
DATA_TYPE
center
(
0.0
);
typename
V_ATT
::
DATA_TYPE
center
(
0.0
);
unsigned
int
count
=
0
;
unsigned
int
count
=
0
;
foreach_adjacent3
<
EDGE
>
(
map
,
v
,
[
&
](
Vertex
it
)
foreach_adjacent3
<
EDGE
>
(
map
,
v
,
[
&
]
(
Vertex
it
)
{
{
center
+=
attributs
[
it
];
center
+=
attributs
[
it
];
++
count
;
++
count
;
}
},
false
,
thread
);
,
false
,
thread
);
center
/=
count
;
center
/=
count
;
return
center
;
return
center
;
}
}
...
@@ -242,7 +240,7 @@ typename V_ATT::DATA_TYPE vertexNeighborhoodCentroid(typename PFP::MAP& map, Ver
...
@@ -242,7 +240,7 @@ typename V_ATT::DATA_TYPE vertexNeighborhoodCentroid(typename PFP::MAP& map, Ver
template
<
typename
PFP
,
typename
V_ATT
,
typename
W_ATT
>
template
<
typename
PFP
,
typename
V_ATT
,
typename
W_ATT
>
void
computeCentroidVolumes
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
W_ATT
&
vol_centroid
,
unsigned
int
thread
)
void
computeCentroidVolumes
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
W_ATT
&
vol_centroid
,
unsigned
int
thread
)
{
{
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
{
{
Parallel
::
computeCentroidVolumes
<
PFP
,
V_ATT
,
W_ATT
>
(
map
,
position
,
vol_centroid
);
Parallel
::
computeCentroidVolumes
<
PFP
,
V_ATT
,
W_ATT
>
(
map
,
position
,
vol_centroid
);
return
;
return
;
...
@@ -251,14 +249,13 @@ void computeCentroidVolumes(typename PFP::MAP& map, const V_ATT& position, W_ATT
...
@@ -251,14 +249,13 @@ void computeCentroidVolumes(typename PFP::MAP& map, const V_ATT& position, W_ATT
foreach_cell
<
VOLUME
>
(
map
,
[
&
]
(
Vol
v
)
foreach_cell
<
VOLUME
>
(
map
,
[
&
]
(
Vol
v
)
{
{
vol_centroid
[
v
]
=
Surface
::
Geometry
::
volumeCentroid
<
PFP
,
V_ATT
>
(
map
,
v
,
position
,
thread
)
;
vol_centroid
[
v
]
=
Surface
::
Geometry
::
volumeCentroid
<
PFP
,
V_ATT
>
(
map
,
v
,
position
,
thread
)
;
}
},
AUTO
,
thread
);
,
AUTO
,
thread
);
}
}
template
<
typename
PFP
,
typename
V_ATT
,
typename
W_ATT
>
template
<
typename
PFP
,
typename
V_ATT
,
typename
W_ATT
>
void
computeCentroidELWVolumes
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
W_ATT
&
vol_centroid
,
unsigned
int
thread
)
void
computeCentroidELWVolumes
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
W_ATT
&
vol_centroid
,
unsigned
int
thread
)
{
{
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
{
{
Parallel
::
computeCentroidELWVolumes
<
PFP
,
V_ATT
,
W_ATT
>
(
map
,
position
,
vol_centroid
);
Parallel
::
computeCentroidELWVolumes
<
PFP
,
V_ATT
,
W_ATT
>
(
map
,
position
,
vol_centroid
);
return
;
return
;
...
@@ -267,14 +264,13 @@ void computeCentroidELWVolumes(typename PFP::MAP& map, const V_ATT& position, W_
...
@@ -267,14 +264,13 @@ void computeCentroidELWVolumes(typename PFP::MAP& map, const V_ATT& position, W_
foreach_cell
<
VOLUME
>
(
map
,
[
&
]
(
Vol
v
)
foreach_cell
<
VOLUME
>
(
map
,
[
&
]
(
Vol
v
)
{
{
vol_centroid
[
v
]
=
Surface
::
Geometry
::
volumeCentroidELW
<
PFP
,
V_ATT
>
(
map
,
v
,
position
,
thread
)
;
vol_centroid
[
v
]
=
Surface
::
Geometry
::
volumeCentroidELW
<
PFP
,
V_ATT
>
(
map
,
v
,
position
,
thread
)
;
}
},
AUTO
,
thread
);
,
AUTO
,
thread
);
}
}
template
<
typename
PFP
,
typename
V_ATT
>
template
<
typename
PFP
,
typename
V_ATT
>
void
computeNeighborhoodCentroidVertices
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
V_ATT
&
vertex_centroid
,
unsigned
int
thread
)
void
computeNeighborhoodCentroidVertices
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
V_ATT
&
vertex_centroid
,
unsigned
int
thread
)
{
{
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
{
{
Parallel
::
computeNeighborhoodCentroidVertices
<
PFP
,
V_ATT
>
(
map
,
position
,
vertex_centroid
);
Parallel
::
computeNeighborhoodCentroidVertices
<
PFP
,
V_ATT
>
(
map
,
position
,
vertex_centroid
);
return
;
return
;
...
@@ -283,8 +279,7 @@ void computeNeighborhoodCentroidVertices(typename PFP::MAP& map, const V_ATT& po
...
@@ -283,8 +279,7 @@ void computeNeighborhoodCentroidVertices(typename PFP::MAP& map, const V_ATT& po
foreach_cell
<
VERTEX
>
(
map
,
[
&
]
(
Vertex
v
)
foreach_cell
<
VERTEX
>
(
map
,
[
&
]
(
Vertex
v
)
{
{
vertex_centroid
[
v
]
=
Volume
::
Geometry
::
vertexNeighborhoodCentroid
<
PFP
,
V_ATT
>
(
map
,
v
,
position
)
;
vertex_centroid
[
v
]
=
Volume
::
Geometry
::
vertexNeighborhoodCentroid
<
PFP
,
V_ATT
>
(
map
,
v
,
position
)
;
}
},
AUTO
,
thread
);
,
AUTO
,
thread
);
}
}
...
@@ -294,7 +289,7 @@ namespace Parallel
...
@@ -294,7 +289,7 @@ namespace Parallel
template
<
typename
PFP
,
typename
V_ATT
,
typename
W_ATT
>
template
<
typename
PFP
,
typename
V_ATT
,
typename
W_ATT
>
void
computeCentroidVolumes
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
W_ATT
&
vol_centroid
)
void
computeCentroidVolumes
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
W_ATT
&
vol_centroid
)
{
{
CGoGN
::
Parallel
::
foreach_cell
<
VOLUME
>
(
map
,
[
&
]
(
Vol
v
,
unsigned
int
thr
)
CGoGN
::
Parallel
::
foreach_cell
<
VOLUME
>
(
map
,
[
&
]
(
Vol
v
,
unsigned
int
thr
)
{
{
vol_centroid
[
v
]
=
Surface
::
Geometry
::
volumeCentroid
<
PFP
,
V_ATT
>
(
map
,
v
,
position
,
thr
)
;
vol_centroid
[
v
]
=
Surface
::
Geometry
::
volumeCentroid
<
PFP
,
V_ATT
>
(
map
,
v
,
position
,
thr
)
;
});
});
...
@@ -303,20 +298,19 @@ void computeCentroidVolumes(typename PFP::MAP& map, const V_ATT& position, W_ATT
...
@@ -303,20 +298,19 @@ void computeCentroidVolumes(typename PFP::MAP& map, const V_ATT& position, W_ATT
template
<
typename
PFP
,
typename
V_ATT
,
typename
W_ATT
>
template
<
typename
PFP
,
typename
V_ATT
,
typename
W_ATT
>
void
computeCentroidELWVolumes
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
W_ATT
&
vol_centroid
)
void
computeCentroidELWVolumes
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
W_ATT
&
vol_centroid
)
{
{
CGoGN
::
Parallel
::
foreach_cell
<
VOLUME
>
(
map
,
[
&
]
(
Vol
v
,
unsigned
int
thr
)
CGoGN
::
Parallel
::
foreach_cell
<
VOLUME
>
(
map
,
[
&
]
(
Vol
v
,
unsigned
int
thr
)
{
{
vol_centroid
[
v
]
=
Surface
::
Geometry
::
volumeCentroidELW
<
PFP
,
V_ATT
>
(
map
,
v
,
position
,
thr
)
;
vol_centroid
[
v
]
=
Surface
::
Geometry
::
volumeCentroidELW
<
PFP
,
V_ATT
>
(
map
,
v
,
position
,
thr
)
;
});
});
}
}
template
<
typename
PFP
,
typename
V_ATT
>
template
<
typename
PFP
,
typename
V_ATT
>
void
computeNeighborhoodCentroidVertices
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
V_ATT
&
vertex_centroid
)
void
computeNeighborhoodCentroidVertices
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
V_ATT
&
vertex_centroid
)
{
{
CGoGN
::
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,
[
&
]
(
Vertex
v
,
unsigned
int
thr
)
CGoGN
::
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,
[
&
]
(
Vertex
v
,
unsigned
int
thr
)
{
{
vertex_centroid
[
v
]
=
Volume
::
Geometry
::
vertexNeighborhoodCentroid
<
PFP
,
V_ATT
>
(
map
,
v
,
position
,
thr
)
;
vertex_centroid
[
v
]
=
Volume
::
Geometry
::
vertexNeighborhoodCentroid
<
PFP
,
V_ATT
>
(
map
,
v
,
position
,
thr
)
;
},
true
,
FORCE_CELL_MARKING
);
},
FORCE_CELL_MARKING
);
}
}
}
// namespace Parallel
}
// namespace Parallel
...
...
include/Algo/Geometry/curvature.hpp
View file @
05a091e4
...
@@ -664,10 +664,10 @@ void computeCurvatureVertices_NormalCycles(
...
@@ -664,10 +664,10 @@ void computeCurvatureVertices_NormalCycles(
if (!map.template isOrbitEmbedded<FACE>())
if (!map.template isOrbitEmbedded<FACE>())
Algo::Topo::initAllOrbitsEmbedding<FACE>(map);
Algo::Topo::initAllOrbitsEmbedding<FACE>(map);
CGoGN::Parallel::foreach_cell<VERTEX>(map,
[&]
(Vertex v, unsigned int threadID)
CGoGN::Parallel::foreach_cell<VERTEX>(map,
[&]
(Vertex v, unsigned int threadID)
{
{
computeCurvatureVertex_NormalCycles<PFP>(map, v, radius, position, normal, edgeangle, kmax, kmin, Kmax, Kmin, Knormal, threadID) ;
computeCurvatureVertex_NormalCycles<PFP>(map, v, radius, position, normal, edgeangle, kmax, kmin, Kmax, Kmin, Knormal, threadID) ;
},FORCE_CELL_MARKING);
},
FORCE_CELL_MARKING);
}
}
template <typename PFP>
template <typename PFP>
...
@@ -693,14 +693,12 @@ void computeCurvatureVertices_NormalCycles_Projected(
...
@@ -693,14 +693,12 @@ void computeCurvatureVertices_NormalCycles_Projected(
if (!map.template isOrbitEmbedded<FACE>())
if (!map.template isOrbitEmbedded<FACE>())
Algo::Topo::initAllOrbitsEmbedding<FACE>(map);
Algo::Topo::initAllOrbitsEmbedding<FACE>(map);
CGoGN::Parallel::foreach_cell<VERTEX>(map,
[&]
(Vertex v, unsigned int threadID)
CGoGN::Parallel::foreach_cell<VERTEX>(map,
[&]
(Vertex v, unsigned int threadID)
{
{
computeCurvatureVertex_NormalCycles_Projected<PFP>(map, v, radius, position, normal, edgeangle, kmax, kmin, Kmax, Kmin, Knormal, threadID) ;
computeCurvatureVertex_NormalCycles_Projected<PFP>(map, v, radius, position, normal, edgeangle, kmax, kmin, Kmax, Kmin, Knormal, threadID) ;
},FORCE_CELL_MARKING);
},
FORCE_CELL_MARKING);
}
}
template <typename PFP>
template <typename PFP>
void computeCurvatureVertices_QuadraticFitting(
void computeCurvatureVertices_QuadraticFitting(
typename PFP::MAP& map,
typename PFP::MAP& map,
...
@@ -711,10 +709,10 @@ void computeCurvatureVertices_QuadraticFitting(
...
@@ -711,10 +709,10 @@ void computeCurvatureVertices_QuadraticFitting(
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmax,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmax,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmin)
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmin)
{
{
CGoGN::Parallel::foreach_cell<VERTEX>(map,
[&]
(Vertex v, unsigned int threadID)
CGoGN::Parallel::foreach_cell<VERTEX>(map,
[&]
(Vertex v, unsigned int threadID)
{
{
computeCurvatureVertex_QuadraticFitting<PFP>(map, v, position, normal, kmax, kmin, Kmax, Kmin, threadID) ;
computeCurvatureVertex_QuadraticFitting<PFP>(map, v, position, normal, kmax, kmin, Kmax, Kmin, threadID) ;
},FORCE_CELL_MARKING);
},
FORCE_CELL_MARKING);
}
}
...
...
include/Algo/Geometry/normal.hpp
View file @
05a091e4
...
@@ -145,36 +145,33 @@ typename V_ATT::DATA_TYPE vertexBorderNormal(typename PFP::MAP& map, Vertex v, c
...
@@ -145,36 +145,33 @@ typename V_ATT::DATA_TYPE vertexBorderNormal(typename PFP::MAP& map, Vertex v, c
template
<
typename
PFP
,
typename
V_ATT
,
typename
F_ATT
>
template
<
typename
PFP
,
typename
V_ATT
,
typename
F_ATT
>
void
computeNormalFaces
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
F_ATT
&
face_normal
,
unsigned
int
thread
)
void
computeNormalFaces
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
F_ATT
&
face_normal
,
unsigned
int
thread
)
{
{
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
{
{
Parallel
::
computeNormalFaces
<
PFP
,
V_ATT
,
F_ATT
>
(
map
,
position
,
face_normal
);
Parallel
::
computeNormalFaces
<
PFP
,
V_ATT
,
F_ATT
>
(
map
,
position
,
face_normal
);
return
;
return
;
}
}
foreach_cell
<
FACE
>
(
map
,
[
&
]
(
Face
f
)
foreach_cell
<
FACE
>
(
map
,
[
&
]
(
Face
f
)
{
{
face_normal
[
f
]
=
faceNormal
<
PFP
>
(
map
,
f
,
position
)
;
face_normal
[
f
]
=
faceNormal
<
PFP
>
(
map
,
f
,
position
)
;
},
},
AUTO
,
thread
);
AUTO
,
thread
);
}
}
template
<
typename
PFP
,
typename
V_ATT
>
template
<
typename
PFP
,
typename
V_ATT
>
void
computeNormalVertices
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
V_ATT
&
normal
,
unsigned
int
thread
)
void
computeNormalVertices
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
V_ATT
&
normal
,
unsigned
int
thread
)
{
{
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
{
{
Parallel
::
computeNormalVertices
<
PFP
,
V_ATT
>
(
map
,
position
,
normal
);
Parallel
::
computeNormalVertices
<
PFP
,
V_ATT
>
(
map
,
position
,
normal
);
return
;
return
;
}
}
foreach_cell
<
VERTEX
>
(
map
,
[
&
]
(
Vertex
v
)
foreach_cell
<
VERTEX
>
(
map
,
[
&
]
(
Vertex
v
)
{
{
normal
[
v
]
=
vertexNormal
<
PFP
>
(
map
,
v
,
position
)
;
normal
[
v
]
=
vertexNormal
<
PFP
>
(
map
,
v
,
position
)
;
},
},
FORCE_CELL_MARKING
,
thread
);
FORCE_CELL_MARKING
,
thread
);
}
}
template
<
typename
PFP
,
typename
V_ATT
>
template
<
typename
PFP
,
typename
V_ATT
>
typename
PFP
::
REAL
computeAngleBetweenNormalsOnEdge
(
typename
PFP
::
MAP
&
map
,
Edge
e
,
const
V_ATT
&
position
)
typename
PFP
::
REAL
computeAngleBetweenNormalsOnEdge
(
typename
PFP
::
MAP
&
map
,
Edge
e
,
const
V_ATT
&
position
)
{
{
...
@@ -211,47 +208,44 @@ typename PFP::REAL computeAngleBetweenNormalsOnEdge(typename PFP::MAP& map, Edge
...
@@ -211,47 +208,44 @@ typename PFP::REAL computeAngleBetweenNormalsOnEdge(typename PFP::MAP& map, Edge
template
<
typename
PFP
,
typename
V_ATT
,
typename
E_ATT
>
template
<
typename
PFP
,
typename
V_ATT
,
typename
E_ATT
>
void
computeAnglesBetweenNormalsOnEdges
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
E_ATT
&
angles
,
unsigned
int
thread
)
void
computeAnglesBetweenNormalsOnEdges
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
E_ATT
&
angles
,
unsigned
int
thread
)
{
{
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
{
{
Parallel
::
computeAnglesBetweenNormalsOnEdges
<
PFP
,
V_ATT
,
E_ATT
>
(
map
,
position
,
angles
);
Parallel
::
computeAnglesBetweenNormalsOnEdges
<
PFP
,
V_ATT
,
E_ATT
>
(
map
,
position
,
angles
);
return
;
return
;
}
}
foreach_cell
<
EDGE
>
(
map
,
[
&
]
(
Edge
e
)
foreach_cell
<
EDGE
>
(
map
,
[
&
]
(
Edge
e
)
{
{
angles
[
e
]
=
computeAngleBetweenNormalsOnEdge
<
PFP
>
(
map
,
e
,
position
)
;
angles
[
e
]
=
computeAngleBetweenNormalsOnEdge
<
PFP
>
(
map
,
e
,
position
)
;
},
},
AUTO
,
thread
);
AUTO
,
thread
);
}
}
namespace
Parallel
namespace
Parallel
{
{
template
<
typename
PFP
,
typename
V_ATT
>
template
<
typename
PFP
,
typename
V_ATT
>
void
computeNormalVertices
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
V_ATT
&
normal
)
void
computeNormalVertices
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
V_ATT
&
normal
)
{
{
CGoGN
::
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,
[
&
]
(
Vertex
v
,
unsigned
int
/*thr*/
)
CGoGN
::
Parallel
::
foreach_cell
<
VERTEX
>
(
map
,
[
&
]
(
Vertex
v
,
unsigned
int
/*thr*/
)
{
{
normal
[
v
]
=
vertexNormal
<
PFP
>
(
map
,
v
,
position
)
;
normal
[
v
]
=
vertexNormal
<
PFP
>
(
map
,
v
,
position
)
;
},
FORCE_CELL_MARKING
);
},
FORCE_CELL_MARKING
);
}
}
template
<
typename
PFP
,
typename
V_ATT
,
typename
F_ATT
>
template
<
typename
PFP
,
typename
V_ATT
,
typename
F_ATT
>
void
computeNormalFaces
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
F_ATT
&
normal
)
void
computeNormalFaces
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
F_ATT
&
normal
)
{
{
CGoGN
::
Parallel
::
foreach_cell
<
FACE
>
(
map
,
[
&
](
Face
f
,
unsigned
int
thr
)
CGoGN
::
Parallel
::
foreach_cell
<
FACE
>
(
map
,
[
&
]
(
Face
f
,
unsigned
int
/*thr*/
)
{
{
normal
[
f
]
=
faceNormal
<
PFP
>
(
map
,
f
,
position
)
;
normal
[
f
]
=
faceNormal
<
PFP
>
(
map
,
f
,
position
)
;
});
});
}
}
template
<
typename
PFP
,
typename
V_ATT
,
typename
E_ATT
>
template
<
typename
PFP
,
typename
V_ATT
,
typename
E_ATT
>
void
computeAnglesBetweenNormalsOnEdges
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
E_ATT
&
angles
)
void
computeAnglesBetweenNormalsOnEdges
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
E_ATT
&
angles
)
{
{
CGoGN
::
Parallel
::
foreach_cell
<
EDGE
>
(
map
,[
&
](
Edge
e
,
unsigned
int
thr
)
CGoGN
::
Parallel
::
foreach_cell
<
EDGE
>
(
map
,[
&
](
Edge
e
,
unsigned
int
/*thr*/
)
{
{
angles
[
e
]
=
computeAngleBetweenNormalsOnEdge
<
PFP
>
(
map
,
e
,
position
)
;
angles
[
e
]
=
computeAngleBetweenNormalsOnEdge
<
PFP
>
(
map
,
e
,
position
)
;
});
});
...
...
include/Algo/Geometry/volume.hpp
View file @
05a091e4
...
@@ -126,17 +126,16 @@ typename PFP::REAL convexPolyhedronVolume(typename PFP::MAP& map, Vol v, const V
...
@@ -126,17 +126,16 @@ typename PFP::REAL convexPolyhedronVolume(typename PFP::MAP& map, Vol v, const V
template
<
typename
PFP
>
template
<
typename
PFP
>
typename
PFP
::
REAL
totalVolume
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
unsigned
int
thread
)
typename
PFP
::
REAL
totalVolume
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
unsigned
int
thread
)
{
{
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
if
((
CGoGN
::
Parallel
::
NumberOfThreads
>
1
)
&&
(
thread
==
0
))
{
{
return
Parallel
::
totalVolume
<
PFP
>
(
map
,
position
);
return
Parallel
::
totalVolume
<
PFP
>
(
map
,
position
);
}
}
double
vol
=
0.0
;
double
vol
=
0.0
;
TraversorW
<
typename
PFP
::
MAP
>
t
(
map
,
thread
)
;
TraversorW
<
typename
PFP
::
MAP
>
t
(
map
,
thread
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
vol
+=
convexPolyhedronVolume
<
PFP
>
(
map
,
d
,
position
,
thread
)
;
vol
+=
convexPolyhedronVolume
<
PFP
>
(
map
,
d
,
position
,
thread
)
;
return
typename
PFP
::
REAL
(
vol
)
;
return
typename
PFP
::
REAL
(
vol
)
;
}
}
...
@@ -148,10 +147,10 @@ template <typename PFP>
...
@@ -148,10 +147,10 @@ template <typename PFP>
typename
PFP
::
REAL
totalVolume
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
)
typename
PFP
::
REAL
totalVolume
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
)
{
{
// allocate a vector of 1 accumulator for each thread
// allocate a vector of 1 accumulator for each thread
std
::
vector
<
typename
PFP
::
REAL
>
vols
(
CGoGN
::
Parallel
::
NumberOfThreads
-
1
,
0.0
);
std
::
vector
<
typename
PFP
::
REAL
>
vols
(
CGoGN
::
Parallel
::
NumberOfThreads
-
1
,
0.0
);
// foreach volume
// foreach volume
CGoGN
::
Parallel
::
foreach_cell
<
VOLUME
>
(
map
,
[
&
]
(
Vol
v
,
unsigned
int
thr
)
CGoGN
::
Parallel
::
foreach_cell
<
VOLUME
>
(
map
,
[
&
]
(
Vol
v
,
unsigned
int
thr
)
{
{
// add volume to the thread accumulator
// add volume to the thread accumulator
vols
[
thr
-
1
]
+=
convexPolyhedronVolume
<
PFP
>
(
map
,
v
,
position
,
thr
)
;
vols
[
thr
-
1
]
+=
convexPolyhedronVolume
<
PFP
>
(
map
,
v
,
position
,
thr
)
;
...
...
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
View file @
05a091e4
...
@@ -361,13 +361,13 @@ inline void ImplicitHierarchicalMap3::foreach_dart_of_volume(Dart d, FUNC& f, un
...
@@ -361,13 +361,13 @@ inline void ImplicitHierarchicalMap3::foreach_dart_of_volume(Dart d, FUNC& f, un
}
}
template <typename FUNC>
template <typename FUNC>
inline void ImplicitHierarchicalMap3::foreach_dart_of_vertex1(Dart d, FUNC& f, unsigned int
thread
) const
inline void ImplicitHierarchicalMap3::foreach_dart_of_vertex1(Dart d, FUNC& f, unsigned int
/*thread*/
) const
{
{
f(d);
f(d);
}
}
template <typename FUNC>
template <typename FUNC>
inline void ImplicitHierarchicalMap3::foreach_dart_of_edge1(Dart d, FUNC& f, unsigned int
thread
) const
inline void ImplicitHierarchicalMap3::foreach_dart_of_edge1(Dart d, FUNC& f, unsigned int
/*thread*/
) const
{
{
f(d);
f(d);
}
}
...
...
include/Topology/generic/traversor/traversor3.h
View file @
05a091e4
...
@@ -361,7 +361,7 @@ inline void foreach_incident3(MAP& map, Cell<ORBIT_FROM> c, FUNC f, bool forceDa
...
@@ -361,7 +361,7 @@ inline void foreach_incident3(MAP& map, Cell<ORBIT_FROM> c, FUNC f, bool forceDa
template <unsigned int THRU, unsigned int ORBIT, typename MAP, typename FUNC>
template <unsigned int THRU, unsigned int ORBIT, typename MAP, typename FUNC>
inline
void
foreach_adjacent3
(
MAP
&
map
,
Cell
<
ORBIT
>
c
,
FUNC
f
,
bool
forceDartMarker
=
false
,
unsigned
int
thread
=
0
)
inline void foreach_adjacent3(MAP& map, Cell<ORBIT> c, FUNC f, bool forceDartMarker = false, unsigned int thread = 0)
{
{
Traversor3XXaY<MAP,ORBIT,THRU> trav(const_cast<const MAP&>(map),c,forceDartMarker,thread);
Traversor3XXaY<MAP,ORBIT,THRU> trav(const_cast<const MAP&>(map),c,forceDartMarker,thread);
for (Cell<ORBIT> c = trav.begin(), e = trav.end(); c.dart != e.dart; c = trav.next())