Skip to content
Snippets Groups Projects
Commit 0bc2d4ae authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[facet][box] make cm work for explicit time discretization

parent 94de80d6
No related branches found
No related tags found
1 merge request!1288Feature/md explicit assembler
...@@ -468,11 +468,12 @@ public: ...@@ -468,11 +468,12 @@ public:
{ {
const auto& ldGridGeometry = this->problem(lowDimId).fvGridGeometry(); const auto& ldGridGeometry = this->problem(lowDimId).fvGridGeometry();
const auto& ldSol = Assembler::isImplicit() ? this->curSol()[lowDimId] : assembler.prevSol()[lowDimId];
const auto elemJ = ldGridGeometry.element(lowDimElemIdx); const auto elemJ = ldGridGeometry.element(lowDimElemIdx);
auto fvGeom = localView(ldGridGeometry); auto fvGeom = localView(ldGridGeometry);
auto elemVolVars = localView(assembler.gridVariables(lowDimId).curGridVolVars()); auto elemVolVars = localView(assembler.gridVariables(lowDimId).curGridVolVars());
fvGeom.bindElement(elemJ); fvGeom.bindElement(elemJ);
elemVolVars.bindElement(elemJ, fvGeom, this->curSol()[lowDimId]); elemVolVars.bindElement(elemJ, fvGeom, ldSol);
// TODO interpolated volvars // TODO interpolated volvars
bulkContext_.isSet = true; bulkContext_.isSet = true;
...@@ -525,9 +526,10 @@ public: ...@@ -525,9 +526,10 @@ public:
auto bulkElemVolVars = localView(assembler.gridVariables(bulkId).curGridVolVars()); auto bulkElemVolVars = localView(assembler.gridVariables(bulkId).curGridVolVars());
auto bulkElemFluxVarsCache = localView(assembler.gridVariables(bulkId).gridFluxVarsCache()); auto bulkElemFluxVarsCache = localView(assembler.gridVariables(bulkId).gridFluxVarsCache());
const auto& bulkSol = Assembler::isImplicit() ? this->curSol()[bulkId] : assembler.prevSol()[bulkId];
const auto curBulkElem = bulkGridGeom.element(embedments[i].first); const auto curBulkElem = bulkGridGeom.element(embedments[i].first);
bulkFvGeom.bind(curBulkElem); bulkFvGeom.bind(curBulkElem);
bulkElemVolVars.bind(curBulkElem, bulkFvGeom, this->curSol()[bulkId]); bulkElemVolVars.bind(curBulkElem, bulkFvGeom, bulkSol);
bulkElemFluxVarsCache.bind(curBulkElem, bulkFvGeom, bulkElemVolVars); bulkElemFluxVarsCache.bind(curBulkElem, bulkFvGeom, bulkElemVolVars);
lowDimContext_.isSet = true; lowDimContext_.isSet = true;
...@@ -557,6 +559,12 @@ public: ...@@ -557,6 +559,12 @@ public:
// communicate deflected solution // communicate deflected solution
ParentType::updateCouplingContext(domainI, bulkLocalAssembler, domainJ, dofIdxGlobalJ, priVarsJ, pvIdxJ); ParentType::updateCouplingContext(domainI, bulkLocalAssembler, domainJ, dofIdxGlobalJ, priVarsJ, pvIdxJ);
// Since coupling only occurs via the fluxes, the context does not
// have to be updated in explicit time discretization schemes, where
// they are strictly evaluated on the old time level
if (!BulkLocalAssembler::isImplicit())
return;
// skip the rest if context is empty // skip the rest if context is empty
if (bulkContext_.isSet) if (bulkContext_.isSet)
{ {
...@@ -637,6 +645,12 @@ public: ...@@ -637,6 +645,12 @@ public:
// communicate deflected solution // communicate deflected solution
ParentType::updateCouplingContext(domainI, lowDimLocalAssembler, domainJ, dofIdxGlobalJ, priVarsJ, pvIdxJ); ParentType::updateCouplingContext(domainI, lowDimLocalAssembler, domainJ, dofIdxGlobalJ, priVarsJ, pvIdxJ);
// Since coupling only occurs via the fluxes, the context does not
// have to be updated in explicit time discretization schemes, where
// they are strictly evaluated on the old time level
if (!LowDimLocalAssembler::isImplicit())
return;
// skip the rest if context is empty // skip the rest if context is empty
if (lowDimContext_.isSet) if (lowDimContext_.isSet)
{ {
...@@ -690,6 +704,12 @@ public: ...@@ -690,6 +704,12 @@ public:
// communicate deflected solution // communicate deflected solution
ParentType::updateCouplingContext(domainI, lowDimLocalAssembler, domainJ, dofIdxGlobalJ, priVarsJ, pvIdxJ); ParentType::updateCouplingContext(domainI, lowDimLocalAssembler, domainJ, dofIdxGlobalJ, priVarsJ, pvIdxJ);
// Since coupling only occurs via the fluxes, the context does not
// have to be updated in explicit time discretization schemes, where
// they are strictly evaluated on the old time level
if (!LowDimLocalAssembler::isImplicit())
return;
// skip the rest if context is empty // skip the rest if context is empty
if (lowDimContext_.isSet) if (lowDimContext_.isSet)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment