Commit cb80578c authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

Merge branch 'feature/coupledexercises_matrixreorder' into 'master'

Update coupled PMF-FF exercise to use the reordered matrix and solution vector

Closes #23

See merge request !87
parents 2c496ddf 092985a2
Pipeline #1804 canceled with stage
......@@ -187,7 +187,7 @@ int main(int argc, char** argv) try
sol[stokesFaceIdx].resize(stokesFvGridGeometry->numFaceDofs());
sol[darcyIdx].resize(darcyFvGridGeometry->numDofs());
auto stokesSol = partial(sol, stokesCellCenterIdx, stokesFaceIdx);
auto stokesSol = partial(sol, stokesFaceIdx, stokesCellCenterIdx);
stokesProblem->applyInitialSolution(stokesSol);
darcyProblem->applyInitialSolution(sol[darcyIdx]);
......@@ -223,11 +223,11 @@ int main(int argc, char** argv) try
// the assembler for a stationary problem
using Assembler = MultiDomainFVAssembler<Traits, CouplingManager, DiffMethod::numeric>;
auto assembler = std::make_shared<Assembler>(std::make_tuple(stokesProblem, stokesProblem, darcyProblem),
std::make_tuple(stokesFvGridGeometry->cellCenterFVGridGeometryPtr(),
stokesFvGridGeometry->faceFVGridGeometryPtr(),
std::make_tuple(stokesFvGridGeometry->faceFVGridGeometryPtr(),
stokesFvGridGeometry->cellCenterFVGridGeometryPtr(),
darcyFvGridGeometry),
std::make_tuple(stokesGridVariables->cellCenterGridVariablesPtr(),
stokesGridVariables->faceGridVariablesPtr(),
std::make_tuple(stokesGridVariables->faceGridVariablesPtr(),
stokesGridVariables->cellCenterGridVariablesPtr(),
darcyGridVariables),
couplingManager);
......
......@@ -150,7 +150,7 @@ int main(int argc, char** argv) try
sol[stokesFaceIdx].resize(stokesFvGridGeometry->numFaceDofs());
sol[darcyIdx].resize(darcyFvGridGeometry->numDofs());
auto stokesSol = partial(sol, stokesCellCenterIdx, stokesFaceIdx);
auto stokesSol = partial(sol, stokesFaceIdx, stokesCellCenterIdx);
stokesProblem->applyInitialSolution(stokesSol);
darcyProblem->applyInitialSolution(sol[darcyIdx]);
......@@ -187,11 +187,11 @@ int main(int argc, char** argv) try
// the assembler with time loop for instationary problem
using Assembler = MultiDomainFVAssembler<Traits, CouplingManager, DiffMethod::numeric>;
auto assembler = std::make_shared<Assembler>(std::make_tuple(stokesProblem, stokesProblem, darcyProblem),
std::make_tuple(stokesFvGridGeometry->cellCenterFVGridGeometryPtr(),
stokesFvGridGeometry->faceFVGridGeometryPtr(),
std::make_tuple(stokesFvGridGeometry->faceFVGridGeometryPtr(),
stokesFvGridGeometry->cellCenterFVGridGeometryPtr(),
darcyFvGridGeometry),
std::make_tuple(stokesGridVariables->cellCenterGridVariablesPtr(),
stokesGridVariables->faceGridVariablesPtr(),
std::make_tuple(stokesGridVariables->faceGridVariablesPtr(),
stokesGridVariables->cellCenterGridVariablesPtr(),
darcyGridVariables),
couplingManager,
timeLoop);
......
......@@ -152,7 +152,7 @@ int main(int argc, char** argv) try
sol[stokesFaceIdx].resize(stokesFvGridGeometry->numFaceDofs());
sol[darcyIdx].resize(darcyFvGridGeometry->numDofs());
auto stokesSol = partial(sol, stokesCellCenterIdx, stokesFaceIdx);
auto stokesSol = partial(sol, stokesFaceIdx, stokesCellCenterIdx);
stokesProblem->applyInitialSolution(stokesSol);
darcyProblem->applyInitialSolution(sol[darcyIdx]);
......@@ -189,11 +189,11 @@ int main(int argc, char** argv) try
// the assembler with time loop for instationary problem
using Assembler = MultiDomainFVAssembler<Traits, CouplingManager, DiffMethod::numeric>;
auto assembler = std::make_shared<Assembler>(std::make_tuple(stokesProblem, stokesProblem, darcyProblem),
std::make_tuple(stokesFvGridGeometry->cellCenterFVGridGeometryPtr(),
stokesFvGridGeometry->faceFVGridGeometryPtr(),
std::make_tuple(stokesFvGridGeometry->faceFVGridGeometryPtr(),
stokesFvGridGeometry->cellCenterFVGridGeometryPtr(),
darcyFvGridGeometry),
std::make_tuple(stokesGridVariables->cellCenterGridVariablesPtr(),
stokesGridVariables->faceGridVariablesPtr(),
std::make_tuple(stokesGridVariables->faceGridVariablesPtr(),
stokesGridVariables->cellCenterGridVariablesPtr(),
darcyGridVariables),
couplingManager,
timeLoop);
......
......@@ -148,7 +148,6 @@ int main(int argc, char** argv) try
#endif
// create the finite volume grid geometry
using StokesFVGridGeometry = GetPropType<StokesTypeTag, Properties::GridGeometry>;
auto stokesFvGridGeometry = std::make_shared<StokesFVGridGeometry>(stokesGridView);
......@@ -180,7 +179,7 @@ int main(int argc, char** argv) try
sol[stokesFaceIdx].resize(stokesFvGridGeometry->numFaceDofs());
sol[darcyIdx].resize(darcyFvGridGeometry->numDofs());
auto stokesSol = partial(sol, stokesCellCenterIdx, stokesFaceIdx);
auto stokesSol = partial(sol, stokesFaceIdx, stokesCellCenterIdx);
stokesProblem->applyInitialSolution(stokesSol);
darcyProblem->applyInitialSolution(sol[darcyIdx]);
......@@ -217,11 +216,11 @@ int main(int argc, char** argv) try
// the assembler for a stationary problem
using Assembler = MultiDomainFVAssembler<Traits, CouplingManager, DiffMethod::numeric>;
auto assembler = std::make_shared<Assembler>(std::make_tuple(stokesProblem, stokesProblem, darcyProblem),
std::make_tuple(stokesFvGridGeometry->cellCenterFVGridGeometryPtr(),
stokesFvGridGeometry->faceFVGridGeometryPtr(),
std::make_tuple(stokesFvGridGeometry->faceFVGridGeometryPtr(),
stokesFvGridGeometry->cellCenterFVGridGeometryPtr(),
darcyFvGridGeometry),
std::make_tuple(stokesGridVariables->cellCenterGridVariablesPtr(),
stokesGridVariables->faceGridVariablesPtr(),
std::make_tuple(stokesGridVariables->faceGridVariablesPtr(),
stokesGridVariables->cellCenterGridVariablesPtr(),
darcyGridVariables),
couplingManager);
......
......@@ -150,7 +150,7 @@ int main(int argc, char** argv) try
sol[stokesFaceIdx].resize(stokesFvGridGeometry->numFaceDofs());
sol[darcyIdx].resize(darcyFvGridGeometry->numDofs());
auto stokesSol = partial(sol, stokesCellCenterIdx, stokesFaceIdx);
auto stokesSol = partial(sol, stokesFaceIdx, stokesCellCenterIdx);
stokesProblem->applyInitialSolution(stokesSol);
darcyProblem->applyInitialSolution(sol[darcyIdx]);
......@@ -193,11 +193,11 @@ int main(int argc, char** argv) try
// the assembler with time loop for instationary problem
using Assembler = MultiDomainFVAssembler<Traits, CouplingManager, DiffMethod::numeric>;
auto assembler = std::make_shared<Assembler>(std::make_tuple(stokesProblem, stokesProblem, darcyProblem),
std::make_tuple(stokesFvGridGeometry->cellCenterFVGridGeometryPtr(),
stokesFvGridGeometry->faceFVGridGeometryPtr(),
std::make_tuple(stokesFvGridGeometry->faceFVGridGeometryPtr(),
stokesFvGridGeometry->cellCenterFVGridGeometryPtr(),
darcyFvGridGeometry),
std::make_tuple(stokesGridVariables->cellCenterGridVariablesPtr(),
stokesGridVariables->faceGridVariablesPtr(),
std::make_tuple(stokesGridVariables->faceGridVariablesPtr(),
stokesGridVariables->cellCenterGridVariablesPtr(),
darcyGridVariables),
couplingManager,
timeLoop);
......
......@@ -152,7 +152,7 @@ int main(int argc, char** argv) try
sol[stokesFaceIdx].resize(stokesFvGridGeometry->numFaceDofs());
sol[darcyIdx].resize(darcyFvGridGeometry->numDofs());
auto stokesSol = partial(sol, stokesCellCenterIdx, stokesFaceIdx);
auto stokesSol = partial(sol, stokesFaceIdx, stokesCellCenterIdx);
stokesProblem->applyInitialSolution(stokesSol);
darcyProblem->applyInitialSolution(sol[darcyIdx]);
......@@ -192,11 +192,11 @@ int main(int argc, char** argv) try
// the assembler with time loop for instationary problem
using Assembler = MultiDomainFVAssembler<Traits, CouplingManager, DiffMethod::numeric>;
auto assembler = std::make_shared<Assembler>(std::make_tuple(stokesProblem, stokesProblem, darcyProblem),
std::make_tuple(stokesFvGridGeometry->cellCenterFVGridGeometryPtr(),
stokesFvGridGeometry->faceFVGridGeometryPtr(),
std::make_tuple(stokesFvGridGeometry->faceFVGridGeometryPtr(),
stokesFvGridGeometry->cellCenterFVGridGeometryPtr(),
darcyFvGridGeometry),
std::make_tuple(stokesGridVariables->cellCenterGridVariablesPtr(),
stokesGridVariables->faceGridVariablesPtr(),
std::make_tuple(stokesGridVariables->faceGridVariablesPtr(),
stokesGridVariables->cellCenterGridVariablesPtr(),
darcyGridVariables),
couplingManager,
timeLoop);
......
Supports Markdown
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