Skip to content
Snippets Groups Projects
Commit 0d0f7e89 authored by Uli Sack's avatar Uli Sack Committed by usack
Browse files

add template specialization of simplexEdge[diagonal|residual] for DiagonalMatrix

[[Imported from SVN: r6339]]
parent 2e28a5e3
No related branches found
No related tags found
No related merge requests found
......@@ -218,6 +218,12 @@ class StaticMatrix
return A[i][i] - A[i][j] - A[j][i] + A[j][j];
}
template <typename FieldType, int n>
static FieldType simplexEdgeDiagonal(const Dune::DiagonalMatrix<FieldType,n>& A, int i, int j)
{
return A.diagonal(i) + A.diagonal(j);
}
template <typename FieldType, int n>
static FieldType simplexEdgeDiagonal(const Dune::ScaledIdentityMatrix<FieldType,n>& A, int i, int j)
{
......@@ -233,6 +239,12 @@ class StaticMatrix
return A[i][i] - A[i][j];
}
template <typename FieldType, int n>
static FieldType simplexEdgeResidual(const Dune::DiagonalMatrix<FieldType,n>& A, int i, int j)
{
return A.diagonal(i);
}
template <typename FieldType, int n>
static FieldType simplexEdgeResidual(const Dune::ScaledIdentityMatrix<FieldType,n>& A, int i, int j)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment