Search in sources :

Example 1 with MembraneElement

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();
        }
    }
}
Also used : PrintStream(java.io.PrintStream) FileOutputStream(java.io.FileOutputStream) MembraneElement(cbit.vcell.solvers.MembraneElement) SolverException(cbit.vcell.solver.SolverException) IOException(java.io.IOException) Polygon(cbit.vcell.geometry.surface.Polygon) File(java.io.File) ProgrammingException(org.vcell.util.ProgrammingException) GeometryException(cbit.vcell.geometry.GeometryException) IOException(java.io.IOException) DataAccessException(org.vcell.util.DataAccessException) PropertyVetoException(java.beans.PropertyVetoException) DivideByZeroException(cbit.vcell.parser.DivideByZeroException) ImageException(cbit.image.ImageException) ExpressionBindingException(cbit.vcell.parser.ExpressionBindingException) SolverException(cbit.vcell.solver.SolverException) ExpressionException(cbit.vcell.parser.ExpressionException) MathException(cbit.vcell.math.MathException)

Aggregations

ImageException (cbit.image.ImageException)1 GeometryException (cbit.vcell.geometry.GeometryException)1 Polygon (cbit.vcell.geometry.surface.Polygon)1 MathException (cbit.vcell.math.MathException)1 DivideByZeroException (cbit.vcell.parser.DivideByZeroException)1 ExpressionBindingException (cbit.vcell.parser.ExpressionBindingException)1 ExpressionException (cbit.vcell.parser.ExpressionException)1 SolverException (cbit.vcell.solver.SolverException)1 MembraneElement (cbit.vcell.solvers.MembraneElement)1 PropertyVetoException (java.beans.PropertyVetoException)1 File (java.io.File)1 FileOutputStream (java.io.FileOutputStream)1 IOException (java.io.IOException)1 PrintStream (java.io.PrintStream)1 DataAccessException (org.vcell.util.DataAccessException)1 ProgrammingException (org.vcell.util.ProgrammingException)1