Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
87dfc530
Commit
87dfc530
authored
Jan 07, 2018
by
Timo Koch
Committed by
Dennis Gläser
Jan 11, 2018
Browse files
[assembly] Use ReservedBlockVector in local residual
parent
260c9500
Changes
2
Hide whitespace changes
Inline
Side-by-side
dumux/assembly/cclocalresidual.hh
View file @
87dfc530
...
...
@@ -25,8 +25,7 @@
#ifndef DUMUX_CC_LOCAL_RESIDUAL_HH
#define DUMUX_CC_LOCAL_RESIDUAL_HH
#include
<dune/istl/matrix.hh>
#include
<dumux/common/reservedblockvector.hh>
#include
<dumux/common/properties.hh>
#include
<dumux/assembly/fvlocalresidual.hh>
...
...
@@ -43,7 +42,6 @@ class CCLocalResidual : public FVLocalResidual<TypeTag>
using
ParentType
=
FVLocalResidual
<
TypeTag
>
;
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
using
Element
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
)
::
template
Codim
<
0
>
::
Entity
;
using
ElementResidualVector
=
Dune
::
BlockVector
<
typename
GET_PROP_TYPE
(
TypeTag
,
NumEqVector
)
>
;
using
ResidualVector
=
typename
GET_PROP_TYPE
(
TypeTag
,
NumEqVector
);
using
ElementBoundaryTypes
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementBoundaryTypes
);
using
ElementVolumeVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementVolumeVariables
);
...
...
@@ -52,6 +50,7 @@ class CCLocalResidual : public FVLocalResidual<TypeTag>
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
public:
using
ElementResidualVector
=
typename
ParentType
::
ElementResidualVector
;
using
ParentType
::
ParentType
;
//! evaluate the flux residual for a sub control volume face and add to residual
...
...
dumux/assembly/fvlocalresidual.hh
View file @
87dfc530
...
...
@@ -30,6 +30,7 @@
#include
<dumux/common/properties.hh>
#include
<dumux/common/timeloop.hh>
#include
<dumux/common/reservedblockvector.hh>
#include
<dumux/discretization/methods.hh>
namespace
Dumux
{
...
...
@@ -46,13 +47,13 @@ class FVLocalResidual
using
Implementation
=
typename
GET_PROP_TYPE
(
TypeTag
,
LocalResidual
);
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
);
using
Element
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
)
::
template
Codim
<
0
>
::
Entity
;
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
);
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
using
GridVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridVariables
);
using
FVGridGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVGridGeometry
);
using
SubControlVolume
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolume
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
using
ElementResidualVector
=
Dune
::
BlockVector
<
typename
GET_PROP_TYPE
(
TypeTag
,
NumEqVector
)
>
;
using
ResidualVector
=
typename
GET_PROP_TYPE
(
TypeTag
,
NumEqVector
);
using
ElementBoundaryTypes
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementBoundaryTypes
);
using
ElementFluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementFluxVariablesCache
);
...
...
@@ -62,6 +63,10 @@ class FVLocalResidual
using
TimeLoop
=
TimeLoopBase
<
Scalar
>
;
public:
//! the container storing all element residuals (for cc size is 1 for box 2^dim)
static
constexpr
size_t
maxNumScv
=
(
1
<<
GridView
::
dimension
);
// 2^dim
using
ElementResidualVector
=
ReservedBlockVector
<
ResidualVector
,
maxNumScv
>
;
//! the constructor
FVLocalResidual
(
const
Problem
*
problem
,
const
TimeLoop
*
timeLoop
=
nullptr
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment