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
ad589434
Commit
ad589434
authored
2 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[fcstaggered] Enable parallel gridvolvar update
parent
a84dc395
No related branches found
No related tags found
1 merge request
!3193
[fcstaggered] Enable parallel gridvolvar update
Checking pipeline status
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/discretization/facecentered/staggered/gridvolumevariables.hh
+11
-13
11 additions, 13 deletions
...cretization/facecentered/staggered/gridvolumevariables.hh
with
11 additions
and
13 deletions
dumux/discretization/facecentered/staggered/gridvolumevariables.hh
+
11
−
13
View file @
ad589434
...
@@ -27,6 +27,8 @@
...
@@ -27,6 +27,8 @@
#include
<vector>
#include
<vector>
#include
<type_traits>
#include
<type_traits>
#include
<dumux/parallel/parallel_for.hh>
// make the local view function available whenever we use this class
// make the local view function available whenever we use this class
#include
<dumux/discretization/localview.hh>
#include
<dumux/discretization/localview.hh>
#include
<dumux/discretization/facecentered/staggered/elementsolution.hh>
#include
<dumux/discretization/facecentered/staggered/elementsolution.hh>
...
@@ -78,20 +80,16 @@ public:
...
@@ -78,20 +80,16 @@ public:
template
<
class
GridGeometry
,
class
SolutionVector
>
template
<
class
GridGeometry
,
class
SolutionVector
>
void
update
(
const
GridGeometry
&
gridGeometry
,
const
SolutionVector
&
sol
)
void
update
(
const
GridGeometry
&
gridGeometry
,
const
SolutionVector
&
sol
)
{
{
const
auto
numScv
=
gridGeometry
.
numScv
();
volumeVariables_
.
resize
(
gridGeometry
.
numScv
());
volumeVariables_
.
resize
(
numScv
);
Dumux
::
parallelFor
(
gridGeometry
.
gridView
().
size
(
0
),
[
&
,
&
problem
=
problem
()](
const
std
::
size_t
eIdx
)
for
(
const
auto
&
element
:
elements
(
gridGeometry
.
gridView
()))
{
{
auto
fvGeometry
=
localView
(
gridGeometry
);
const
auto
element
=
gridGeometry
.
element
(
eIdx
);
fvGeometry
.
bindElement
(
element
);
const
auto
fvGeometry
=
localView
(
gridGeometry
).
bindElement
(
element
);
const
auto
elemSol
=
elementSolution
(
element
,
sol
,
gridGeometry
);
for
(
auto
&&
scv
:
scvs
(
fvGeometry
))
{
for
(
const
auto
&
scv
:
scvs
(
fvGeometry
))
const
auto
elemSol
=
elementSolution
(
element
,
sol
,
gridGeometry
);
volumeVariables_
[
scv
.
index
()].
update
(
elemSol
,
problem
,
element
,
scv
);
volumeVariables_
[
scv
.
index
()].
update
(
elemSol
,
problem
(),
element
,
scv
);
});
}
}
}
}
const
VolumeVariables
&
volVars
(
const
std
::
size_t
scvIdx
)
const
const
VolumeVariables
&
volVars
(
const
std
::
size_t
scvIdx
)
const
...
...
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