use of cbit.vcell.solvers.MembraneElement in project vcell by virtualcell.
the class SmoldynFileWriter method writeMeshFile.
private void writeMeshFile() throws SolverException {
FileOutputStream fos = null;
try {
polygonMembaneElementMap = new HashMap<Polygon, MembraneElement>();
cartesianMesh = CartesianMesh.createSimpleCartesianMesh(resampledGeometry, polygonMembaneElementMap);
// Write Mesh file
File meshFile = new File(baseFileName + SimDataConstants.MESHFILE_EXTENSION);
fos = new FileOutputStream(meshFile);
cartesianMesh.write(new PrintStream(fos));
} catch (Exception e) {
e.printStackTrace(System.out);
throw new SolverException(e.getMessage());
} finally {
try {
if (fos != null) {
fos.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
Aggregations