> I performed a simulation using a mesh with infinite elements and all is
> fine. then I want to do some post-processing (getting the solution on
> several single points in the computational domain) but all of a sudden I
> get an error from the compute_map() function saying "negative Jacobian".
> First thing is that the simulation worked fine without errors so the
> mesh should be ok.

Are you sure that the points you are postprocessing are also being accessed
during the simulation?  There is a remote possibility that a negative
Jacobian might exist due to a skewed element, but during the simulation the
negative portion of the Jacobian is not seen due to the interior sampling of
the Gauss points.  (Often the Jacobian first goes 0 and then negative at the
sides/nodes of an element before affecting the interior).

> Furthermore, it makes a difference if I read the
> simulation mesh for the post-processing (that I wrote during the
> simulation after building the infinite elements) or if I read just the
> fe-mesh and reconstruct the final mesh by building the IFE in the
> post-processing code (the result is the same mesh). The error then pops
> up for different elements. When I dump on the screen all the values that
> are computed for the jacobian in "compute_map()" I always get "nan" and
> all of  a sudden a number other than "nan" is computed which is negative
> and causes the error.

Are you sure that you are not inadvertently moving a node or anything in the
post-processing?  The easiest way to avoid this kind of issue is to load
your mesh and then do all the post-processing through a constant reference
to that mesh.  That should catch at compile time any accidental modification
which could be induced by the post-processing code itself.

> But like I said, using the "read in" mesh a
> certain element causes a "nan" (and hence, no error message) and the
> same element causes a negative value and the error when the IFE are
> build in the post-processing code. This all makes no sense to me.
> (especially why in general a Jacobian=nan is computed).

Computing the Jacobian involves dividing by the determinant of the
transformation matrix (c.f. src/fe/fe_map.C, line 225). This transformation
can be thought of as a mapping between reference and physical space.  When
an element is inverted (or badly distorted) this mapping can become singular
(0) and eventually negative.

> Thanks in advance for your help,

If this was not helpful enough perhaps you could devise a *small* sample
code with a small mesh that reproduces the error?

-Ben


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to