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
380761f6
Commit
380761f6
authored
9 years ago
by
Dennis Gläser
Committed by
Timo Koch
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[ImplicitProblem] Adaptions to point sources interface
parent
de41928c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/implicit/problem.hh
+13
-15
13 additions, 15 deletions
dumux/implicit/problem.hh
with
13 additions
and
15 deletions
dumux/implicit/problem.hh
+
13
−
15
View file @
380761f6
...
@@ -391,11 +391,9 @@ public:
...
@@ -391,11 +391,9 @@ public:
* Positive values mean that the conserved quantity is created, negative ones mean that it vanishes.
* Positive values mean that the conserved quantity is created, negative ones mean that it vanishes.
* E.g. for the mass balance that would be a mass rate in \f$ [ kg / s ] \f$.
* E.g. for the mass balance that would be a mass rate in \f$ [ kg / s ] \f$.
*/
*/
void
solDependentP
ointSource
(
PointSource
&
pointSource
,
PrimaryVariables
p
ointSource
(
PointSource
&
pointSource
,
const
Element
&
element
,
const
Element
&
element
,
const
FVElementGeometry
&
fvGeometry
,
const
SubControlVolume
&
scv
)
const
const
int
scvIdx
,
const
ElementVolumeVariables
&
elemVolVars
)
const
{
{
// forward to space dependent interface method
// forward to space dependent interface method
asImp_
().
pointSourceAtPos
(
pointSource
,
pointSource
.
position
());
asImp_
().
pointSourceAtPos
(
pointSource
,
pointSource
.
position
());
...
@@ -978,12 +976,11 @@ public:
...
@@ -978,12 +976,11 @@ public:
* Caution: Only overload this method in the implementation if you know
* Caution: Only overload this method in the implementation if you know
* what you are doing.
* what you are doing.
*/
*/
void
scvPointSources
(
PrimaryVariables
&
values
,
PrimaryVariables
scvPointSources
(
const
Element
&
element
,
const
SubControlVolume
&
scv
)
const
const
Element
&
element
,
const
FVElementGeometry
&
fvGeometry
,
const
int
scvIdx
,
const
ElementVolumeVariables
&
elemVolVars
)
const
{
{
PrimaryVariables
source
(
0
);
int
scvIdx
=
scv
.
indexInElement
();
auto
key
=
std
::
make_pair
(
this
->
gridView
().
indexSet
().
index
(
element
),
scvIdx
);
auto
key
=
std
::
make_pair
(
this
->
gridView
().
indexSet
().
index
(
element
),
scvIdx
);
if
(
pointSourceMap_
.
count
(
key
))
if
(
pointSourceMap_
.
count
(
key
))
{
{
...
@@ -994,8 +991,7 @@ public:
...
@@ -994,8 +991,7 @@ public:
// Add the contributions to the dof source values
// Add the contributions to the dof source values
// We divide by the volume. In the local residual this will be multiplied with the same
// We divide by the volume. In the local residual this will be multiplied with the same
// factor again. That's because the user specifies absolute values in kg/s.
// factor again. That's because the user specifies absolute values in kg/s.
const
Scalar
volume
=
fvGeometry
.
subContVol
[
scvIdx
].
volume
const
Scalar
volume
=
scv
.
volume
()
*
model
().
curVolVars
(
scv
).
extrusionFactor
();
*
asImp_
().
boxExtrusionFactor
(
element
,
fvGeometry
,
scvIdx
);
for
(
auto
&&
pointSource
:
pointSources
)
for
(
auto
&&
pointSource
:
pointSources
)
{
{
...
@@ -1008,15 +1004,17 @@ public:
...
@@ -1008,15 +1004,17 @@ public:
// The second one might be more convenient for e.g. a solution dependent point source.
// The second one might be more convenient for e.g. a solution dependent point source.
// we do an update e.g. used for TimeDependentPointSource
// we do an update e.g. used for TimeDependentPointSource
pointSource
.
update
(
asImp_
(),
element
,
fvGeometry
,
scvIdx
,
elemVolVars
);
pointSource
.
update
(
asImp_
(),
element
,
scv
);
// call convienience problem interface function
// call convienience problem interface function
asImp_
().
solDependentP
ointSource
(
pointSource
,
element
,
fvGeometry
,
scvIdx
,
elemVolVars
);
source
=
asImp_
().
p
ointSource
(
pointSource
,
element
,
scv
);
// at last take care about multiplying with the correct volume
// at last take care about multiplying with the correct volume
pointS
ource
/=
volume
;
s
ource
/=
volume
;
// add the point source values to the local residual
// add the point source values to the local residual
values
+=
pointSource
.
values
();
source
+=
pointSource
.
values
();
}
}
}
}
return
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