Dear Timo and Martin,
Thank you, it is clear to me now.
Best regards,
Dmitry
On 25.05.2020 18:24, Martin Schneider wrote:
Dear Dmitry,
the *dofIndex()* is related to the corresponding *dofPosition().*
For the box method, the degrees of freedom are located at the grid
vertices*
*and not at the centers of a subcontrolvolume, i.e. scv.center().*
*
Best regards,
Martin
On 25.05.20 17:15, Dmitry Pavlov wrote:
Hello,
I am writing my own local residual for porous medium flow with the
Box method with my own addFluxDerivatives and all. I have a quick
question.
When iterating over sub-control volumes (scvs), I supposed that they
are indexed in the Jacobian by their dofIndex(). I see that there are
as many different dofIndex-es as there are scvs in the grid.
I supposed that scv.dofIndex() has one-to-one mapping to
scv.center(), in one assembly, anyway. But I did some debug printing
and I see that I was wrong. In different addFluxDerivatives() calls,
during one assembly, the same dofIndex is assigned to different scvs.
The grid, if it matters, is 2D (actually 1D) 4x1, dimensions 150x800.
Assemble: r(x^k) = dS/dt + div F - q; M = grad r
addFluxDerivatives called for face at [9.375 400]
scv at [9.375 200] has dofIndex = 0
scv at [28.125 200] has dofIndex = 1
scv at [9.375 600] has dofIndex = 5
scv at [28.125 600] has dofIndex = 6
addFluxDerivatives called for face at [28.125 400]
scv at [9.375 200] has dofIndex = 0
scv at [28.125 200] has dofIndex = 1
scv at [9.375 600] has dofIndex = 5
scv at [28.125 600] has dofIndex = 6
addFluxDerivatives called for face at [18.75 200]
scv at [9.375 200] has dofIndex = 0
scv at [28.125 200] has dofIndex = 1
scv at [9.375 600] has dofIndex = 5
scv at [28.125 600] has dofIndex = 6
addFluxDerivatives called for face at [18.75 600]
scv at [9.375 200] has dofIndex = 0
scv at [28.125 200] has dofIndex = 1
scv at [9.375 600] has dofIndex = 5
scv at [28.125 600] has dofIndex = 6
addFluxDerivatives called for face at [46.875 400]
* scv at [46.875 200] has dofIndex = 1*
scv at [65.625 200] has dofIndex = 2
* scv at [46.875 600] has dofIndex = 6*
scv at [65.625 600] has dofIndex = 7
You see that as soon as we got to the faces in the second grid cell,
the dofIndex-es 1 and 6 are assigned to different scvs than they were
in the first grid cell. Only four dofIndex-es, out of ten, always map
to the same scvs: 0, 4, 5, 9.
At this point I am wondering whether I misunderstand something about
how the Jacobian should be built and maybe the trouble that I am
having with the convergence may come from it.
Best regards,
Dmitry
_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux