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
952a62f5
Commit
952a62f5
authored
4 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[bugfix][pointsource] Do not move a variable that is still used afterwards
parent
e4cd5be3
No related branches found
No related tags found
1 merge request
!2193
[bugfix][pointsource] Do not move a variable that is still used afterwards
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/common/pointsource.hh
+4
-4
4 additions, 4 deletions
dumux/common/pointsource.hh
with
4 additions
and
4 deletions
dumux/common/pointsource.hh
+
4
−
4
View file @
952a62f5
...
@@ -317,9 +317,9 @@ public:
...
@@ -317,9 +317,9 @@ public:
{
{
const
auto
key
=
std
::
make_pair
(
eIdx
,
scvIdx
);
const
auto
key
=
std
::
make_pair
(
eIdx
,
scvIdx
);
if
(
pointSourceMap
.
count
(
key
))
if
(
pointSourceMap
.
count
(
key
))
pointSourceMap
.
at
(
key
).
emplace_back
(
std
::
move
(
source
)
)
;
pointSourceMap
.
at
(
key
).
push_back
(
source
);
else
else
pointSourceMap
.
insert
({
key
,
{
std
::
move
(
source
)
}});
pointSourceMap
.
insert
({
key
,
{
source
}});
// split equally on the number of matched scvs
// split equally on the number of matched scvs
auto
&
s
=
pointSourceMap
.
at
(
key
).
back
();
auto
&
s
=
pointSourceMap
.
at
(
key
).
back
();
s
.
setEmbeddings
(
scvIndices
.
size
()
*
s
.
embeddings
());
s
.
setEmbeddings
(
scvIndices
.
size
()
*
s
.
embeddings
());
...
@@ -330,9 +330,9 @@ public:
...
@@ -330,9 +330,9 @@ public:
// add the pointsource to the DOF map
// add the pointsource to the DOF map
const
auto
key
=
std
::
make_pair
(
eIdx
,
/*scvIdx=*/
0
);
const
auto
key
=
std
::
make_pair
(
eIdx
,
/*scvIdx=*/
0
);
if
(
pointSourceMap
.
count
(
key
))
if
(
pointSourceMap
.
count
(
key
))
pointSourceMap
.
at
(
key
).
emplace_back
(
std
::
move
(
source
)
)
;
pointSourceMap
.
at
(
key
).
push_back
(
source
);
else
else
pointSourceMap
.
insert
({
key
,
{
std
::
move
(
source
)
}});
pointSourceMap
.
insert
({
key
,
{
source
}});
}
}
}
}
}
}
...
...
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