Commit fd02b33a authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

added perm plot

parent 018196fd
......@@ -14,22 +14,37 @@ void HybridFluxGenerator2D::GetFineSample(Vector &fineField) {
Vector perm(cellMatrixGraph[l - meshes.pLevel()]);
Vector solution(faceMatrixGraph[l - meshes.pLevel()]);
permeabilityGenerator.GetFineSample(perm);
bool plotPermForTransport = false;
config.get("plotPermForTransport", plotPermForTransport);
if (plotPermForTransport) {
Plot plot(meshes[l], 2);
plot.celldata(perm, 1);
plot.vtk_celldata("permeability");
}
assemble.problem->LoadNewSample(&perm);
Preconditioner *pc = GetPC(faceMatrixGraph, assemble, "LIB_PS");
Solver solver(pc, "GMRES");
Newton newton(solver);
newton(assemble, solution);
assemble.setFlux(solution, fineField);
newton(assemble, solution
);
assemble.
setFlux(solution, fineField
);
}
void HybridFluxGenerator2D::GetCoarseSample(const Vector &fineField,
Vector &coarseField) {
coarseField = 0;
mout << OUTX(fineField) << endl;
mout << OUTX(coarseField) << endl;
for (cell c = coarseField.cells(); c != coarseField.cells_end(); c++) {
row coarseRow = coarseField.find_row(c());
for (int k = 0; k < c.Children(); ++k) {
......@@ -40,8 +55,4 @@ void HybridFluxGenerator2D::GetCoarseSample(const Vector &fineField,
for (int i = 0; i < coarseRow.n(); ++i)
coarseField(coarseRow, i) /= c.Children();
}
mout << OUTX(fineField) << endl;
mout << OUTX(coarseField) << endl;
}
\ No newline at end of file
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