Commit 5b5ce1aa authored by Timo Koch's avatar Timo Koch

Merge branch 'cherry-pick-ac4eab78' into 'releases/3.0'

Merge branch 'feature/multidomain-with-soldep-params' into 'master'

See merge request !1460
parents 8c59e6fd dd8fcd49
......@@ -380,10 +380,9 @@ public:
elemSol[0][pvIdx] = priVar;
this->couplingManager().updateCouplingContext(domainI, *this, domainI, globalI, elemSol[0], pvIdx);
curVolVars.update(elemSol, this->problem(), element, scv);
elemFluxVarsCache.update(element, fvGeometry, curElemVolVars);
if (enableGridFluxVarsCache)
gridVariables.gridFluxVarsCache().updateElement(element, fvGeometry, curElemVolVars);
else
elemFluxVarsCache.update(element, fvGeometry, curElemVolVars);
// calculate the residual with the deflected primary variables
if (!this->elementIsGhost()) partialDerivsTmp[0] = this->evalLocalResidual()[0];
......@@ -465,6 +464,9 @@ public:
const auto& stencil = this->couplingManager().couplingStencil(domainI, element, domainJ);
const auto& curSolJ = this->curSol()[domainJ];
// make sure the flux variables cache does not contain any artifacts from prior differentiation
elemFluxVarsCache.update(element, fvGeometry, curElemVolVars);
// convenience lambda for call to update self
auto updateCoupledVariables = [&] ()
{
......@@ -473,9 +475,15 @@ public:
if (enableGridFluxVarsCache)
{
if (enableGridVolVarsCache)
{
this->couplingManager().updateCoupledVariables(domainI, *this, gridVariables.curGridVolVars(), gridVariables.gridFluxVarsCache());
this->couplingManager().updateCoupledVariables(domainI, *this, gridVariables.curGridVolVars(), elemFluxVarsCache);
}
else
{
this->couplingManager().updateCoupledVariables(domainI, *this, curElemVolVars, gridVariables.gridFluxVarsCache());
this->couplingManager().updateCoupledVariables(domainI, *this, curElemVolVars, elemFluxVarsCache);
}
}
else
{
......@@ -522,22 +530,13 @@ public:
// restore the undeflected state of the coupling context
this->couplingManager().updateCouplingContext(domainI, *this, domainJ, globalJ, priVarsJ, pvIdx);
// TODO do we have to restore here again???
// if (enableGridFluxVarsCache)
// this->couplingManager().updateCoupledVariables(domainI, *this, curElemVolVars, gridVariables.gridFluxVarsCache());
// else
// this->couplingManager().updateCoupledVariables(domainI, *this, curElemVolVars, elemFluxVarsCache);
}
}
// 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
updateCoupledVariables();
// 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.
updateCoupledVariables();
}
}
};
......
......@@ -157,7 +157,7 @@ int main(int argc, char** argv) try
using Scalar = GetPropType<TwoPTypeTag, Properties::Scalar>;
const auto tEnd = getParam<Scalar>("TimeLoop.TEnd");
const auto maxDT = getParam<Scalar>("TimeLoop.MaxTimeStepSize");
auto dt = getParam<Scalar>("TimeLoop.DtInitial");
auto dt = getParam<Scalar>("TimeLoop.Dt");
// intialize the vtk output module
using TwoPVtkOutputModule = Dumux::VtkOutputModule<TwoPGridVariables, GetPropType<TwoPTypeTag, Properties::SolutionVector>>;
......@@ -228,9 +228,6 @@ int main(int argc, char** argv) try
std::cout << timeLoop->time() << " , " << storage[1] << " , " << storage[0] << std::endl;
std::cout << "***************************************" << std::endl;
// set new dt as suggested by the Newton solver
timeLoop->setTimeStepSize(nonLinearSolver.suggestTimeStepSize(timeLoop->timeStepSize()));
} while (!timeLoop->finished());
......
[TimeLoop]
DtInitial = 10 # [s]
TEnd = 1000 # [s]
Dt = 10 # [s]
TEnd = 100 # [s]
[Grid]
LowerLeft = 0 0 0
......@@ -32,9 +32,5 @@ SolidDensity = 2650
[Brine]
Salinity = 0.1
[Newton]
TargetSteps = 15
MaxRelativeShift = 1e-6
[Vtk]
OutputName = test_md_poromechanics_el2p
......@@ -2,44 +2,28 @@
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian">
<UnstructuredGrid>
<Piece NumberOfCells="64" NumberOfPoints="125">
<CellData Scalars="porosity">
<DataArray type="Float32" Name="porosity" NumberOfComponents="1" format="ascii">
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.200001 0.200001 0.2
0.2 0.200001 0.200001 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.200001 0.200001 0.2 0.2 0.200001 0.200001 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2
</DataArray>
<DataArray type="Float32" Name="pc" NumberOfComponents="1" format="ascii">
17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9
17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17570.2 17570.2 17569.9
17569.9 17570.2 17570.2 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9
17569.9 17570.2 17570.2 17569.9 17569.9 17570.2 17570.2 17569.9 17569.9 17569.9 17569.9 17569.9
17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9
17569.9 17569.9 17569.9 17569.9
</DataArray>
<CellData Scalars="S_liq">
<DataArray type="Float32" Name="S_liq" NumberOfComponents="1" format="ascii">
1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 0.999993 0.999993 1
1 0.999993 0.999993 1 1 1 1 1 1 1 1 1
1 0.999993 0.999993 1 1 0.999993 0.999993 1 1 1 1 1
1 1 1 1 1 1 1 1 1 0.999999 0.999999 1
1 0.999999 0.999999 1 1 1 1 1 1 1 1 1
1 0.999999 0.999999 1 1 0.999999 0.999999 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1
</DataArray>
<DataArray type="Float32" Name="p_liq" NumberOfComponents="1" format="ascii">
1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07
1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.50158e+07 1.50158e+07 1.5e+07
1.5e+07 1.50158e+07 1.50158e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07
1.5e+07 1.50158e+07 1.50158e+07 1.5e+07 1.5e+07 1.50158e+07 1.50158e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07
1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.50016e+07 1.50016e+07 1.5e+07
1.5e+07 1.50016e+07 1.50016e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07
1.5e+07 1.50016e+07 1.50016e+07 1.5e+07 1.5e+07 1.50016e+07 1.50016e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07
1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07 1.5e+07
1.5e+07 1.5e+07 1.5e+07 1.5e+07
</DataArray>
<DataArray type="Float32" Name="rho_liq" NumberOfComponents="1" format="ascii">
1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65
1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.66 1077.66 1077.65
1077.65 1077.66 1077.66 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65
1077.65 1077.66 1077.66 1077.65 1077.65 1077.66 1077.66 1077.65 1077.65 1077.65 1077.65 1077.65
1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65
1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65
1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65
1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65 1077.65
1077.65 1077.65 1077.65 1077.65
</DataArray>
......@@ -53,25 +37,25 @@
</DataArray>
<DataArray type="Float32" Name="S_gas" NumberOfComponents="1" format="ascii">
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 6.78881e-06 6.78881e-06 0
0 6.78881e-06 6.78881e-06 0 0 0 0 0 0 0 0 0
0 6.78881e-06 6.78881e-06 0 0 6.78881e-06 6.78881e-06 0 0 0 0 0
0 0 0 0 0 0 0 0 0 6.78957e-07 6.78957e-07 0
0 6.78957e-07 6.78957e-07 0 0 0 0 0 0 0 0 0
0 6.78957e-07 6.78957e-07 0 0 6.78957e-07 6.78957e-07 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0
</DataArray>
<DataArray type="Float32" Name="p_gas" NumberOfComponents="1" format="ascii">
1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07
1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50333e+07 1.50334e+07 1.50176e+07
1.50176e+07 1.50334e+07 1.50334e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07
1.50176e+07 1.50334e+07 1.50333e+07 1.50176e+07 1.50176e+07 1.50333e+07 1.50333e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07
1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50175e+07 1.50176e+07
1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50192e+07 1.50192e+07 1.50176e+07
1.50176e+07 1.50192e+07 1.50192e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07
1.50176e+07 1.50192e+07 1.50192e+07 1.50176e+07 1.50176e+07 1.50192e+07 1.50192e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07
1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07
1.50176e+07 1.50176e+07 1.50176e+07 1.50176e+07
</DataArray>
<DataArray type="Float32" Name="rho_gas" NumberOfComponents="1" format="ascii">
920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518
920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.629 920.629 920.518
920.518 920.629 920.629 920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518
920.518 920.629 920.629 920.518 920.518 920.629 920.629 920.518 920.518 920.518 920.518 920.518
920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.529 920.529 920.518
920.518 920.529 920.529 920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518
920.518 920.529 920.529 920.518 920.518 920.529 920.529 920.518 920.518 920.518 920.518 920.518
920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518 920.518
920.518 920.518 920.518 920.518
</DataArray>
......@@ -83,6 +67,22 @@
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0
</DataArray>
<DataArray type="Float32" Name="pc" NumberOfComponents="1" format="ascii">
17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9
17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9
17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9
17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9
17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9 17569.9
17569.9 17569.9 17569.9 17569.9
</DataArray>
<DataArray type="Float32" Name="porosity" NumberOfComponents="1" format="ascii">
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2
</DataArray>
<DataArray type="Float32" Name="process rank" NumberOfComponents="1" format="ascii">
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
......
......@@ -4,12 +4,12 @@
<Piece NumberOfCells="64" NumberOfPoints="125">
<PointData Scalars="porosity" Vectors="u">
<DataArray type="Float32" Name="porosity" NumberOfComponents="1" format="ascii">
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.200001 0.2 0.2 0.2 0.200001
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.200001
0.2 0.200001 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2 0.2 0.200001 0.2 0.200001 0.2 0.2 0.2 0.2
0.2 0.200001 0.200002 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2
......@@ -18,29 +18,29 @@
</DataArray>
<DataArray type="Float32" Name="u" NumberOfComponents="3" format="ascii">
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 -7.35667e-05 -7.35667e-05 -7.40227e-05
0 0 0 0 0 0 0 0 0 -3.21341e-07 -0.000126677 -0.000126867
0 0 0 0 0 0 0 0 0 7.34789e-05 -7.37664e-05 -7.37547e-05
0 0 0 0 0 0 0 0 0 -7.40626e-06 -7.40626e-06 -7.40625e-06
0 0 0 0 0 0 0 0 0 -2.46659e-12 -1.27379e-05 -1.27379e-05
0 0 0 0 0 0 0 0 0 7.40626e-06 -7.40626e-06 -7.40626e-06
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 -0.000126677 -3.21348e-07 -0.000126867
0 0 0 -3.04228e-07 -3.04266e-07 -0.000229525 0 0 0 0.00012658 -4.12375e-08 -0.000126634
0 0 0 0 0 0 0 0 0 -1.27379e-05 -3.00893e-12 -1.27379e-05
0 0 0 -1.23457e-12 -2.92265e-12 -2.30867e-05 0 0 0 1.27379e-05 -1.29976e-12 -1.27379e-05
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 -7.37664e-05 7.34788e-05 -7.37548e-05 0 0 0 -4.1222e-08 0.00012658 -0.000126634
0 0 0 7.37621e-05 7.3762e-05 -7.36105e-05 0 0 0 0 0 0
0 0 0 -7.40626e-06 7.40626e-06 -7.40626e-06 0 0 0 4.04873e-14 1.27379e-05 -1.27379e-05
0 0 0 7.40626e-06 7.40626e-06 -7.40626e-06 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 -0.000126437 -0.000126437 -5.14042e-07 0 0 0 3.43573e-08 -0.000229182 -2.57524e-07
0 0 0 0.000126454 -0.000126536 6.43778e-08 0 0 0 0 0 0
0 0 0 -0.000229182 3.44148e-08 -2.57489e-07 6.97757e-08 6.97912e-08 2.19723e-07 0.000229228 1.64069e-07 3.88452e-07
0 0 0 0 0 0 -0.000126536 0.000126454 6.45664e-08 1.63997e-07 0.000229228 3.88644e-07
0.000126641 0.000126641 3.99111e-07 0 0 0 0 0 0 0 0 0
0 0 0 -1.27379e-05 -1.27379e-05 -3.99074e-12 0 0 0 7.12071e-14 -2.30867e-05 -2.43727e-12
0 0 0 1.27379e-05 -1.27379e-05 3.69187e-13 0 0 0 0 0 0
0 0 0 -2.30867e-05 -1.98923e-12 -1.10791e-12 1.59704e-12 -1.57776e-12 2.38859e-13 2.30867e-05 -1.87765e-12 6.78184e-13
0 0 0 0 0 0 -1.27379e-05 1.27379e-05 1.11563e-13 1.21118e-12 2.30867e-05 1.52881e-12
1.27379e-05 1.27379e-05 6.60304e-13 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 -7.35471e-05 -7.35472e-05 7.34775e-05 0 0 0
3.82925e-07 -0.000126231 0.000126469 0 0 0 7.36306e-05 -7.33287e-05 7.37309e-05 0 0 0
0 0 0 0 0 0 -0.000126231 3.83058e-07 0.000126469 5.7133e-07 5.71553e-07 0.000229591
0.000126355 4.34121e-07 0.000127063 0 0 0 0 0 0 -7.33284e-05 7.36307e-05 7.37309e-05
4.33887e-07 0.000126355 0.000127063 7.34343e-05 7.34342e-05 7.40811e-05 0 0 0 0 0 0
0 0 0 0 0 0 -7.40626e-06 -7.40626e-06 7.40626e-06 0 0 0
9.97752e-13 -1.27379e-05 1.27379e-05 0 0 0 7.40626e-06 -7.40626e-06 7.40626e-06 0 0 0
0 0 0 0 0 0 -1.27379e-05 3.08884e-13 1.27379e-05 2.21592e-12 1.51379e-12 2.30867e-05
1.27379e-05 -2.94281e-13 1.27379e-05 0 0 0 0 0 0 -7.40626e-06 7.40626e-06 7.40626e-06
1.68563e-12 1.27379e-05 1.27379e-05 7.40626e-06 7.40626e-06 7.40626e-06 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
......
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