changeset 5:25a8989c8d74 draft

Uploaded
author greg
date Mon, 11 Jan 2016 09:16:18 -0500
parents 7598b7336e58
children 59f7e97dc5bf
files icqsol_utils.py
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/icqsol_utils.py	Wed Dec 09 11:02:31 2015 -0500
+++ b/icqsol_utils.py	Mon Jan 11 09:16:18 2016 -0500
@@ -2,6 +2,9 @@
 import sys
 import tempfile
 
+from icqsol.shapes.icqShapeManager import ShapeManager
+from icqsol.bem.icqLaplaceMatrices import LaplaceMatrices
+
 PLY = 'ply'
 POLYDATA = 'POLYDATA'
 VTK = 'vtk'
@@ -39,6 +42,18 @@
     return file_path
 
 
+def get_laplace_solver(shape_data, max_edge_length=float('inf')):
+    return LaplaceMatrices(shape_data, max_edge_length=max_edge_length)
+
+
+def get_shape_manager(format, dataset_type):
+    # Instantiate a ShapeManager.
+    if format == VTK:
+        return ShapeManager(file_format=format, vtk_dataset_type=dataset_type)
+    else:
+        return ShapeManager(file_format=format)
+
+
 def get_temp_dir(prefix='tmp-vtk-', dir=None):
     """
     Return a temporary directory.