diff --git a/.gitignore b/.gitignore index dc2c0c7f3..3e8ce2f1e 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ doc/USER_MANUAL/Schedule .*swo .*swn *~ +*.pyc diff --git a/CUBIT_GEOCUBIT/geocubitlib/absorbing_boundary.py b/CUBIT_GEOCUBIT/geocubitlib/absorbing_boundary.py index c65663d6b..d8b913110 100644 --- a/CUBIT_GEOCUBIT/geocubitlib/absorbing_boundary.py +++ b/CUBIT_GEOCUBIT/geocubitlib/absorbing_boundary.py @@ -119,6 +119,16 @@ def define_parallel_absorbing_surf(): if dz <= topographic_surface_distance_tolerance and dn < topographic_surface_normal_tolerance: top_surf.append(k) + # checking list sizes before return + len_return_items = [len(liste) for liste in \ + absorbing_surf_xmin,absorbing_surf_xmax,absorbing_surf_ymin,absorbing_surf_ymax,\ + absorbing_surf_bottom,top_surf] + if (0 in len_return_items ): + print ('WARNING::define_parallel_absorbing_surf:: empty return list(s). try increasing tolerance!') + import sys + sys.exit() + ## + return absorbing_surf_xmin,absorbing_surf_xmax,absorbing_surf_ymin,absorbing_surf_ymax,absorbing_surf_bottom,top_surf def define_top_bottom_absorbing_surf(zmin_box,zmax_box): diff --git a/CUBIT_GEOCUBIT/geocubitlib/save_fault_nodes_elements.py b/CUBIT_GEOCUBIT/geocubitlib/save_fault_nodes_elements.py index 83d63adb8..bf799a00c 100755 --- a/CUBIT_GEOCUBIT/geocubitlib/save_fault_nodes_elements.py +++ b/CUBIT_GEOCUBIT/geocubitlib/save_fault_nodes_elements.py @@ -33,7 +33,8 @@ def __init__(self,id,surface_u,surface_d): print('len(Ad):',len(quads_Ad)) if not (len(quads_Au) == len(quads_Ad)): - print('Number of elements for each fauld side up and down do not concide') + print('Number of elements for up and down fault sides does not coincide!') + import sys sys.exit('goodbye') save_elements_nodes(self.name,quads_Au,quads_Ad)