Dear libmesh users and developers,

1) I'm having a problem where I'm reading in the solution obtained from a
previous successful libmesh run to try to get the gradient of the solution
and I'm getting the following error:

ERROR: negative Jacobian: -2.55565e-10 in element 0
[0] src/fe/fe_map.C, line 341, compiled Mar 30 2010 at 16:03:26
terminate called after throwing an instance of 'libMesh::LogicError'
  what():  Error in libMesh internal logic

My first element consists of these points:

1       0.0635691 0.0267701 -0.0401152  4.876378533e-11
     2  0.063976 0.0263403 -0.0393085   4.866489885e-11
     3  0.063604 0.0261774 -0.0397662   4.875840464e-11
     4  0.0639932 0.0260264 -0.0402555  4.881947696e-11

which to me look distinct enough...

I put the function as an "assemble" function, which it's not, which is why
it started to compute the map... I suppose I could frame it differently so
it doens't do that step, but is there something wrong with my mesh if I have
a negative Jacobian?

I'm not sure why I would have the negative Jacobian because I had a Poisson
problem solved already for the exact same mesh. The only thing I can think
of is that the output had less significant figures. However, one would think
that the above should be enough to distinguish between the points... Another
possibility is that the whole thing was remeshed, which I don't think so...

2) To get the same results by another route, I'm thinking of getting the
gradients directly from the variable I solve for. It's a bit hard to
navigate through the documentation to figure out the data structure (I
tried). Can anyone provide me with a low-level way of getting the array of
data associated with the variable I declared to be solved (which looks like
just a string containing the name of the variable) and walking me through? I
use? This is what I did in for reading in the solution from another solve:

 for ( ; el != end_el ; ++el)
    {
      const Elem* elem = *el;

fe->reinit(elem);


      RealGradient E(0,0,0);
      for (unsigned int i = 0; i < dphi.size(); ++i) {
        const std::vector<Number>& data =
mesh_data.get_data(elem->get_node(i));
        E += dphi[i][0] * data[0];
      }


reinit is where I had the negative Jacobian... How exactly do I adapt this?

Thanks,
Karen
------------------------------------------------------------------------------

_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to