On Mon, Aug 8, 2011 at 1:31 PM, Roy Stogner <[email protected]> wrote:
>
> On Mon, 8 Aug 2011, John Peterson wrote:
>
>> On Mon, Aug 8, 2011 at 9:29 AM, robert <[email protected]> wrote:
>>
>>> I found the problem. GMVIO changes the order of the tetrahedra
>>> vertices:
>>
>> There is no problem with GMVIO.  You just can't combine a mesh written
>> in GMV format and a solution written in xda/r format...
>
> But wait, shouldn't that manifest as scrambled DoF values, not as a
> negative Jacobian in inverse_map?

Roy is right about this, so I looked into it a bit further... I wrote
a test program (below) that writes a single Tet4 in GMV format and
reads it back in again.

The output of this program is:

Elem 0 volume=0.166667
Elem 0 volume=-0.166667

Pretty sure the problem is on the reading end of things, since the
mesh that gets written out looks OK in the old gmv binary I still have
lying around.

It's a shame GMV no longer exists... fixing this now will be a mostly
pointless exercise.

-- 
John



#include <iostream>
#include <cstdlib> // std::getenv()

#include "libmesh.h"
#include "mesh.h"
#include "gmv_io.h"
#include "elem.h"

int main (int argc, char** argv)
{
  LibMeshInit init(argc, argv);
  {
    Mesh mesh(3);
    mesh.read( std::string(std::getenv("LIBMESH_DIR")) +
std::string("/reference_elements/3D/one_tet.xda") );

    // Check volume of zero'th element, ref. tet volume is 1/6
    std::cout << "Elem 0 volume=" << mesh.elem(0)->volume() << std::endl;

    // write out in GMV format
    GMVIO(mesh).write ("one_tet.gmv");

    // Read GMV format back in
    mesh.clear();
    mesh.read("one_tet.gmv");

    // Check zero'th element volume
    std::cout << "Elem 0 volume=" << mesh.elem(0)->volume() << std::endl;
  }

  return 0;
}

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to