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
2242602f
Commit
2242602f
authored
Dec 20, 2019
by
Timo Koch
Browse files
Merge branch 'fix/subdomain-localassemblers' into 'master'
Fix/subdomain localassemblers See merge request
!1818
parents
16731650
0043da12
Changes
2
Hide whitespace changes
Inline
Side-by-side
dumux/multidomain/subdomainboxlocalassembler.hh
View file @
2242602f
...
...
@@ -474,7 +474,7 @@ public:
const
auto
&
stencil
=
this
->
couplingManager
().
couplingStencil
(
domainI
,
element
,
domainJ
);
// convenience lambda for call to update self
auto
update
Self
=
[
&
]
()
auto
update
CoupledVariables
=
[
&
]
()
{
// Update ourself after the context has been modified. Depending on the
// type of caching, other objects might have to be updated. All ifs can be optimized away.
...
...
@@ -510,7 +510,7 @@ public:
{
priVarsJ
[
pvIdx
]
=
priVar
;
this
->
couplingManager
().
updateCouplingContext
(
domainI
,
*
this
,
domainJ
,
globalJ
,
priVarsJ
,
pvIdx
);
update
Self
();
update
CoupledVariables
();
return
this
->
couplingManager
().
evalCouplingResidual
(
domainI
,
*
this
,
domainJ
,
globalJ
);
};
...
...
@@ -553,15 +553,13 @@ public:
// restore the undeflected state of the coupling context
this
->
couplingManager
().
updateCouplingContext
(
domainI
,
*
this
,
domainJ
,
globalJ
,
priVarsJ
,
pvIdx
);
}
}
// restore original state of the flux vars cache and/or vol vars in case of global caching.
// This has to be done in order to guarantee that everything is in an undeflected
// state before the assembly of another element is called. In the case of local caching
// this is obsolete because the local views used here go out of scope after this.
// We only have to do this for the last primary variable, for all others the flux var cache
// is updated with the correct element volume variables before residual evaluations
updateSelf
();
// Restore original state of the flux vars cache and/or vol vars.
// This has to be done in case they depend on variables of domainJ before
// we continue with the numeric derivative w.r.t the next globalJ. Otherwise,
// the next "origResidual" will be incorrect.
updateCoupledVariables
();
}
}
};
...
...
dumux/multidomain/subdomaincclocalassembler.hh
View file @
2242602f
...
...
@@ -536,7 +536,7 @@ public:
// restore original state of the flux vars cache and/or vol vars in case of global caching.
// This has to be done in order to guarantee that the undeflected residual computation done
// above is correct when jumping to the next coupled
element
.
// above is correct when jumping to the next coupled
dof of domainJ
.
updateCoupledVariables
();
}
}
...
...
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