Hi,
I am porting the IncompFlowSolverHybrid, which serves as a major
component in the upscale-relperm-benchmark, to PETSc.
Most of this file and procedure is in need of refactoring. A step in
that direction is figuring out what is going on, in particular in the
addCellContrib function.
https://github.com/OPM/opm-porsol/blob/master/opm/porsol/mimetic/IncompFlowSolverHybrid.hpp#L1818
Can the dirchelet and periodic facetypes alternate within the same
matrix, or are they mutually exclusive? If they are exclusive using a
vector of facevalues really doesn't make sense (nor does the switch).
The l2g values, are they contiguous? If so, plenty of this algorithm
reduces to the assignment of a diagonal vector inside the matrix. Either
way we're reading diagnoals from the SharedFortranMatrix, except now
we're doing it one element at a time, which is inefficient.
In the periodic case, will some indices be encountered twice? The
comments say a*(x0-x1) = a*(pd) etc with no reference to a, but implies
this should be computable with an assignment, not +=.
Finally, and if this has a good answer then ignore the three questions
above: is there a better way to formulate this in terms of matrix
operations? Right now it is quite hands-on update-individual-cells, but
I would like a more math-oriented algorithm. e.g. in the case of
dirichlet it basically reduces to finding diagonal segments of the
SharedFortranMatrix and assigning them to (maybe contiguous) diagonals
in S_.
I hope everything is clear, and if not I'm happy to elaborate.
Thanks,
Jørgen
_______________________________________________
Opm mailing list
[email protected]
http://www.opm-project.org/mailman/listinfo/opm