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
82c2c92a
Commit
82c2c92a
authored
Jan 25, 2018
by
Timo Koch
Browse files
[pointsource] Explicitly divide by source embeddings for better transparency
parent
f086b27c
Changes
2
Hide whitespace changes
Inline
Side-by-side
dumux/common/fvproblem.hh
View file @
82c2c92a
...
...
@@ -418,7 +418,7 @@ public:
// call convienience problem interface function
asImp_
().
pointSource
(
pointSource
,
element
,
fvGeometry
,
elemVolVars
,
scv
);
// at last take care about multiplying with the correct volume
pointSource
/=
volume
;
pointSource
/=
volume
*
pointSource
.
embeddings
()
;
// add the point source values to the local residual
source
+=
pointSource
.
values
();
}
...
...
dumux/common/pointsource.hh
View file @
82c2c92a
...
...
@@ -115,14 +115,8 @@ public:
}
//! return the source values
// don't forget to call this when it's overloaded
// in the derived class
PrimaryVariables
values
()
const
{
auto
values
=
PrimaryVariables
(
values_
);
values
/=
embeddings_
;
return
values
;
}
{
return
values_
;
}
//! return the source position
const
GlobalPosition
&
position
()
const
...
...
@@ -144,7 +138,17 @@ public:
embeddings_
=
embeddings
;
}
//! get the number of embeddings for this point source
/*!
* \brief get the number of embeddings for this point source
* \note A point source might be located on the intersection between several scvs.
* If so, there are point sources for every neighboring scv with the same position.
* `embeddings` returns the number of neighboring scvs.
* Example: If I want to inject 1kg/s at a location that is on the inner face of an scv
* the point source exists in both scvs. Both have a value of 1kg/s.
* We then divide the value by the number of embeddings to not inject 2kg/s but 1kg/s.
* \note This division is done in the problem.scvPointSources() if this behaviour is not explicitly
* changed by e.g. overloading this function in the problem implementation.
*/
std
::
size_t
embeddings
()
const
{
return
embeddings_
;
...
...
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