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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Pitiot
CGoGN
Commits
bd0de59b
Commit
bd0de59b
authored
Nov 28, 2011
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge no_boundary + GMap without fixed point
parent
7054966d
Changes
44
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
1514 additions
and
1544 deletions
+1514
-1544
Apps/Tuto/tp_master.cpp
Apps/Tuto/tp_master.cpp
+1
-10
include/Algo/Filtering/average.h
include/Algo/Filtering/average.h
+48
-38
include/Algo/Filtering/average_normals.h
include/Algo/Filtering/average_normals.h
+0
-6
include/Algo/Filtering/bilateral.h
include/Algo/Filtering/bilateral.h
+49
-43
include/Algo/Filtering/taubin.h
include/Algo/Filtering/taubin.h
+50
-29
include/Algo/ImplicitHierarchicalMesh/ihm.h
include/Algo/ImplicitHierarchicalMesh/ihm.h
+5
-5
include/Algo/ImplicitHierarchicalMesh/ihm.hpp
include/Algo/ImplicitHierarchicalMesh/ihm.hpp
+1
-1
include/Algo/LinearSolving/matrixSetup.h
include/Algo/LinearSolving/matrixSetup.h
+18
-60
include/Algo/Modelisation/extrusion.hpp
include/Algo/Modelisation/extrusion.hpp
+2
-12
include/Algo/Modelisation/polyhedron.hpp
include/Algo/Modelisation/polyhedron.hpp
+3
-0
include/Algo/Modelisation/subdivision.h
include/Algo/Modelisation/subdivision.h
+5
-1
include/Algo/Modelisation/subdivision.hpp
include/Algo/Modelisation/subdivision.hpp
+33
-40
include/Algo/ProgressiveMesh/pmesh.hpp
include/Algo/ProgressiveMesh/pmesh.hpp
+5
-5
include/Algo/Selection/collector.hpp
include/Algo/Selection/collector.hpp
+8
-8
include/Topology/generic/cellmarker.h
include/Topology/generic/cellmarker.h
+36
-15
include/Topology/generic/dartmarker.h
include/Topology/generic/dartmarker.h
+35
-20
include/Topology/generic/genericmap.h
include/Topology/generic/genericmap.h
+9
-3
include/Topology/generic/genericmap.hpp
include/Topology/generic/genericmap.hpp
+0
-23
include/Topology/generic/traversorCell.h
include/Topology/generic/traversorCell.h
+10
-2
include/Topology/gmap/embeddedGMap2.h
include/Topology/gmap/embeddedGMap2.h
+14
-20
include/Topology/gmap/gmap0.h
include/Topology/gmap/gmap0.h
+6
-6
include/Topology/gmap/gmap0.hpp
include/Topology/gmap/gmap0.hpp
+3
-3
include/Topology/gmap/gmap1.h
include/Topology/gmap/gmap1.h
+18
-23
include/Topology/gmap/gmap1.hpp
include/Topology/gmap/gmap1.hpp
+97
-64
include/Topology/gmap/gmap2.h
include/Topology/gmap/gmap2.h
+149
-78
include/Topology/gmap/gmap2.hpp
include/Topology/gmap/gmap2.hpp
+44
-46
include/Topology/map/embeddedMap2.h
include/Topology/map/embeddedMap2.h
+2
-2
include/Topology/map/embeddedMap3.h
include/Topology/map/embeddedMap3.h
+2
-2
include/Topology/map/map1.h
include/Topology/map/map1.h
+1
-4
include/Topology/map/map1.hpp
include/Topology/map/map1.hpp
+0
-6
include/Topology/map/map2.h
include/Topology/map/map2.h
+28
-39
include/Topology/map/map2.hpp
include/Topology/map/map2.hpp
+6
-1
include/Topology/map/map3.h
include/Topology/map/map3.h
+2
-12
src/Algo/ImplicitHierarchicalMesh/ihm.cpp
src/Algo/ImplicitHierarchicalMesh/ihm.cpp
+4
-4
src/Topology/generic/attribmap.cpp
src/Topology/generic/attribmap.cpp
+11
-8
src/Topology/generic/genericmap.cpp
src/Topology/generic/genericmap.cpp
+63
-46
src/Topology/gmap/embeddedGMap2.cpp
src/Topology/gmap/embeddedGMap2.cpp
+138
-133
src/Topology/gmap/gmap1.cpp
src/Topology/gmap/gmap1.cpp
+25
-114
src/Topology/gmap/gmap2.cpp
src/Topology/gmap/gmap2.cpp
+480
-319
src/Topology/map/embeddedMap2.cpp
src/Topology/map/embeddedMap2.cpp
+24
-39
src/Topology/map/embeddedMap3.cpp
src/Topology/map/embeddedMap3.cpp
+10
-7
src/Topology/map/map1.cpp
src/Topology/map/map1.cpp
+2
-2
src/Topology/map/map2.cpp
src/Topology/map/map2.cpp
+64
-110
src/Topology/map/map3.cpp
src/Topology/map/map3.cpp
+3
-135
No files found.
Apps/Tuto/tp_master.cpp
View file @
bd0de59b
...
...
@@ -57,16 +57,7 @@ struct PFP: public PFP_STANDARD
typedef
Map2TP
MAP
;
};
/// definition de la carte en global, plus facile
PFP
::
MAP
myMap
;
// handler d'attribut de position par sommet
AttributeHandler
<
PFP
::
VEC3
>
position
;
// handler d'attribut de normale par sommet
AttributeHandler
<
PFP
::
VEC3
>
normal
;
/// encore 1 typedef pour simplifier l'ecriture du code
/// typedef pour simplifier l'ecriture du code
typedef
PFP
::
VEC3
Point3D
;
// Variables pour la gestion des plongements
...
...
include/Algo/Filtering/average.h
View file @
bd0de59b
...
...
@@ -51,30 +51,35 @@ void filterAverageAttribute_OneRing(
TraversorV
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
{
if
(
neigh
&
INSIDE
)
col
.
collectAll
(
d
)
;
else
col
.
collectBorder
(
d
)
;
fa
.
reset
()
;
if
(
neigh
&
INSIDE
)
if
(
!
map
.
isBoundaryVertex
(
d
))
{
switch
(
attIn
.
getOrbit
())
if
(
neigh
&
INSIDE
)
col
.
collectAll
(
d
)
;
else
col
.
collectBorder
(
d
)
;
fa
.
reset
()
;
if
(
neigh
&
INSIDE
)
{
case
VERTEX
:
col
.
applyOnInsideVertices
(
fa
)
;
break
;
case
EDGE
:
col
.
applyOnInsideEdges
(
fa
)
;
break
;
case
FACE
:
col
.
applyOnInsideFaces
(
fa
)
;
break
;
switch
(
attIn
.
getOrbit
())
{
case
VERTEX
:
col
.
applyOnInsideVertices
(
fa
)
;
break
;
case
EDGE
:
col
.
applyOnInsideEdges
(
fa
)
;
break
;
case
FACE
:
col
.
applyOnInsideFaces
(
fa
)
;
break
;
}
}
if
(
neigh
&
BORDER
)
col
.
applyOnBorder
(
fa
)
;
attOut
[
d
]
=
fa
.
getAverage
()
;
}
if
(
neigh
&
BORDER
)
col
.
applyOnBorder
(
fa
)
;
attOut
[
d
]
=
fa
.
getAverage
()
;
else
attOut
[
d
]
=
attIn
[
d
]
;
}
}
...
...
@@ -95,23 +100,28 @@ void filterAverageVertexAttribute_WithinSphere(
TraversorV
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
{
if
(
neigh
&
INSIDE
)
col
.
collectAll
(
d
)
;
else
col
.
collectBorder
(
d
)
;
attOut
[
d
]
=
T
(
0
);
if
(
neigh
&
INSIDE
){
faInside
.
reset
()
;
col
.
applyOnInsideVertices
(
faInside
)
;
attOut
[
d
]
+=
faInside
.
getSum
();
}
if
(
neigh
&
BORDER
){
faBorder
.
reset
(
position
[
d
],
radius
);
col
.
applyOnBorder
(
faBorder
)
;
attOut
[
d
]
+=
faBorder
.
getSum
();
if
(
!
map
.
isBoundaryVertex
(
d
))
{
if
(
neigh
&
INSIDE
)
col
.
collectAll
(
d
)
;
else
col
.
collectBorder
(
d
)
;
attOut
[
d
]
=
T
(
0
);
if
(
neigh
&
INSIDE
){
faInside
.
reset
()
;
col
.
applyOnInsideVertices
(
faInside
)
;
attOut
[
d
]
+=
faInside
.
getSum
();
}
if
(
neigh
&
BORDER
){
faBorder
.
reset
(
position
[
d
],
radius
);
col
.
applyOnBorder
(
faBorder
)
;
attOut
[
d
]
+=
faBorder
.
getSum
();
}
attOut
[
d
]
/=
faInside
.
getCount
()
+
faBorder
.
getCount
()
;
}
attOut
[
d
]
/=
faInside
.
getCount
()
+
faBorder
.
getCount
()
;
else
attOut
[
d
]
=
attIn
[
d
]
;
}
}
...
...
@@ -128,7 +138,7 @@ void filterAverageEdgeAttribute_WithinSphere(
FunctorAverage
<
T
>
fa
(
attIn
)
;
Algo
::
Selection
::
Collector_WithinSphere
<
PFP
>
col
(
map
,
position
,
radius
)
;
Traversor
V
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
Traversor
E
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
{
if
(
neigh
&
INSIDE
)
...
...
@@ -156,7 +166,7 @@ void filterAverageFaceAttribute_WithinSphere(
FunctorAverage
<
T
>
fa
(
attIn
)
;
Algo
::
Selection
::
Collector_WithinSphere
<
PFP
>
col
(
map
,
position
,
radius
)
;
Traversor
V
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
Traversor
F
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
{
if
(
neigh
&
INSIDE
)
...
...
include/Algo/Filtering/average_normals.h
View file @
bd0de59b
...
...
@@ -344,8 +344,6 @@ void filterVNBA(typename PFP::MAP& map, float sigmaN2, float SUSANthreshold, con
long
nbAdapt
=
0
;
long
nbSusan
=
0
;
std
::
cout
<<
"compute new vertices normals.."
<<
std
::
endl
;
TraversorV
<
typename
PFP
::
MAP
>
tv
(
map
,
select
)
;
for
(
Dart
d
=
tv
.
begin
();
d
!=
tv
.
end
();
d
=
tv
.
next
())
{
...
...
@@ -434,8 +432,6 @@ void filterVNBA(typename PFP::MAP& map, float sigmaN2, float SUSANthreshold, con
}
}
std
::
cout
<<
"update face normals.."
<<
std
::
endl
;
// Compute face normals from vertex normals
TraversorF
<
typename
PFP
::
MAP
>
tf
(
map
,
select
)
;
for
(
Dart
d
=
tf
.
begin
();
d
!=
tf
.
end
();
d
=
tf
.
next
())
...
...
@@ -455,8 +451,6 @@ void filterVNBA(typename PFP::MAP& map, float sigmaN2, float SUSANthreshold, con
faceNewNormal
[
d
]
=
newNormal
;
}
std
::
cout
<<
"update vertices positions.."
<<
std
::
endl
;
// Compute new vertices position
computeNewPositionsFromFaceNormals
<
PFP
>
(
map
,
position
,
position2
,
faceArea
,
faceCentroid
,
faceNormal
,
faceNewNormal
,
select
...
...
include/Algo/Filtering/bilateral.h
View file @
bd0de59b
...
...
@@ -67,24 +67,25 @@ void filterBilateral(typename PFP::MAP& map, const typename PFP::TVEC3& position
TraversorV
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
{
// get position & normal of vertex
const
VEC3
&
pos_d
=
position
[
d
]
;
const
VEC3
&
normal_d
=
normal
[
d
]
;
// traversal of incident edges
float
sum
=
0.0
f
,
normalizer
=
0.0
f
;
Traversor2VE
<
typename
PFP
::
MAP
>
te
(
map
,
d
)
;
for
(
Dart
it
=
te
.
begin
();
it
!=
te
.
end
();
it
=
te
.
next
())
if
(
!
map
.
isBoundaryVertex
(
d
))
{
VEC3
vec
=
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
it
,
position
)
;
float
h
=
normal_d
*
vec
;
float
t
=
vec
.
norm
()
;
float
wcs
=
exp
(
(
-
1.0
f
*
(
t
*
t
)
/
(
2.0
f
*
sigmaC
*
sigmaC
)
)
+
(
-
1.0
f
*
(
h
*
h
)
/
(
2.0
f
*
sigmaS
*
sigmaS
)
)
)
;
sum
+=
wcs
*
h
;
normalizer
+=
wcs
;
}
// traversal of incident edges
float
sum
=
0.0
f
,
normalizer
=
0.0
f
;
Traversor2VE
<
typename
PFP
::
MAP
>
te
(
map
,
d
)
;
for
(
Dart
it
=
te
.
begin
();
it
!=
te
.
end
();
it
=
te
.
next
())
{
VEC3
vec
=
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
it
,
position
)
;
float
h
=
normal_d
*
vec
;
float
t
=
vec
.
norm
()
;
float
wcs
=
exp
(
(
-
1.0
f
*
(
t
*
t
)
/
(
2.0
f
*
sigmaC
*
sigmaC
)
)
+
(
-
1.0
f
*
(
h
*
h
)
/
(
2.0
f
*
sigmaS
*
sigmaS
)
)
)
;
sum
+=
wcs
*
h
;
normalizer
+=
wcs
;
}
position2
[
d
]
=
pos_d
+
((
sum
/
normalizer
)
*
normal_d
)
;
position2
[
d
]
=
position
[
d
]
+
((
sum
/
normalizer
)
*
normal
[
d
])
;
}
else
position2
[
d
]
=
position
[
d
]
;
}
}
...
...
@@ -102,39 +103,44 @@ void filterSUSAN(typename PFP::MAP& map, float SUSANthreshold, const typename PF
TraversorV
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
{
// get position & normal of vertex
const
VEC3
&
pos_d
=
position
[
d
]
;
const
VEC3
&
normal_d
=
normal
[
d
]
;
// traversal of incident edges
float
sum
=
0.0
f
,
normalizer
=
0.0
f
;
bool
SUSANregion
=
false
;
Traversor2VE
<
typename
PFP
::
MAP
>
te
(
map
,
d
)
;
for
(
Dart
it
=
te
.
begin
();
it
!=
te
.
end
();
it
=
te
.
next
())
if
(
!
map
.
isBoundaryVertex
(
d
))
{
const
VEC3
&
neighborNormal
=
normal
[
map
.
phi1
(
it
)]
;
float
angle
=
Geom
::
angle
(
normal_d
,
neighborNormal
)
;
if
(
angle
<=
SUSANthreshold
)
// get position & normal of vertex
const
VEC3
&
pos_d
=
position
[
d
]
;
const
VEC3
&
normal_d
=
normal
[
d
]
;
// traversal of incident edges
float
sum
=
0.0
f
,
normalizer
=
0.0
f
;
bool
SUSANregion
=
false
;
Traversor2VE
<
typename
PFP
::
MAP
>
te
(
map
,
d
)
;
for
(
Dart
it
=
te
.
begin
();
it
!=
te
.
end
();
it
=
te
.
next
())
{
VEC3
vec
=
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
it
,
position
)
;
float
h
=
normal_d
*
vec
;
float
t
=
vec
.
norm
()
;
float
wcs
=
exp
(
(
-
1.0
f
*
(
t
*
t
)
/
(
2.0
f
*
sigmaC
*
sigmaC
)
)
+
(
-
1.0
f
*
(
h
*
h
)
/
(
2.0
f
*
sigmaS
*
sigmaS
)
)
);
sum
+=
wcs
*
h
;
normalizer
+=
wcs
;
const
VEC3
&
neighborNormal
=
normal
[
map
.
phi1
(
it
)]
;
float
angle
=
Geom
::
angle
(
normal_d
,
neighborNormal
)
;
if
(
angle
<=
SUSANthreshold
)
{
VEC3
vec
=
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
it
,
position
)
;
float
h
=
normal_d
*
vec
;
float
t
=
vec
.
norm
()
;
float
wcs
=
exp
(
(
-
1.0
f
*
(
t
*
t
)
/
(
2.0
f
*
sigmaC
*
sigmaC
)
)
+
(
-
1.0
f
*
(
h
*
h
)
/
(
2.0
f
*
sigmaS
*
sigmaS
)
)
);
sum
+=
wcs
*
h
;
normalizer
+=
wcs
;
}
else
SUSANregion
=
true
;
}
else
SUSANregion
=
true
;
}
if
(
SUSANregion
)
nbSusan
++
;
nbTot
++
;
if
(
SUSANregion
)
nbSusan
++
;
nbTot
++
;
if
(
normalizer
!=
0.0
f
)
position2
[
d
]
=
pos_d
+
((
sum
/
normalizer
)
*
normal_d
)
;
if
(
normalizer
!=
0.0
f
)
position2
[
d
]
=
pos_d
+
((
sum
/
normalizer
)
*
normal_d
)
;
else
position2
[
d
]
=
pos_d
;
}
else
position2
[
d
]
=
pos
_d
;
position2
[
d
]
=
pos
ition
[
d
]
;
}
// CGoGNout <<" susan rate = "<< float(nbSusan)/float(nbTot)<<CGoGNendl;
...
...
include/Algo/Filtering/taubin.h
View file @
bd0de59b
...
...
@@ -53,13 +53,18 @@ void filterTaubin(typename PFP::MAP& map, typename PFP::TVEC3& position, typenam
{
mv
.
mark
(
d
);
c
.
collectBorder
(
d
)
;
fa1
.
reset
()
;
c
.
applyOnBorder
(
fa1
)
;
VEC3
p
=
position
[
d
]
;
VEC3
displ
=
fa1
.
getAverage
()
-
p
;
displ
*=
lambda
;
position2
[
d
]
=
p
+
displ
;
if
(
!
map
.
isBoundaryVertex
(
d
))
{
c
.
collectBorder
(
d
)
;
fa1
.
reset
()
;
c
.
applyOnBorder
(
fa1
)
;
VEC3
p
=
position
[
d
]
;
VEC3
displ
=
fa1
.
getAverage
()
-
p
;
displ
*=
lambda
;
position2
[
d
]
=
p
+
displ
;
}
else
position2
[
d
]
=
position
[
d
]
;
}
}
...
...
@@ -71,13 +76,18 @@ void filterTaubin(typename PFP::MAP& map, typename PFP::TVEC3& position, typenam
{
mv
.
unmark
(
d
);
c
.
collectBorder
(
d
)
;
fa2
.
reset
()
;
c
.
applyOnBorder
(
fa2
)
;
VEC3
p
=
position2
[
d
]
;
VEC3
displ
=
fa2
.
getAverage
()
-
p
;
displ
*=
mu
;
position
[
d
]
=
p
+
displ
;
if
(
!
map
.
isBoundaryVertex
(
d
))
{
c
.
collectBorder
(
d
)
;
fa2
.
reset
()
;
c
.
applyOnBorder
(
fa2
)
;
VEC3
p
=
position2
[
d
]
;
VEC3
displ
=
fa2
.
getAverage
()
-
p
;
displ
*=
mu
;
position
[
d
]
=
p
+
displ
;
}
else
position
[
d
]
=
position2
[
d
]
;
}
}
}
...
...
@@ -93,22 +103,28 @@ void filterTaubin_modified(typename PFP::MAP& map, typename PFP::TVEC3& position
const
float
lambda
=
0.6307
;
const
float
mu
=
-
0.6732
;
CellMarkerNoUnmark
mv
(
map
,
VERTEX
)
;
FunctorAverageOnSphereBorder
<
PFP
,
typename
PFP
::
VEC3
>
fa1
(
map
,
position
,
position
)
;
Algo
::
Selection
::
Collector_WithinSphere
<
PFP
>
c1
(
map
,
position
,
radius
)
;
CellMarkerNoUnmark
mv
(
map
,
VERTEX
)
;
for
(
Dart
d
=
map
.
begin
();
d
!=
map
.
end
();
map
.
next
(
d
))
{
if
(
select
(
d
)
&&
!
mv
.
isMarked
(
d
))
{
mv
.
mark
(
d
);
c1
.
collectBorder
(
d
)
;
VEC3
center
=
position
[
d
]
;
fa1
.
reset
(
center
,
radius
)
;
c1
.
applyOnBorder
(
fa1
)
;
VEC3
displ
=
fa1
.
getAverage
()
-
center
;
displ
*=
lambda
;
position2
[
d
]
=
center
+
displ
;
if
(
!
map
.
isBoundaryVertex
(
d
))
{
c1
.
collectBorder
(
d
)
;
VEC3
center
=
position
[
d
]
;
fa1
.
reset
(
center
,
radius
)
;
c1
.
applyOnBorder
(
fa1
)
;
VEC3
displ
=
fa1
.
getAverage
()
-
center
;
displ
*=
lambda
;
position2
[
d
]
=
center
+
displ
;
}
else
position2
[
d
]
=
position
[
d
]
;
}
}
...
...
@@ -121,13 +137,18 @@ void filterTaubin_modified(typename PFP::MAP& map, typename PFP::TVEC3& position
{
mv
.
unmark
(
d
);
c2
.
collectBorder
(
d
)
;
VEC3
center
=
position2
[
d
]
;
fa2
.
reset
(
center
,
radius
)
;
c2
.
applyOnBorder
(
fa2
)
;
VEC3
displ
=
fa2
.
getAverage
()
-
center
;
displ
*=
mu
;
position
[
d
]
=
center
+
displ
;
if
(
!
map
.
isBoundaryVertex
(
d
))
{
c2
.
collectBorder
(
d
)
;
VEC3
center
=
position2
[
d
]
;
fa2
.
reset
(
center
,
radius
)
;
c2
.
applyOnBorder
(
fa2
)
;
VEC3
displ
=
fa2
.
getAverage
()
-
center
;
displ
*=
mu
;
position
[
d
]
=
center
+
displ
;
}
else
position
[
d
]
=
position2
[
d
]
;
}
}
}
...
...
include/Algo/ImplicitHierarchicalMesh/ihm.h
View file @
bd0de59b
...
...
@@ -81,11 +81,11 @@ public:
Dart
phi2
(
Dart
d
)
;
Dart
alpha0
(
Dart
d
);
Dart
alpha0
(
Dart
d
)
;
Dart
alpha1
(
Dart
d
);
Dart
alpha1
(
Dart
d
)
;
Dart
alpha_1
(
Dart
d
);
Dart
alpha_1
(
Dart
d
)
;
virtual
Dart
begin
()
;
...
...
@@ -97,10 +97,10 @@ public:
virtual
bool
foreach_dart_of_edge
(
Dart
d
,
FunctorType
&
f
,
unsigned
int
thread
=
0
)
;
bool
foreach_dart_of_oriented_face
(
Dart
d
,
FunctorType
&
f
,
unsigned
int
thread
=
0
)
;
virtual
bool
foreach_dart_of_oriented_face
(
Dart
d
,
FunctorType
&
f
,
unsigned
int
thread
=
0
)
;
virtual
bool
foreach_dart_of_face
(
Dart
d
,
FunctorType
&
f
,
unsigned
int
thread
=
0
)
;
bool
foreach_dart_of_oriented_volume
(
Dart
d
,
FunctorType
&
f
,
unsigned
int
thread
=
0
)
;
virtual
bool
foreach_dart_of_oriented_volume
(
Dart
d
,
FunctorType
&
f
,
unsigned
int
thread
=
0
)
;
virtual
bool
foreach_dart_of_volume
(
Dart
d
,
FunctorType
&
f
,
unsigned
int
thread
=
0
)
;
virtual
bool
foreach_dart_of_cc
(
Dart
d
,
FunctorType
&
f
,
unsigned
int
thread
=
0
)
;
...
...
include/Algo/ImplicitHierarchicalMesh/ihm.hpp
View file @
bd0de59b
...
...
@@ -142,7 +142,7 @@ inline Dart ImplicitHierarchicalMap::alpha_1(Dart d)
inline
Dart
ImplicitHierarchicalMap
::
begin
()
{
Dart
d
=
Map2
::
begin
()
;
while
(
m_dartLevel
[
d
]
>
m_curLevel
)
while
(
d
!=
Map2
::
end
()
&&
m_dartLevel
[
d
]
>
m_curLevel
)
Map2
::
next
(
d
)
;
return
d
;
}
...
...
include/Algo/LinearSolving/matrixSetup.h
View file @
bd0de59b
...
...
@@ -184,21 +184,14 @@ public:
bool
operator
()(
Dart
d
)
{
solver
->
begin_row
()
;
Dart
it
=
d
;
REAL
aii
=
0
;
do
Traversor2VE
<
typename
PFP
::
MAP
>
t
(
this
->
m_map
,
d
)
;
for
(
Dart
it
=
t
.
begin
();
it
!=
t
.
end
();
it
=
t
.
next
())
{
REAL
aij
=
1
;
aii
+=
aij
;
solver
->
add_coefficient
(
indexTable
[
this
->
m_map
.
phi1
(
it
)],
aij
)
;
Dart
dboundary
=
this
->
m_map
.
phi_1
(
it
)
;
if
(
this
->
m_map
.
phi2
(
dboundary
)
==
dboundary
)
{
aii
+=
aij
;
solver
->
add_coefficient
(
indexTable
[
dboundary
],
aij
)
;
}
it
=
this
->
m_map
.
alpha1
(
it
)
;
}
while
(
it
!=
d
)
;
}
solver
->
add_coefficient
(
indexTable
[
d
],
-
aii
)
;
solver
->
normalize_row
()
;
solver
->
set_right_hand_side
(
0
)
;
...
...
@@ -234,21 +227,14 @@ public:
bool
operator
()(
Dart
d
)
{
solver
->
begin_row
()
;
Dart
it
=
d
;
REAL
aii
=
0
;
do
Traversor2VE
<
typename
PFP
::
MAP
>
t
(
this
->
m_map
,
d
)
;
for
(
Dart
it
=
t
.
begin
();
it
!=
t
.
end
();
it
=
t
.
next
())
{
REAL
aij
=
1
;
aii
+=
aij
;
solver
->
add_coefficient
(
indexTable
[
this
->
m_map
.
phi1
(
it
)],
aij
)
;
Dart
dboundary
=
this
->
m_map
.
phi_1
(
it
)
;
if
(
this
->
m_map
.
phi2
(
dboundary
)
==
dboundary
)
{
aii
+=
aij
;
solver
->
add_coefficient
(
indexTable
[
dboundary
],
aij
)
;
}
it
=
this
->
m_map
.
alpha1
(
it
)
;
}
while
(
it
!=
d
)
;
}
solver
->
add_coefficient
(
indexTable
[
d
],
-
aii
)
;
solver
->
normalize_row
()
;
solver
->
set_right_hand_side
(
attrTable
[
d
])
;
...
...
@@ -286,21 +272,14 @@ public:
bool
operator
()(
Dart
d
)
{
solver
->
begin_row
()
;
Dart
it
=
d
;
REAL
aii
=
0
;
do
Traversor2VE
<
typename
PFP
::
MAP
>
t
(
this
->
m_map
,
d
)
;
for
(
Dart
it
=
t
.
begin
();
it
!=
t
.
end
();
it
=
t
.
next
())
{
REAL
aij
=
1
;
aii
+=
aij
;
solver
->
add_coefficient
(
indexTable
[
this
->
m_map
.
phi1
(
it
)],
aij
)
;
Dart
dboundary
=
this
->
m_map
.
phi_1
(
it
)
;
if
(
this
->
m_map
.
phi2
(
dboundary
)
==
dboundary
)
{
aii
+=
aij
;
solver
->
add_coefficient
(
indexTable
[
dboundary
],
aij
)
;
}
it
=
this
->
m_map
.
alpha1
(
it
)
;
}
while
(
it
!=
d
)
;
}
solver
->
add_coefficient
(
indexTable
[
d
],
-
aii
)
;
solver
->
normalize_row
()
;
solver
->
set_right_hand_side
((
attrTable
[
d
])[
coord
])
;
...
...
@@ -338,21 +317,16 @@ public:
bool
operator
()(
Dart
d
)
{
solver
->
begin_row
()
;
Dart
it
=
d
;
REAL
vArea
=
vertexArea
[
d
]
;
REAL
aii
=
0
;
Dart
it
=
d
;
// Traversor2VE<typename PFP::MAP> t(this->m_map, d) ;
// for(Dart it = t.begin(); it != t.end(); it = t.next())
do
{
REAL
aij
=
edgeWeight
[
it
]
/
vArea
;
aii
+=
aij
;
solver
->
add_coefficient
(
indexTable
[
this
->
m_map
.
phi1
(
it
)],
aij
)
;
Dart
dboundary
=
this
->
m_map
.
phi_1
(
it
)
;
if
(
this
->
m_map
.
phi2
(
dboundary
)
==
dboundary
)
{
aij
=
edgeWeight
[
dboundary
]
/
vArea
;
aii
+=
aij
;
solver
->
add_coefficient
(
indexTable
[
dboundary
],
aij
)
;
}
it
=
this
->
m_map
.
alpha1
(
it
)
;
}
while
(
it
!=
d
)
;
solver
->
add_coefficient
(
indexTable
[
d
],
-
aii
)
;
...
...
@@ -394,23 +368,15 @@ public:
bool
operator
()(
Dart
d
)
{
solver
->
begin_row
()
;
Dart
it
=
d
;
REAL
vArea
=
vertexArea
[
d
]
;
REAL
aii
=
0
;
do
Traversor2VE
<
typename
PFP
::
MAP
>
t
(
this
->
m_map
,
d
)
;
for
(
Dart
it
=
t
.
begin
();
it
!=
t
.
end
();
it
=
t
.
next
())
{
REAL
aij
=
edgeWeight
[
it
]
/
vArea
;
aii
+=
aij
;
solver
->
add_coefficient
(
indexTable
[
this
->
m_map
.
phi1
(
it
)],
aij
)
;
Dart
dboundary
=
this
->
m_map
.
phi_1
(
it
)
;
if
(
this
->
m_map
.
phi2
(
dboundary
)
==
dboundary
)
{
aij
=
edgeWeight
[
dboundary
]
/
vArea
;
aii
+=
aij
;
solver
->
add_coefficient
(
indexTable
[
dboundary
],
aij
)
;
}
it
=
this
->
m_map
.
alpha1
(
it
)
;
}
while
(
it
!=
d
)
;
}
solver
->
add_coefficient
(
indexTable
[
d
],
-
aii
)
;
solver
->
normalize_row
()
;
solver
->
set_right_hand_side
(
attrTable
[
d
])
;
...
...
@@ -452,23 +418,15 @@ public:
bool
operator
()(
Dart
d
)
{
solver
->
begin_row
()
;
Dart
it
=
d
;
REAL
vArea
=
vertexArea
[
d
]
;
REAL
aii
=
0
;
do
Traversor2VE
<
typename
PFP
::
MAP
>
t
(
this
->
m_map
,
d
)
;
for
(
Dart
it
=
t
.
begin
();
it
!=
t
.
end
();
it
=
t
.
next
())
{
REAL
aij
=
edgeWeight
[
it
]
/
vArea
;
aii
+=
aij
;
solver
->
add_coefficient
(
indexTable
[
this
->
m_map
.
phi1
(
it
)],
aij
)
;
Dart
dboundary
=
this
->
m_map
.
phi_1
(
it
)
;
if
(
this
->
m_map
.
phi2
(
dboundary
)
==
dboundary
)
{
aij
=
edgeWeight
[
dboundary
]
/
vArea
;
aii
+=
aij
;
solver
->
add_coefficient
(
indexTable
[
dboundary
],
aij
)
;
}
it
=
this
->
m_map
.
alpha1
(
it
)
;
}
while
(
it
!=
d
)
;
}
solver
->
add_coefficient
(
indexTable
[
d
],
-
aii
)
;
solver
->
normalize_row
()
;
solver
->
set_right_hand_side
((
attrTable
[
d
])[
coord
])
;
...
...
include/Algo/Modelisation/extrusion.hpp
View file @
bd0de59b
...
...
@@ -299,18 +299,8 @@ Dart extrudeFace(typename PFP::MAP& the_map, typename PFP::TVEC3& positions, Dar
cc
=
the_map
.
alpha1
(
cc
);
}
while
(
cc
!=
c
);
//merge central faces by removing edges
bool
notFinished
=
true
;
do
{
Dart
d1
=
the_map
.
alpha1
(
cc
);
if
(
d1
==
cc
)
// last edge is pending edge inside of face
notFinished
=
false
;
the_map
.
deleteFace
(
cc
);
cc
=
d1
;
}
while
(
notFinished
);
the_map
.
closeHole
(
the_map
.
phi1
(
the_map
.
phi1
(
d
)));
// delete the central vertex