Commit 61fdce1a authored by Dennis Gläser's avatar Dennis Gläser

[mm][fractures] make sure coupling context is set

parent a3b49c61
......@@ -236,7 +236,10 @@ int main(int argc, char** argv) try
std::cout << "Injected water so far: " << injectedWater << " kg" << std::endl;
std::cout << std::endl;
const auto escapedFromMatrix = matrixProblem->computeGasFluxToOverburden(*matrixGridVariables, x[matrixDomainId])*timeLoop->timeStepSize();
const auto escapedFromMatrix = timeLoop->timeStepSize() *matrixProblem->computeGasFluxToOverburden(*matrixGridVariables,
x[matrixDomainId],
*assembler,
matrixDomainId);
escapedGas += escapedFromMatrix;
std::cout << "Escaped gas in this time step: " << escapedFromMatrix << " kg" << std::endl;
std::cout << "Escaped gas so far: " << escapedGas << " kg" << std::endl << std::endl;
......
......@@ -248,9 +248,11 @@ public:
}
//! computes the gas flux from the reservoir into the overburden
template<class GridVariables, class SolutionVector>
template<class GridVariables, class SolutionVector, class Assembler, std::size_t id>
Scalar computeGasFluxToOverburden(const GridVariables& gridVars,
const SolutionVector& sol) const
const SolutionVector& sol,
const Assembler& assembler,
const Dune::index_constant<id> domainId) const
{
Scalar flux = 0.0;
for (const auto& element : elements(this->fvGridGeometry().gridView()))
......@@ -259,6 +261,8 @@ public:
const auto geometry = element.geometry();
if (geometry.center()[1] < 35.0 && geometry.center()[1] > 15.0)
{
couplingManagerPtr_->bindCouplingContext(domainId, element, assembler);
auto fvGeometry = localView(this->fvGridGeometry());
fvGeometry.bind(element);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment