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
5d275438
Commit
5d275438
authored
16 years ago
by
Markus Blatt
Browse files
Options
Downloads
Patches
Plain Diff
Provide iterators
Added new construction for SeqOverlappingSchwarz for AMG. [[Imported from SVN: r985]]
parent
b42dd898
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
istl/paamg/aggregates.hh
+23
-0
23 additions, 0 deletions
istl/paamg/aggregates.hh
istl/paamg/smoother.hh
+44
-6
44 additions, 6 deletions
istl/paamg/smoother.hh
with
67 additions
and
6 deletions
istl/paamg/aggregates.hh
+
23
−
0
View file @
5d275438
...
...
@@ -547,6 +547,29 @@ namespace Dune
*/
const
AggregateDescriptor
&
operator
[](
const
VertexDescriptor
&
v
)
const
;
typedef
const
AggregateDescriptor
*
const_iterator
;
const_iterator
begin
()
const
{
return
aggregates_
;
}
const_iterator
end
()
const
{
return
aggregates_
+
noVertices
();
}
typedef
AggregateDescriptor
*
iterator
;
iterator
begin
()
{
return
aggregates_
;
}
iterator
end
()
{
return
aggregates_
+
noVertices
();
}
private
:
/** @brief Prevent copying. */
AggregatesMap
(
const
AggregatesMap
<
V
>&
map
)
...
...
This diff is collapsed.
Click to expand it.
istl/paamg/smoother.hh
+
44
−
6
View file @
5d275438
...
...
@@ -282,7 +282,6 @@ namespace Dune
};
/**
* @brief Policy for the construction of the ParSSOR smoother
*/
...
...
@@ -384,7 +383,8 @@ namespace Dune
};
#ifdef HAVE_SUPERLU
}
// end namespace Amg
// forward dseclarations
// forward declarations
template
<
class
M
,
class
X
,
class
MO
,
class
A
>
class
SeqOverlappingSchwarz
;
...
...
@@ -422,8 +422,8 @@ namespace Dune
enum
Overlap
{
vertex
,
aggregate
,
none
};
Overlap
overlap
;
SeqOverlappingSchwarzSmootherArgs
()
:
overlap
(
none
)
SeqOverlappingSchwarzSmootherArgs
(
Overlap
overlap_
=
vertex
)
:
overlap
(
overlap
)
{}
};
...
...
@@ -440,9 +440,9 @@ namespace Dune
typedef
DefaultConstructionArgs
<
SeqOverlappingSchwarz
<
M
,
X
,
TM
,
TA
>
>
Father
;
public:
typedef
Dune
::
Amg
::
AggregatesMap
<
typename
MatrixGraph
<
M
>::
VertexDescriptor
>
AggregatesMap
;
typedef
typename
MatrixGraph
<
M
>::
VertexDescriptor
VertexDescriptor
;
typedef
Dune
::
Amg
::
AggregatesMap
<
VertexDescriptor
>
AggregatesMap
;
typedef
typename
AggregatesMap
::
AggregateDescriptor
AggregateDescriptor
;
typedef
typename
AggregatesMap
::
VertexDescriptor
VertexDescriptor
;
typedef
typename
SeqOverlappingSchwarz
<
M
,
X
,
TM
,
TA
>::
subdomain_vector
Vector
;
typedef
typename
Vector
::
value_type
Subdomain
;
...
...
@@ -479,6 +479,43 @@ namespace Dune
void
setMatrix
(
const
M
&
matrix
)
{
Father
::
setMatrix
(
matrix
);
/* Create aggregates map where each aggregate is just one vertex. */
AggregatesMap
amap
(
matrix
.
N
());
VertexDescriptor
v
=
0
;
for
(
typename
AggregatesMap
::
iterator
iter
=
amap
.
begin
();
iter
!=
amap
.
end
();
++
iter
)
*
iter
=
v
++
;
std
::
vector
<
bool
>
visited
(
amap
.
noVertices
(),
false
);
typedef
IteratorPropertyMap
<
std
::
vector
<
bool
>::
iterator
,
IdentityMap
>
VisitedMapType
;
VisitedMapType
visitedMap
(
visited
.
begin
());
MatrixGraph
<
const
M
>
graph
(
matrix
);
typedef
SeqOverlappingSchwarzSmootherArgs
<
typename
M
::
field_type
>
SmootherArgs
;
switch
(
Father
::
getArgs
().
overlap
)
{
case
SmootherArgs
::
vertex
:
{
VertexAdder
visitor
(
subdomains
,
amap
);
createSubdomains
(
matrix
,
graph
,
amap
,
visitor
,
visitedMap
);
}
break
;
case
SmootherArgs
::
aggregate
:
{
DUNE_THROW
(
NotImplemented
,
"Aggregate overlap is not supported yet"
);
/*
AggregateAdder<VisitedMapType> visitor(subdomains, amap, graph, visitedMap);
createSubdomains(matrix, graph, amap, visitor, visitedMap);
*/
}
break
;
case
SmootherArgs
::
none
:
NoneAdder
visitor
;
createSubdomains
(
matrix
,
graph
,
amap
,
visitor
,
visitedMap
);
}
}
const
Vector
&
getSubDomains
()
...
...
@@ -656,6 +693,7 @@ namespace Dune
delete
schwarz
;
}
};
#endif
}
// namespace Amg
}
// namespace Dune
...
...
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