Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
dune-solvers
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
3
Merge Requests
3
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
agnumpde
dune-solvers
Compare Revisions
9a5161657d341b5bd3b848e45fc062512efc03c2...36f6cfbcd2c52b3797618b5f6617f84643f2852f
Source
36f6cfbcd2c52b3797618b5f6617f84643f2852f
Select Git revision
...
Target
9a5161657d341b5bd3b848e45fc062512efc03c2
Select Git revision
Compare
Commits (2)
H1SemiNorm: use smart pointer for matrix
· 2919173a
Ansgar Burchardt
authored
May 16, 2019
2919173a
Merge branch 'h1seminorm-smart-pointer' into 'master'
· 36f6cfbc
Ansgar Burchardt
authored
May 16, 2019
H1SemiNorm: use smart pointer for matrix See merge request
!35
36f6cfbc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
dune/solvers/norms/h1seminorm.hh
dune/solvers/norms/h1seminorm.hh
+7
-5
No files found.
dune/solvers/norms/h1seminorm.hh
View file @
36f6cfbc
...
...
@@ -8,6 +8,7 @@
#include <dune/common/fmatrix.hh>
#include <dune/istl/bcrsmatrix.hh>
#include <dune/solvers/common/wrapownshare.hh>
#include "norm.hh"
//! Specialisation of the EnergyNorm class to identity blocks
...
...
@@ -23,12 +24,13 @@ public:
/** \brief The type used for the result */
using
typename
Base
::
field_type
;
H1SemiNorm
()
:
matrix_
(
NULL
)
{}
H1SemiNorm
()
=
default
;
H1SemiNorm
(
const
MatrixType
&
matrix
)
:
matrix_
(
&
matrix
)
template
<
typename
Matrix
>
H1SemiNorm
(
Matrix
&&
matrix
)
:
matrix_
(
Dune
::
Solvers
::
wrap_own_share
<
const
MatrixType
>
(
std
::
forward
<
Matrix
>
(
matrix
)))
{
assert
(
matrix
.
N
()
==
matrix
.
M
());
assert
(
matrix
_
->
N
()
==
matrix_
->
M
());
}
//! Compute the norm of the difference of two vectors
...
...
@@ -77,7 +79,7 @@ public:
return
std
::
sqrt
(
sum
);
}
const
MatrixType
*
matrix_
;
std
::
shared_ptr
<
const
MatrixType
>
matrix_
;
};
...
...