Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-istl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Core Modules
dune-istl
Commits
284527ff
Commit
284527ff
authored
19 years ago
by
Markus Blatt
Browse files
Options
Downloads
Patches
Plain Diff
removed nonesense breadthfirstsearch methods, that just give the
breadth of an aggregate. [[Imported from SVN: r375]]
parent
e5bd8d3f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
istl/paamg/aggregates.hh
+34
-82
34 additions, 82 deletions
istl/paamg/aggregates.hh
with
34 additions
and
82 deletions
istl/paamg/aggregates.hh
+
34
−
82
View file @
284527ff
...
...
@@ -324,52 +324,17 @@ namespace Dune
template
<
class
M
,
class
G
,
class
C
>
int
buildAggregates
(
const
M
&
matrix
,
G
&
graph
,
const
C
&
criterion
);
/**
* @brief Breadth first search within an aggregate
*
* @param start The vertex where the search should start
* from. This does not need to belong to the aggregate.
* @param aggregate The aggregate id.
* @param graph The matrix graph to perform the search on.
*/
template
<
class
G
>
int
breadthFirstSearch
(
const
VertexDescriptor
&
start
,
const
AggregateDescriptor
&
aggregate
,
G
&
graph
)
const
;
/**
* @brief Breadth first search within an aggregate
*
* @param start The vertex where the search should start
* from. This does not need to belong to the aggregate.
* @param aggregate The aggregate id.
* @param graph The matrix graph to perform the search on.
* @param visitedMap a map for marking the vertices as visited.
*/
template
<
class
G
,
class
VM
>
int
breadthFirstSearch
(
const
VertexDescriptor
&
start
,
const
AggregateDescriptor
&
aggregate
,
G
&
graph
,
VM
&
visitedMap
)
const
;
/**
* @brief Breadth first search within an aggregate
*
* @param start The vertex where the search should start
* from. This does not need to belong to the aggregate.
* @param aggregate The aggregate id.
* @param graph The matrix graph to perform the search on.
*
template<class G, class F1, class F2>
int breadthFirstSearch(const VertexDescriptor& start, AggregateDescriptor aggregate,
G& graph, F1& aggregateVisitor, F2& nongAggregateVisitor) const;
*/
/**
* @brief Breadth first search within an aggregate
*
* The template parameters: <br />
* L A container type providing push_back(Vertex), and
* pop_front() in case remove is true<br />
* remove If true the entries in the visited list
* will be removed.
* <dl>
* <dt>reset</dt><dd>If true the visited flags of the vertices
* will be reset after
* the search</dd>
* <dt>G</dt><dd>The type of the graph we perform the search on.</dd>
* <td>F</dt><dd>
* </dl>
* @param start The vertex where the search should start
* from. This does not need to belong to the aggregate.
* @param aggregate The aggregate id.
...
...
@@ -390,10 +355,12 @@ namespace Dune
* @brief Breadth first search within an aggregate
*
* The template parameters: <br />
* L A container type providing push_back(Vertex), and
* pop_front() in case remove is true<br />
* remove If true the entries in the visited list
* will be removed.
* <dl><dt>L</dt><dd>A container type providing push_back(Vertex), and
* pop_front() in case remove is true</dd>
* <dt>remove</dt><dd> If true the entries in the visited list
* will be removed.</dd>
* <dt>reset</dt><dd>If true the visited flag will be reset after
* the search</dd></dl>
* @param start The vertex where the search should start
* from. This does not need to belong to the aggregate.
* @param aggregate The aggregate id.
...
...
@@ -1094,7 +1061,6 @@ namespace Dune
template
<
class
G
>
void
Aggregate
<
G
>::
reconstruct
(
const
Vertex
&
vertex
)
{
assert
(
!
graph_
[
vertex
].
excluded
());
vertices_
.
push_back
(
vertex
);
typedef
typename
VertexList
::
const_iterator
iterator
;
iterator
begin
=
vertices_
.
begin
();
...
...
@@ -1203,31 +1169,6 @@ namespace Dune
return
aggregates_
[
v
];
}
template
<
class
V
>
template
<
class
G
>
inline
int
AggregatesMap
<
V
>::
breadthFirstSearch
(
const
V
&
start
,
const
AggregateDescriptor
&
aggregate
,
G
&
graph
)
const
{
typename
PropertyMapTypeSelector
<
VertexVisitedTag
,
G
>::
Type
visitedMap
=
get
(
VertexVisitedTag
(),
graph
);
return
breadthFirstSearch
(
start
,
aggregate
,
graph
,
visitedMap
);
}
template
<
class
V
>
template
<
class
G
,
class
VM
>
inline
int
AggregatesMap
<
V
>::
breadthFirstSearch
(
const
V
&
start
,
const
AggregateDescriptor
&
aggregate
,
G
&
graph
,
VM
&
visitedMap
)
const
{
VertexList
vlist
;
DummyEdgeVisitor
dummy
;
return
breadthFirstSearch
<
true
,
true
>
(
start
,
aggregate
,
graph
,
vlist
,
dummy
,
dummy
,
visitedMap
);
}
template
<
class
V
>
template
<
bool
reset
,
class
G
,
class
F
,
class
VM
>
inline
int
AggregatesMap
<
V
>::
breadthFirstSearch
(
const
V
&
start
,
...
...
@@ -1508,7 +1449,10 @@ namespace Dune
template
<
class
G
>
int
Aggregator
<
G
>::
distance
(
const
Vertex
&
vertex
,
const
AggregatesMap
<
Vertex
>&
aggregates
)
{
return
aggregates
.
breadthFirstSearch
(
vertex
,
aggregate_
->
id
(),
*
graph_
);
typename
PropertyMapTypeSelector
<
VertexVisitedTag
,
G
>::
Type
visitedMap
=
get
(
VertexVisitedTag
(),
*
graph_
);
typename
AggregatesMap
<
Vertex
>::
VertexList
vlist
;
typename
AggregatesMap
<
Vertex
>::
DummyEdgeVisitor
dummy
;
return
aggregates
.
template
breadthFirstSearch
<
true
,
true
>(
vertex
,
aggregate_
->
id
(),
*
graph_
,
vlist
,
dummy
,
dummy
,
visitedMap
);
}
template
<
class
G
>
...
...
@@ -1782,22 +1726,29 @@ namespace Dune
if
(
!
graph
.
getVertexProperties
(
seed
).
isolated
())
{
Vertex
mergedNeighbour
=
mergeNeighbour
(
seed
,
aggregates
);
if
(
mergedNeighbour
!=
AggregatesMap
<
Vertex
>::
UNAGGREGATED
)
if
(
mergedNeighbour
!=
AggregatesMap
<
Vertex
>::
UNAGGREGATED
)
{
aggregates
[
seed
]
=
aggregates
[
mergedNeighbour
];
else
{
oneAggregates
++
;
conAggregates
++
;
/* // Reconstruct aggregate. Needed for markFront
this->template breadthFirstSearch<
visitAggregateNeighbours(seed, aggregates[seed], aggregates,)
if(aggregate_->size()==2)
// Was a one node aggregate formerly
--oneAggregates;
*/
}
else
{
++
oneAggregates
;
++
conAggregates
;
}
}
else
{
oneAggregates
++
;
isoAggregates
++
;
++
oneAggregates
;
++
isoAggregates
;
}
else
{
if
(
graph
.
getVertexProperties
(
seed
).
isolated
())
isoAggregates
++
;
++
isoAggregates
;
else
conAggregates
++
;
++
conAggregates
;
}
unmarkFront
();
markFront
(
aggregates
);
...
...
@@ -1806,7 +1757,8 @@ namespace Dune
}
Dune
::
dinfo
<<
"connected aggregates: "
<<
conAggregates
;
Dune
::
dinfo
<<
" isolated aggregates: "
<<
isoAggregates
<<
std
::
endl
;
Dune
::
dinfo
<<
" isolated aggregates: "
<<
isoAggregates
;
Dune
::
dinfo
<<
" one node aggregates: "
<<
oneAggregates
<<
std
::
endl
;
delete
aggregate_
;
return
conAggregates
+
isoAggregates
;
...
...
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