Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
dumux-repositories
dumux
Commits
79ec0325
Commit
79ec0325
authored
7 years ago
by
Timo Koch
Committed by
Dennis Gläser
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[tpfa] Replace stencil type by reserved vector for increased efficiency
parent
7b7531ba
No related branches found
No related tags found
1 merge request
!734
Feature/improve fvassembler
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/discretization/fluxstencil.hh
+8
-2
8 additions, 2 deletions
dumux/discretization/fluxstencil.hh
with
8 additions
and
2 deletions
dumux/discretization/fluxstencil.hh
+
8
−
2
View file @
79ec0325
...
...
@@ -24,6 +24,7 @@
#ifndef DUMUX_DISCRETIZATION_FLUXSTENCIL_HH
#define DUMUX_DISCRETIZATION_FLUXSTENCIL_HH
#include
<dune/common/reservedvector.hh>
#include
<dumux/common/properties.hh>
#include
<dumux/discretization/methods.hh>
...
...
@@ -58,9 +59,13 @@ class FluxStencilImplementation<TypeTag, DiscretizationMethods::CCTpfa>
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
IndexType
=
typename
GridView
::
IndexSet
::
IndexType
;
using
Stencil
=
std
::
vector
<
IndexType
>
;
static
constexpr
bool
isNetwork
=
GridView
::
dimension
<
GridView
::
dimensionworld
;
public:
// we assume a maxium of 8 neighbors in embedded network grids otherwise max stencil size is 2
static
constexpr
std
::
size_t
maxSize
=
isNetwork
?
9
:
2
;
using
Stencil
=
Dune
::
ReservedVector
<
IndexType
,
maxSize
>
;
static
Stencil
stencil
(
const
Element
&
element
,
const
FVElementGeometry
&
fvGeometry
,
const
SubControlVolumeFace
&
scvf
)
...
...
@@ -91,9 +96,10 @@ class FluxStencilImplementation<TypeTag, DiscretizationMethods::CCMpfa>
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
IndexType
=
typename
GridView
::
IndexSet
::
IndexType
;
using
Stencil
=
std
::
vector
<
IndexType
>
;
public:
using
Stencil
=
std
::
vector
<
IndexType
>
;
static
Stencil
stencil
(
const
Element
&
element
,
const
FVElementGeometry
&
fvGeometry
,
const
SubControlVolumeFace
&
scvf
)
...
...
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