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
Hurstel
CGoGN
Commits
0ea6813e
Commit
0ea6813e
authored
Feb 17, 2014
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update load & save
parent
cb65f5ab
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
282 additions
and
194 deletions
+282
-194
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
+1
-1
include/Topology/generic/genericmap.h
include/Topology/generic/genericmap.h
+6
-8
include/Topology/generic/mapMono.h
include/Topology/generic/mapMono.h
+9
-4
include/Topology/generic/mapMono.hpp
include/Topology/generic/mapMono.hpp
+17
-17
include/Topology/generic/mapMulti.h
include/Topology/generic/mapMulti.h
+10
-4
include/Topology/generic/mapMulti.hpp
include/Topology/generic/mapMulti.hpp
+18
-18
include/Topology/gmap/gmap0.h
include/Topology/gmap/gmap0.h
+2
-1
include/Topology/gmap/gmap0.hpp
include/Topology/gmap/gmap0.hpp
+8
-3
include/Topology/gmap/gmap1.h
include/Topology/gmap/gmap1.h
+2
-1
include/Topology/gmap/gmap1.hpp
include/Topology/gmap/gmap1.hpp
+8
-3
include/Topology/gmap/gmap2.h
include/Topology/gmap/gmap2.h
+2
-1
include/Topology/gmap/gmap2.hpp
include/Topology/gmap/gmap2.hpp
+8
-3
include/Topology/gmap/gmap3.h
include/Topology/gmap/gmap3.h
+2
-1
include/Topology/gmap/gmap3.hpp
include/Topology/gmap/gmap3.hpp
+8
-3
include/Topology/ihmap/ihm2.hpp
include/Topology/ihmap/ihm2.hpp
+1
-1
include/Topology/map/map1.h
include/Topology/map/map1.h
+2
-1
include/Topology/map/map1.hpp
include/Topology/map/map1.hpp
+8
-4
include/Topology/map/map2.h
include/Topology/map/map2.h
+2
-1
include/Topology/map/map2.hpp
include/Topology/map/map2.hpp
+8
-3
include/Topology/map/map3.h
include/Topology/map/map3.h
+2
-1
include/Topology/map/map3.hpp
include/Topology/map/map3.hpp
+8
-3
src/Topology/generic/genericmap.cpp
src/Topology/generic/genericmap.cpp
+31
-42
src/Topology/generic/mapMono.cpp
src/Topology/generic/mapMono.cpp
+43
-35
src/Topology/generic/mapMulti.cpp
src/Topology/generic/mapMulti.cpp
+76
-35
No files found.
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
View file @
0ea6813e
...
...
@@ -68,7 +68,7 @@ AttributeHandler_IHM<T, ORBIT> ImplicitHierarchicalMap3::getAttribute(const std:
inline
void
ImplicitHierarchicalMap3
::
update_topo_shortcuts
()
{
Map3
::
update_topo_shortcuts
();
//
Map3::update_topo_shortcuts();
m_dartLevel
=
Map3
::
getAttribute
<
unsigned
int
,
DART
>
(
"dartLevel"
)
;
m_faceId
=
Map3
::
getAttribute
<
unsigned
int
,
DART
>
(
"faceId"
)
;
m_edgeId
=
Map3
::
getAttribute
<
unsigned
int
,
DART
>
(
"edgeId"
)
;
...
...
include/Topology/generic/genericmap.h
View file @
0ea6813e
...
...
@@ -344,17 +344,13 @@ public:
/****************************************
* SAVE & LOAD *
****************************************/
/**
* update the pointer of embedding vector after loading
*/
void
update_m_emb_afterLoad
();
protected:
/**
*
update the markTables and recursively from real type the topo shortcut pointer
s
*
restore embedding / markers / quick traversal shortcut
s
*/
v
irtual
void
update_topo
_shortcuts
();
v
oid
restore
_shortcuts
();
public:
/**
* Save map in a binary file
* @param filename the file name
...
...
@@ -379,11 +375,13 @@ public:
*/
void
dumpAttributesAndMarkers
()
;
protected:
/**
* update topo relation after compacting the container:
*/
virtual
void
compactTopoRelations
(
const
std
::
vector
<
unsigned
int
>&
oldnew
)
=
0
;
public:
/**
* compact the map
*/
...
...
include/Topology/generic/mapMono.h
View file @
0ea6813e
...
...
@@ -70,6 +70,9 @@ protected:
inline
void
addPermutation
();
virtual
unsigned
int
getNbInvolutions
()
const
=
0
;
virtual
unsigned
int
getNbPermutations
()
const
=
0
;
template
<
int
I
>
inline
Dart
getInvolution
(
Dart
d
)
const
;
...
...
@@ -80,16 +83,16 @@ protected:
inline
Dart
getPermutationInv
(
Dart
d
)
const
;
template
<
int
I
>
inline
void
permuta
tionSew
(
Dart
d
,
Dart
e
);
inline
void
involu
tionSew
(
Dart
d
,
Dart
e
);
template
<
int
I
>
inline
void
permuta
tionUnsew
(
Dart
d
);
inline
void
involu
tionUnsew
(
Dart
d
);
template
<
int
I
>
inline
void
involu
tionSew
(
Dart
d
,
Dart
e
);
inline
void
permuta
tionSew
(
Dart
d
,
Dart
e
);
template
<
int
I
>
inline
void
involu
tionUnsew
(
Dart
d
);
inline
void
permuta
tionUnsew
(
Dart
d
);
inline
virtual
void
compactTopoRelations
(
const
std
::
vector
<
unsigned
int
>&
oldnew
);
...
...
@@ -125,6 +128,8 @@ public:
bool
loadMapBin
(
const
std
::
string
&
filename
);
bool
copyFrom
(
const
GenericMap
&
map
);
void
restore_topo_shortcuts
();
}
;
}
//namespace CGoGN
...
...
include/Topology/generic/mapMono.hpp
View file @
0ea6813e
...
...
@@ -107,6 +107,23 @@ inline Dart MapMono::getPermutationInv(Dart d) const
return
(
*
m_permutation_inv
[
I
])[
d
.
index
];
}
template
<
int
I
>
inline
void
MapMono
::
involutionSew
(
Dart
d
,
Dart
e
)
{
assert
((
*
m_involution
[
I
])[
d
.
index
]
==
d
)
;
assert
((
*
m_involution
[
I
])[
e
.
index
]
==
e
)
;
(
*
m_involution
[
I
])[
d
.
index
]
=
e
;
(
*
m_involution
[
I
])[
e
.
index
]
=
d
;
}
template
<
int
I
>
inline
void
MapMono
::
involutionUnsew
(
Dart
d
)
{
Dart
e
=
(
*
m_involution
[
I
])[
d
.
index
]
;
(
*
m_involution
[
I
])[
d
.
index
]
=
d
;
(
*
m_involution
[
I
])[
e
.
index
]
=
e
;
}
template
<
int
I
>
inline
void
MapMono
::
permutationSew
(
Dart
d
,
Dart
e
)
{
...
...
@@ -129,23 +146,6 @@ inline void MapMono::permutationUnsew(Dart d)
(
*
m_permutation_inv
[
I
])[
e
.
index
]
=
e
;
}
template
<
int
I
>
inline
void
MapMono
::
involutionSew
(
Dart
d
,
Dart
e
)
{
assert
((
*
m_involution
[
I
])[
d
.
index
]
==
d
)
;
assert
((
*
m_involution
[
I
])[
e
.
index
]
==
e
)
;
(
*
m_involution
[
I
])[
d
.
index
]
=
e
;
(
*
m_involution
[
I
])[
e
.
index
]
=
d
;
}
template
<
int
I
>
inline
void
MapMono
::
involutionUnsew
(
Dart
d
)
{
Dart
e
=
(
*
m_involution
[
I
])[
d
.
index
]
;
(
*
m_involution
[
I
])[
d
.
index
]
=
d
;
(
*
m_involution
[
I
])[
e
.
index
]
=
e
;
}
inline
void
MapMono
::
compactTopoRelations
(
const
std
::
vector
<
unsigned
int
>&
oldnew
)
{
for
(
unsigned
int
i
=
m_attribs
[
DART
].
begin
();
i
!=
m_attribs
[
DART
].
end
();
m_attribs
[
DART
].
next
(
i
))
...
...
include/Topology/generic/mapMulti.h
View file @
0ea6813e
...
...
@@ -33,6 +33,7 @@ namespace CGoGN
class
MapMulti
:
public
GenericMap
{
template
<
typename
MAP
>
friend
class
DartMarkerTmpl
;
template
<
typename
MAP
>
friend
class
DartMarkerStore
;
public:
MapMulti
()
...
...
@@ -137,6 +138,9 @@ protected:
inline
void
addPermutation
();
virtual
unsigned
int
getNbInvolutions
()
const
=
0
;
virtual
unsigned
int
getNbPermutations
()
const
=
0
;
template
<
int
I
>
inline
Dart
getInvolution
(
Dart
d
)
const
;
...
...
@@ -147,16 +151,16 @@ protected:
inline
Dart
getPermutationInv
(
Dart
d
)
const
;
template
<
int
I
>
inline
void
permuta
tionSew
(
Dart
d
,
Dart
e
);
inline
void
involu
tionSew
(
Dart
d
,
Dart
e
);
template
<
int
I
>
inline
void
permuta
tionUnsew
(
Dart
d
);
inline
void
involu
tionUnsew
(
Dart
d
);
template
<
int
I
>
inline
void
involu
tionSew
(
Dart
d
,
Dart
e
);
inline
void
permuta
tionSew
(
Dart
d
,
Dart
e
);
template
<
int
I
>
inline
void
involu
tionUnsew
(
Dart
d
);
inline
void
permuta
tionUnsew
(
Dart
d
);
inline
virtual
void
compactTopoRelations
(
const
std
::
vector
<
unsigned
int
>&
oldnew
);
...
...
@@ -283,6 +287,8 @@ public:
bool
loadMapBin
(
const
std
::
string
&
filename
);
bool
copyFrom
(
const
GenericMap
&
map
);
void
restore_topo_shortcuts
();
}
;
}
//namespace CGoGN
...
...
include/Topology/generic/mapMulti.hpp
View file @
0ea6813e
...
...
@@ -224,6 +224,24 @@ inline Dart MapMulti::getPermutationInv(Dart d) const
return
(
*
m_permutation_inv
[
I
])[
dartIndex
(
d
)];
}
template
<
int
I
>
inline
void
MapMulti
::
involutionSew
(
Dart
d
,
Dart
e
)
{
assert
((
*
m_involution
[
I
])[
dartIndex
(
d
)]
==
d
)
;
assert
((
*
m_involution
[
I
])[
dartIndex
(
e
)]
==
e
)
;
(
*
m_involution
[
I
])[
dartIndex
(
d
)]
=
e
;
(
*
m_involution
[
I
])[
dartIndex
(
e
)]
=
d
;
}
template
<
int
I
>
inline
void
MapMulti
::
involutionUnsew
(
Dart
d
)
{
unsigned
int
d_index
=
dartIndex
(
d
);
Dart
e
=
(
*
m_involution
[
I
])[
d_index
]
;
(
*
m_involution
[
I
])[
d_index
]
=
d
;
(
*
m_involution
[
I
])[
dartIndex
(
e
)]
=
e
;
}
template
<
int
I
>
inline
void
MapMulti
::
permutationSew
(
Dart
d
,
Dart
e
)
{
...
...
@@ -250,24 +268,6 @@ inline void MapMulti::permutationUnsew(Dart d)
(
*
m_permutation_inv
[
I
])[
e_index
]
=
e
;
}
template
<
int
I
>
inline
void
MapMulti
::
involutionSew
(
Dart
d
,
Dart
e
)
{
assert
((
*
m_involution
[
I
])[
dartIndex
(
d
)]
==
d
)
;
assert
((
*
m_involution
[
I
])[
dartIndex
(
e
)]
==
e
)
;
(
*
m_involution
[
I
])[
dartIndex
(
d
)]
=
e
;
(
*
m_involution
[
I
])[
dartIndex
(
e
)]
=
d
;
}
template
<
int
I
>
inline
void
MapMulti
::
involutionUnsew
(
Dart
d
)
{
unsigned
int
d_index
=
dartIndex
(
d
);
Dart
e
=
(
*
m_involution
[
I
])[
d_index
]
;
(
*
m_involution
[
I
])[
d_index
]
=
d
;
(
*
m_involution
[
I
])[
dartIndex
(
e
)]
=
e
;
}
inline
void
MapMulti
::
compactTopoRelations
(
const
std
::
vector
<
unsigned
int
>&
oldnew
)
{
for
(
unsigned
int
i
=
m_attribs
[
DART
].
begin
();
i
!=
m_attribs
[
DART
].
end
();
m_attribs
[
DART
].
next
(
i
))
...
...
include/Topology/gmap/gmap0.h
View file @
0ea6813e
...
...
@@ -55,7 +55,8 @@ public:
virtual
void
clear
(
bool
removeAttrib
);
virtual
void
update_topo_shortcuts
();
virtual
unsigned
int
getNbInvolutions
()
const
;
virtual
unsigned
int
getNbPermutations
()
const
;
/*! @name Basic Topological Operators
* Access and Modification
...
...
include/Topology/gmap/gmap0.hpp
View file @
0ea6813e
...
...
@@ -60,10 +60,15 @@ inline void GMap0<MAP_IMPL>::clear(bool removeAttrib)
}
template
<
typename
MAP_IMPL
>
inline
void
GMap0
<
MAP_IMPL
>::
update_topo_shortcuts
()
inline
unsigned
int
GMap0
<
MAP_IMPL
>::
getNbInvolutions
()
const
{
MAP_IMPL
::
update_topo_shortcuts
();
// m_beta0 = getRelation("beta0");
return
1
;
}
template
<
typename
MAP_IMPL
>
inline
unsigned
int
GMap0
<
MAP_IMPL
>::
getNbPermutations
()
const
{
return
0
;
}
/*! @name Basic Topological Operators
...
...
include/Topology/gmap/gmap1.h
View file @
0ea6813e
...
...
@@ -53,7 +53,8 @@ public:
virtual
void
clear
(
bool
removeAttrib
);
virtual
void
update_topo_shortcuts
();
virtual
unsigned
int
getNbInvolutions
()
const
;
virtual
unsigned
int
getNbPermutations
()
const
;
/*! @name Basic Topological Operators
* Access and Modification
...
...
include/Topology/gmap/gmap1.hpp
View file @
0ea6813e
...
...
@@ -58,10 +58,15 @@ inline void GMap1<MAP_IMPL>::clear(bool removeAttrib)
}
template
<
typename
MAP_IMPL
>
inline
void
GMap1
<
MAP_IMPL
>::
update_topo_shortcuts
()
inline
unsigned
int
GMap1
<
MAP_IMPL
>::
getNbInvolutions
()
const
{
ParentMap
::
update_topo_shortcuts
();
// m_beta1 = getRelation("beta1");
return
1
+
ParentMap
::
getNbInvolutions
();
}
template
<
typename
MAP_IMPL
>
inline
unsigned
int
GMap1
<
MAP_IMPL
>::
getNbPermutations
()
const
{
return
ParentMap
::
getNbPermutations
();
}
/*! @name Basic Topological Operators
...
...
include/Topology/gmap/gmap2.h
View file @
0ea6813e
...
...
@@ -60,7 +60,8 @@ public:
virtual
void
clear
(
bool
removeAttrib
);
virtual
void
update_topo_shortcuts
();
virtual
unsigned
int
getNbInvolutions
()
const
;
virtual
unsigned
int
getNbPermutations
()
const
;
/*! @name Basic Topological Operators
* Access and Modification
...
...
include/Topology/gmap/gmap2.hpp
View file @
0ea6813e
...
...
@@ -58,10 +58,15 @@ inline void GMap2<MAP_IMPL>::clear(bool removeAttrib)
}
template
<
typename
MAP_IMPL
>
inline
void
GMap2
<
MAP_IMPL
>::
update_topo_shortcuts
()
inline
unsigned
int
GMap2
<
MAP_IMPL
>::
getNbInvolutions
()
const
{
ParentMap
::
update_topo_shortcuts
();
// m_beta2 = getRelation("beta2");
return
1
+
ParentMap
::
getNbInvolutions
();
}
template
<
typename
MAP_IMPL
>
inline
unsigned
int
GMap2
<
MAP_IMPL
>::
getNbPermutations
()
const
{
return
ParentMap
::
getNbPermutations
();
}
/*! @name Basic Topological Operators
...
...
include/Topology/gmap/gmap3.h
View file @
0ea6813e
...
...
@@ -66,7 +66,8 @@ public:
virtual
void
clear
(
bool
removeAttrib
);
virtual
void
update_topo_shortcuts
();
virtual
unsigned
int
getNbInvolutions
()
const
;
virtual
unsigned
int
getNbPermutations
()
const
;
/*! @name Basic Topological Operators
* Access and Modification
...
...
include/Topology/gmap/gmap3.hpp
View file @
0ea6813e
...
...
@@ -60,10 +60,15 @@ inline void GMap3<MAP_IMPL>::clear(bool removeAttrib)
}
template
<
typename
MAP_IMPL
>
inline
void
GMap3
<
MAP_IMPL
>::
update_topo_shortcuts
()
inline
unsigned
int
GMap3
<
MAP_IMPL
>::
getNbInvolutions
()
const
{
ParentMap
::
update_topo_shortcuts
();
// m_beta3 = getRelation("beta3");
return
1
+
ParentMap
::
getNbInvolutions
();
}
template
<
typename
MAP_IMPL
>
inline
unsigned
int
GMap3
<
MAP_IMPL
>::
getNbPermutations
()
const
{
return
ParentMap
::
getNbPermutations
();
}
/*! @name Basic Topological Operators
...
...
include/Topology/ihmap/ihm2.hpp
View file @
0ea6813e
...
...
@@ -60,7 +60,7 @@ AttributeHandler_IHM<T, ORBIT> ImplicitHierarchicalMap2::getAttribute(const std:
inline
void
ImplicitHierarchicalMap2
::
update_topo_shortcuts
()
{
Map2
::
update_topo_shortcuts
();
//
Map2::update_topo_shortcuts();
m_dartLevel
=
Map2
::
getAttribute
<
unsigned
int
,
DART
>
(
"dartLevel"
)
;
m_edgeId
=
Map2
::
getAttribute
<
unsigned
int
,
DART
>
(
"edgeId"
)
;
...
...
include/Topology/map/map1.h
View file @
0ea6813e
...
...
@@ -59,7 +59,8 @@ public:
virtual
void
clear
(
bool
removeAttrib
);
virtual
void
update_topo_shortcuts
();
virtual
unsigned
int
getNbInvolutions
()
const
;
virtual
unsigned
int
getNbPermutations
()
const
;
/*! @name Basic Topological Operators
* Access and Modification
...
...
include/Topology/map/map1.hpp
View file @
0ea6813e
...
...
@@ -60,11 +60,15 @@ inline void Map1<MAP_IMPL>::clear(bool removeAttrib)
}
template
<
typename
MAP_IMPL
>
inline
void
Map1
<
MAP_IMPL
>::
update_topo_shortcuts
()
inline
unsigned
int
Map1
<
MAP_IMPL
>::
getNbInvolutions
()
const
{
MAP_IMPL
::
update_topo_shortcuts
();
// m_phi1 = MAP::getRelation("phi1");
// m_phi_1 = MAP::getRelation("phi_1");
return
0
;
}
template
<
typename
MAP_IMPL
>
inline
unsigned
int
Map1
<
MAP_IMPL
>::
getNbPermutations
()
const
{
return
1
;
}
/*! @name Basic Topological Operators
...
...
include/Topology/map/map2.h
View file @
0ea6813e
...
...
@@ -72,7 +72,8 @@ public:
virtual
void
clear
(
bool
removeAttrib
);
virtual
void
update_topo_shortcuts
();
virtual
unsigned
int
getNbInvolutions
()
const
;
virtual
unsigned
int
getNbPermutations
()
const
;
/*! @name Basic Topological Operators
* Access and Modification
...
...
include/Topology/map/map2.hpp
View file @
0ea6813e
...
...
@@ -58,10 +58,15 @@ inline void Map2<MAP_IMPL>::clear(bool removeAttrib)
}
template
<
typename
MAP_IMPL
>
inline
void
Map2
<
MAP_IMPL
>::
update_topo_shortcuts
()
inline
unsigned
int
Map2
<
MAP_IMPL
>::
getNbInvolutions
()
const
{
ParentMap
::
update_topo_shortcuts
();
// m_phi2 = getRelation("phi2");
return
1
+
ParentMap
::
getNbInvolutions
();
}
template
<
typename
MAP_IMPL
>
inline
unsigned
int
Map2
<
MAP_IMPL
>::
getNbPermutations
()
const
{
return
ParentMap
::
getNbPermutations
();
}
/*! @name Basic Topological Operators
...
...
include/Topology/map/map3.h
View file @
0ea6813e
...
...
@@ -80,7 +80,8 @@ public:
virtual
void
clear
(
bool
removeAttrib
);
virtual
void
update_topo_shortcuts
();
virtual
unsigned
int
getNbInvolutions
()
const
;
virtual
unsigned
int
getNbPermutations
()
const
;
/*! @name Basic Topological Operators
* Access and Modification
...
...
include/Topology/map/map3.hpp
View file @
0ea6813e
...
...
@@ -60,10 +60,15 @@ inline void Map3<MAP_IMPL>::clear(bool removeAttrib)
}
template
<
typename
MAP_IMPL
>
inline
void
Map3
<
MAP_IMPL
>::
update_topo_shortcuts
()
inline
unsigned
int
Map3
<
MAP_IMPL
>::
getNbInvolutions
()
const
{
ParentMap
::
update_topo_shortcuts
();
// m_phi3 = getRelation("phi3");
return
1
+
ParentMap
::
getNbInvolutions
();
}
template
<
typename
MAP_IMPL
>
inline
unsigned
int
Map3
<
MAP_IMPL
>::
getNbPermutations
()
const
{
return
ParentMap
::
getNbPermutations
();
}
/*! @name Basic Topological Operators
...
...
src/Topology/generic/genericmap.cpp
View file @
0ea6813e
...
...
@@ -324,8 +324,10 @@ void GenericMap::removeThreadMarker(unsigned int nb)
* SAVE & LOAD *
****************************************/
void
GenericMap
::
update_m_emb_afterLoad
()
void
GenericMap
::
restore_shortcuts
()
{
// EMBEDDING
// get container of dart orbit
AttributeContainer
&
cont
=
m_attribs
[
DART
]
;
...
...
@@ -344,15 +346,28 @@ void GenericMap::update_m_emb_afterLoad()
m_embeddings
[
orb
]
=
amv
;
}
}
}
void
GenericMap
::
update_topo_shortcuts
()
{
// MARKERS & QUICK TRAVERSAL
for
(
unsigned
int
orbit
=
0
;
orbit
<
NB_ORBITS
;
++
orbit
)
{
AttributeContainer
&
cont
=
m_attribs
[
orbit
];
// get the list of attributes of orbit container
// QUICK TRAVERSAL
m_quickTraversal
[
orbit
]
=
cont
.
getDataVector
<
Dart
>
(
"quick_traversal"
)
;
for
(
unsigned
int
j
=
0
;
j
<
NB_ORBITS
;
++
j
)
{
std
::
stringstream
ss
;
ss
<<
"quickLocalIncidentTraversal_"
<<
j
;
m_quickLocalIncidentTraversal
[
orbit
][
j
]
=
cont
.
getDataVector
<
NoTypeNameAttribute
<
std
::
vector
<
Dart
>
>
>
(
ss
.
str
())
;
std
::
stringstream
ss2
;
ss2
<<
"quickLocalAdjacentTraversal"
<<
j
;
m_quickLocalAdjacentTraversal
[
orbit
][
j
]
=
cont
.
getDataVector
<
NoTypeNameAttribute
<
std
::
vector
<
Dart
>
>
>
(
ss2
.
str
())
;
}
// MARKERS
std
::
vector
<
std
::
string
>
listeNames
;
cont
.
getAttributesNames
(
listeNames
);
...
...
@@ -362,18 +377,16 @@ void GenericMap::update_topo_shortcuts()
if
(
sub
==
"Mark_"
)
{
// get thread number
unsigned
int
thread
=
listeNames
[
i
][
5
]
-
'0'
;
unsigned
int
thread
=
listeNames
[
i
][
5
]
-
'0'
;
if
(
listeNames
[
i
].
size
()
>
6
)
// thread number is >9
thread
=
10
*
thread
+
(
listeNames
[
i
][
6
]
-
'0'
);
thread
=
10
*
thread
+
(
listeNames
[
i
][
6
]
-
'0'
);
AttributeMultiVector
<
Mark
>*
amvMark
=
cont
.
getDataVector
<
Mark
>
(
i
);
m_markTables
[
orbit
][
thread
]
=
amvMark
;
if
((
orbit
==
DART
)
&&
(
thread
==
0
))
// for Marker of dart of thread O keep the boundary marker
{
// TODO Verifier ce qu fait exactement ce unsetMark sur m.invert ??
// Mark m(m_boundaryMarker);
Mark
m
(
m_boundaryMarkers
[
0
]
+
m_boundaryMarkers
[
1
]);
Mark
m
(
m_boundaryMarkers
[
0
]
+
m_boundaryMarkers
[
1
]);
m
.
invert
();
for
(
unsigned
int
i
=
cont
.
begin
();
i
!=
cont
.
end
();
cont
.
next
(
i
))
amvMark
->
operator
[](
i
).
unsetMark
(
m
);
...
...
@@ -387,39 +400,15 @@ void GenericMap::update_topo_shortcuts()
}
}
if
(
m_isMultiRes
)
{
std
::
vector
<
std
::
string
>
names
;
m_mrattribs
.
getAttributesNames
(
names
);
m_mrDarts
.
resize
(
names
.
size
()
-
1
);
for
(
unsigned
int
i
=
0
;
i
<
m_mrDarts
.
size
();
++
i
)
m_mrDarts
[
i
]
=
NULL
;
for
(
unsigned
int
i
=
0
;
i
<
names
.
size
();
++
i
)
{
std
::
string
sub
=
names
[
i
].
substr
(
0
,
7
);
if
(
sub
==
"MRLevel"
)
m_mrLevels
=
m_mrattribs
.
getDataVector
<
unsigned
int
>
(
i
);
// NB THREADS
if
(
sub
==
"MRdart_"
)
{
sub
=
names
[
i
].
substr
(
7
);
// compute number following MT_Dart_
unsigned
int
idx
=
0
;
for
(
unsigned
int
j
=
0
;
j
<
sub
.
length
();
j
++
)
idx
=
10
*
idx
+
(
sub
[
j
]
-
'0'
);
if
(
idx
<
names
.
size
()
-
1
)
m_mrDarts
[
idx
]
=
m_mrattribs
.
getDataVector
<
unsigned
int
>
(
i
);
else
CGoGNerr
<<
"Warning problem updating MR_DARTS"
<<
CGoGNendl
;
}
}
// check if all pointers are != NULL
for
(
unsigned
int
i
=
0
;
i
<
m_mrDarts
.
size
();
++
i
)
{
if
(
m_mrDarts
[
i
]
==
NULL
)
CGoGNerr
<<
"Warning problem MR_DARTS = NULL"
<<
CGoGNendl
;
}
std
::
vector
<
std
::
string
>
typeMark
;
unsigned
int
nbatt0
=
m_attribs
[
0
].
getAttributesTypes
(
typeMark
);
m_nbThreads
=
0
;
for
(
unsigned
int
i
=
0
;
i
<
nbatt0
;
++
i
)
{
if
(
typeMark
[
i
]
==
"Mark"
)
++
m_nbThreads
;
}
}
...
...
src/Topology/generic/mapMono.cpp
View file @
0ea6813e
...
...
@@ -119,36 +119,9 @@ bool MapMono::loadMapBin(const std::string& filename)
m_attribs
[
id
].
loadBin
(
fs
);
}
// retrieve m_embeddings (from m_attribs)
update_m_emb_afterLoad
();
// recursive call from real type of map (for topo relation attributes pointers) down to GenericMap (for Marker_cleaning & pointers)
update_topo_shortcuts
();
// restore nbThreads
std
::
vector
<
std
::
string
>
typeMark
;
unsigned
int
nbatt0
=
m_attribs
[
0
].
getAttributesTypes
(
typeMark
);
m_nbThreads
=
0
;
for
(
unsigned
int
i
=
0
;
i
<
nbatt0
;
++
i
)
{
if
(
typeMark
[
i
]
==
"Mark"
)
++
m_nbThreads
;
}
// restore quick traversals pointers if necessary (containers already ok)
for
(
unsigned
int
orb
=
0
;
orb
<
NB_ORBITS
;
++
orb
)
{
m_quickTraversal
[
orb
]
=
m_attribs
[
orb
].
getDataVector
<
Dart
>
(
"quick_traversal"
)
;
for
(
unsigned
int
j
=
0
;
j
<
NB_ORBITS
;
++
j
)
{
std
::
stringstream
ss
;
ss
<<
"quickLocalIncidentTraversal_"
<<
j
;
m_quickLocalIncidentTraversal
[
orb
][
j
]
=
m_attribs
[
orb
].
getDataVector
<
NoTypeNameAttribute
<
std
::
vector
<
Dart
>
>
>
(
ss
.
str
())
;
std
::
stringstream
ss2
;