libMesh / libmesh

libMesh github repository
http://libmesh.github.io
GNU Lesser General Public License v2.1
648 stars 285 forks source link

0-dimensional LAGRANGE different from SCALAR? #1070

Open pbauman opened 8 years ago

pbauman commented 8 years ago

Mentioned this issue in #1068. @roystgnr, this is what I mentioned to you in chat yesterday.

Applying the attached patch to the #1069 gives test failures for the first order time solver unit tests and assertion failures for the second order time solver unit tests. (patch -p1 < scalar_test_patch.txt at the root of the libMesh source tree) This is surprising since I thought 0D LAGRANGE and 0D SCALAR should be basically the same thing.

Maybe I misused them since I'm only testing ODEs there and not PDEs?

I don't have time to dig into this, so at least wanted to log it. scalar_test_patch.txt

jwpeterson commented 8 years ago

I don't think they are the same thing conceptually, not sure about the implementation, though. As I understand it, a 0D LAGRANGE variable would live at a single point in space, whereas a SCALAR variable isn't associated with any single point in space and can potentially be coupled to all other DOFs in the system...

pbauman commented 8 years ago

You're right. To be more precise, what I meant was I thought they should be equivalent in the case that's being tested: a 0D mesh with only time-dependent ODEs being computed (i.e. no space and no other variables in the system, so there's exactly 1 dof in the whole system).

jwpeterson commented 8 years ago

If I understand your patch, I'm actually surprised that the code works for 0D LAGRANGE but not SCALARS. I would have expected the latter to be better-supported/work better.

pbauman commented 8 years ago

Agreed. In fact, the only reason LAGRANGE was in there in the first place was a copy/paste error! I was surprised when I switched to SCALAR and everything broke.