Search in sources :

Example 11 with VtuFileContainer

use of org.vcell.vis.io.VtuFileContainer in project vcell by virtualcell.

the class ComsolVtkFileWriter method getEmptyVtuMeshFiles.

public VtuFileContainer getEmptyVtuMeshFiles(ComsolSimFiles comsolSimFiles, File primaryDirectory) throws IOException {
    VtuFileContainer vtuFileContainer = new VtuFileContainer();
    File comsolFile = comsolSimFiles.comsoldataFile;
    String prefix = comsolFile.getName().replace(".comsoldat", "");
    File emptyMeshFile = new File(comsolFile.getParentFile(), prefix + ".vtu");
    byte[] vtuMeshFileContents = FileUtils.readByteArrayFromFile(emptyMeshFile);
    vtuFileContainer.addVtuMesh(new VtuFileContainer.VtuMesh("domain", 0.0, vtuMeshFileContents));
    return vtuFileContainer;
}
Also used : VtuFileContainer(org.vcell.vis.io.VtuFileContainer) File(java.io.File)

Aggregations

VtuFileContainer (org.vcell.vis.io.VtuFileContainer)11 File (java.io.File)10 FileNotFoundException (java.io.FileNotFoundException)6 IOException (java.io.IOException)6 DataAccessException (org.vcell.util.DataAccessException)5 MathException (cbit.vcell.math.MathException)4 DivideByZeroException (cbit.vcell.parser.DivideByZeroException)4 ExpressionBindingException (cbit.vcell.parser.ExpressionBindingException)4 ExpressionException (cbit.vcell.parser.ExpressionException)4 XmlParseException (cbit.vcell.xml.XmlParseException)4 ZipFile (org.apache.commons.compress.archivers.zip.ZipFile)4 CacheException (org.vcell.util.CacheException)4 ObjectNotFoundException (org.vcell.util.ObjectNotFoundException)4 ArrayList (java.util.ArrayList)3 ExportServiceImpl (cbit.vcell.export.server.ExportServiceImpl)1 VtkManager (cbit.vcell.simdata.VtkManager)1 VCSimulationDataIdentifier (cbit.vcell.solver.VCSimulationDataIdentifier)1 VCSimulationIdentifier (cbit.vcell.solver.VCSimulationIdentifier)1 MovingBoundaryReader (cbit.vcell.solvers.mb.MovingBoundaryReader)1 TException (org.apache.thrift.TException)1