org.jcae.mesh.xmldata
Class MeshExporter.VTK
java.lang.Object
org.jcae.mesh.xmldata.MeshExporter
org.jcae.mesh.xmldata.MeshExporter.VTK
- Enclosing class:
- MeshExporter
public static class MeshExporter.VTK
- extends MeshExporter
Convert an Amibe mesh to a VTK file.
Output file extension should be .vtp.
The documentation of the file format may be found here:
http://www.vtk.org/pdf/file-formats.pdf
- Author:
- Jerome Robert
- To do:
- output one VTK piece by mesh group, support VTK parellel files.
Method Summary |
boolean |
isDummyData()
|
void |
setDummyData(boolean dummyData)
Write data cell associated to triangles
It's a scalar double value which is the ID of the triangle. |
protected void |
writeFinish(java.io.PrintStream out)
|
void |
writeInit(java.io.PrintStream out)
Write VTK header file |
protected void |
writeNodes(java.io.PrintStream out,
int[] nodesID,
TIntIntHashMap amibeToUNV)
Write nodes nodes of the mesh |
protected void |
writeTriangles(java.io.PrintStream out,
int[] triangles,
TIntIntHashMap amibeNodeToUNVNode,
TIntIntHashMap amibeTriaToUNVTria)
Write triangle connectivity |
Methods inherited from class org.jcae.mesh.xmldata.MeshExporter |
clean, getNodeFile, getNormalFile, getTriaFile, main, write, write, writeGroups, writeNormals, writeSingleGroupUNV, writeSingleNodeUNV, writeSingleTriangleUNV |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MeshExporter.VTK
public MeshExporter.VTK(java.io.File directory,
int[] groupIds)
MeshExporter.VTK
public MeshExporter.VTK(java.lang.String file)
writeInit
public void writeInit(java.io.PrintStream out)
throws java.io.IOException
- Write VTK header file
- Overrides:
writeInit
in class MeshExporter
- Parameters:
out
- The stream to write on
- Throws:
java.io.IOException
writeNodes
protected void writeNodes(java.io.PrintStream out,
int[] nodesID,
TIntIntHashMap amibeToUNV)
throws java.io.IOException
- Write nodes nodes of the mesh
- Specified by:
writeNodes
in class MeshExporter
- Parameters:
out
- stream to write on
- Throws:
java.io.IOException
writeTriangles
protected void writeTriangles(java.io.PrintStream out,
int[] triangles,
TIntIntHashMap amibeNodeToUNVNode,
TIntIntHashMap amibeTriaToUNVTria)
throws java.io.IOException
- Write triangle connectivity
- Specified by:
writeTriangles
in class MeshExporter
- Parameters:
out
- the stream to write on
- Throws:
java.io.IOException
writeFinish
protected void writeFinish(java.io.PrintStream out)
throws java.io.IOException
- Overrides:
writeFinish
in class MeshExporter
- Throws:
java.io.IOException
isDummyData
public boolean isDummyData()
setDummyData
public void setDummyData(boolean dummyData)
- Write data cell associated to triangles
It's a scalar double value which is the ID of the triangle.
It won't help you much, it's just to have the code somewhere?