Dear libmesh users,

I have a few questions:

1) Having some problem reading tetgen meshes. Here's my sampleNode.node
file:

4 3 1 0
1 1.0 1.0 1.0 1
2 2.0 1.0 1.0 1
3 1.0 1.0 2.0 1
4 1.0 2.0 1.0 1

and sampleNode.ele file:
1 4 0 0
1 1 2 3 4

I'm not sure why, but only 3 nodes were read in. I also experimented with
spaces and comments, but no matter how I tinker with the .node and .ele
files (including changing the node/ele IDs starting at 0 instead of 1), I
haven't been able to get it to read in all 4 of the nodes...

The part of the code that did that was just:

assert (dim == 3);
Mesh mesh(dim);
MeshData mesh_data(mesh);

mesh_data.activate();

mesh.read (mesh_file, &mesh_data);


2a) Regarding some comment I read in example 12: "Now we can safely read the
input mesh. Note that this should be an .xda/.xdr or .unv file only,
otherwise we cannot load/save associated data." It's for the line:

mesh.read (mesh_file, &mesh_data);

Is that still the case?

2b) I'm very, very confused by the read/write file types allowed for the
Mesh and MeshData classes. From the write function in MeshData, it seems
that only xta, xtr and unv are allowed, but there's also a function in
TecplotIO (and for Gmesh, etc) "write_nodal_data". I'm wondering if there's
a way that data associated with nodes can be written into vtu, tecplot or
tetgen files, or are the "write_nodal_data" functions just for reading the
Mesh but not MeshData?

2c) Seeing that the various IO files seem to have data reading capability,
I'm wondering using mesh.write/read(...) and mesh_data.write/read(...) are
the only methods by which to read/write. I'm especialyl interested in
reading in data and mesh... (from tetgen or vtu ideally...) Such

3) More implementation problems: I modified the src file of example 12. one
of the things I tried was to add the following line:

TecplotIO(mesh).write_nodal_data("artificial.dat", artificial_data,
"variable");

after the original line 62:

mesh_data.insert_node_data(artificial_data);

It caused a compilation error that I don't know how to debug:
g++ -o ex12 `../libmesh/contrib/bin/libmesh-config --include`
`../libmesh/contrib/bin/libmesh-config --cxxflags` ex12.cxx
`../libmesh/contrib/bin/libmesh-config --ldflags`
ex12.cxx: In function ‘int main(int, char**)’:
ex12.cxx:65: error: no matching function for call to
‘TecplotIO::write_nodal_data(const char [15], std::map<const Node*,
std::vector<Number, std::allocator<Number> >, std::less<const Node*>,
std::allocator<std::pair<const Node* const, std::vector<Number,
std::allocator<Number> > > > >&, const char [9])’
/Users/karenlee/Documents/Code/libmesh-0.6.4/libmesh/include/mesh/tecplot_io.h:66:
note: candidates are: virtual void TecplotIO::write_nodal_data(const
std::string&, const std::vector<Number, std::allocator<Number> >&, const
std::vector<std::string, std::allocator<std::string> >&)
make: *** [ex12] Error 1

I guess maybe I'm just not very clear how this is used. Could someone give
me a correct example of reading/writing mesh/data with vtu/tetgen/tecplot
data?

Thanks!
Karen
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to