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
c67ea021
Commit
c67ea021
authored
14 years ago
by
Markus Blatt
Browse files
Options
Downloads
Patches
Plain Diff
missed one file
[[Imported from SVN: r1305]]
parent
636502aa
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
dune/istl/matrixutils.hh
+36
-6
36 additions, 6 deletions
dune/istl/matrixutils.hh
with
36 additions
and
6 deletions
dune/istl/matrixutils.hh
+
36
−
6
View file @
c67ea021
...
...
@@ -61,26 +61,33 @@ namespace Dune
* @brief Check whether the a matrix has diagonal values
* on blocklevel recursion levels.
*/
template
<
std
::
size_t
blocklevel
,
std
::
size_t
l
=
blocklevel
>
template
<
class
Matrix
,
std
::
size_t
blocklevel
,
std
::
size_t
l
=
blocklevel
>
struct
CheckIfDiagonalPresent
{
/**
* @brief Check whether the a matrix has diagonal values
* on blocklevel recursion levels.
*/
template
<
class
Matrix
>
static
void
check
(
const
Matrix
&
mat
)
{
#ifdef DUNE_ISTL_WITH_CHECKING
CheckIfDiagonalPresent
<
blocklevel
-
1
,
l
>::
check
(
mat
);
typedef
typename
Matrix
::
ConstRowIterator
Row
;
typedef
typename
Matrix
::
ConstColIterator
Entry
;
for
(
Row
row
=
mat
.
begin
();
row
!=
mat
.
end
();
++
row
)
{
Entry
diagonal
=
row
->
find
(
row
.
index
());
if
(
diagonal
==
row
->
end
())
DUNE_THROW
(
ISTLError
,
"Missing diagonal value in row "
<<
row
.
index
()
<<
" at block recursion level "
<<
l
-
blocklevel
);
else
CheckIfDiagonalPresent
<
typename
Matrix
::
block_type
,
blocklevel
-
1
,
l
>::
check
(
*
diagonal
);
}
#endif
}
};
template
<
std
::
size_t
l
>
struct
CheckIfDiagonalPresent
<
0
,
l
>
template
<
class
Matrix
,
std
::
size_t
l
>
struct
CheckIfDiagonalPresent
<
Matrix
,
0
,
l
>
{
template
<
class
Matrix
>
static
void
check
(
const
Matrix
&
mat
)
{
typedef
typename
Matrix
::
ConstRowIterator
Row
;
...
...
@@ -92,6 +99,29 @@ namespace Dune
}
};
template
<
typename
T1
,
typename
T2
,
typename
T3
,
typename
T4
,
typename
T5
,
typename
T6
,
typename
T7
,
typename
T8
,
typename
T9
>
class
MultiTypeBlockMatrix
;
template
<
typename
T1
,
typename
T2
,
typename
T3
,
typename
T4
,
typename
T5
,
typename
T6
,
typename
T7
,
typename
T8
,
typename
T9
,
std
::
size_t
blocklevel
,
std
::
size_t
l
>
struct
CheckIfDiagonalPresent
<
MultiTypeBlockMatrix
<
T1
,
T2
,
T3
,
T4
,
T5
,
T6
,
T7
,
T8
,
T9
>
,
blocklevel
,
l
>
{
typedef
MultiTypeBlockMatrix
<
T1
,
T2
,
T3
,
T4
,
T5
,
T6
,
T7
,
T8
,
T9
>
Matrix
;
/**
* @brief Check whether the a matrix has diagonal values
* on blocklevel recursion levels.
*/
static
void
check
(
const
Matrix
&
mat
)
{
#ifdef DUNE_ISTL_WITH_CHECKING
// TODO Implement check
#endif
}
};
/**
* @brief Get the number of nonzero fields in the matrix.
*
...
...
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