Re: [Libmesh-users] Negative Jacobian error

2017-05-03 Thread Harshad Sahasrabudhe
Hi John Forget about Jacobians, just call elem->volume(). If the element is > inverted, the volume() will be negative... > Calculating the volumes worked. I was doing it before, but I was making a mistake in the indices somewhere. I fixed it and now I have all positive Jacobians. Thanks for your

Re: [Libmesh-users] Negative Jacobian error

2017-05-03 Thread John Peterson
On Wed, May 3, 2017 at 7:21 AM, Harshad Sahasrabudhe wrote: > Hi Roy, > > Is the mesh entirely Tet4, then? If so then there's only two >> equivalence classes of orderings; you could try one, test the >> jacobian at any point, and if it's negative then swap two nodes and >> you're done. > > > I t

Re: [Libmesh-users] Negative Jacobian error

2017-05-03 Thread Harshad Sahasrabudhe
Hi Roy, Is the mesh entirely Tet4, then? If so then there's only two > equivalence classes of orderings; you could try one, test the > jacobian at any point, and if it's negative then swap two nodes and > you're done. I tried using the face normals defined by Sentaurus, and I still have the neg

Re: [Libmesh-users] Negative Jacobian error

2017-05-02 Thread Harshad Sahasrabudhe
Hi Roy, Is the mesh entirely Tet4, then? If so then there's only two > equivalence classes of orderings; you could try one, test the > jacobian at any point, and if it's negative then swap two nodes and > you're done. Thanks! Yes the mesh is only tet4. I went through the LibMesh code for calcul

Re: [Libmesh-users] Negative Jacobian error

2017-05-02 Thread Roy Stogner
On Tue, 2 May 2017, Harshad Sahasrabudhe wrote: > I would assume the ordering of each Tet's nodes in Sentaurus is the same, >> and you just need to figure out the permutation of the node ids that gives >> you the libmesh/Gmsh numbering (they are the same). I would just write a >> simple reader fo

Re: [Libmesh-users] Negative Jacobian error

2017-05-02 Thread Harshad Sahasrabudhe
Hi John, Thanks for replying. You're importing an "adaptive" mesh? Does it already have hanging nodes? I meant the mesh was refined adaptively. It doesn't have hanging nodes. I would assume the ordering of each Tet's nodes in Sentaurus is the same, > and you just need to figure out the permuta

Re: [Libmesh-users] Negative Jacobian error

2017-05-02 Thread John Peterson
On Tue, May 2, 2017 at 12:48 PM, Harshad Sahasrabudhe wrote: > Hi all, > > I'm trying to convert an adaptive tetrahedral mesh generated by Sentaurus > from their grd format to Gmsh's msh format for importing in my program > which uses LibMesh. You're importing an "adaptive" mesh? Does it alread