Commit 1e18f079 authored by asantosnet's avatar asantosnet
Browse files

Define type of region_ndtuple[region_name].index_of_mesh_points and...

Define type of region_ndtuple[region_name].index_of_mesh_points and region_ndtuple.index_of_closed_points elements to int by adding dtype=int. The lack of this was causing errors when trying to use index_of_mesh_points to acess mesh.points
parent 25101927
......@@ -133,20 +133,20 @@ def assemble_points_system(region_ndtuple, surface_points, region_name,
region_ndtuple.index_of_closed_points = np.hstack(
closed_region_points[region_name])
else:
region_ndtuple.index_of_closed_points = np.array([])
region_ndtuple.index_of_closed_points = np.array([], dtype=int)
surface_point_region = []
for sub_region_name in sub_region_names[region_name]:
if sub_region_name in surface_points.keys():
surface_point_region.append(surface_points[sub_region_name])
if len(surface_point_region) >0:
if len(surface_point_region) > 0:
surface_point_region = np.hstack(surface_point_region)
region_ndtuple.index_of_system_points = np.intersect1d(
surface_point_region,
region_ndtuple.index_of_closed_points )
region_ndtuple.index_of_closed_points)
else:
region_ndtuple.index_of_system_points = \
region_ndtuple.index_of_closed_points
......@@ -192,7 +192,8 @@ def create_regions_nmtp(regions_point, regions_properties,
region_ndtuple[region_name].index_of_mesh_points = np.hstack(
list(region_point_dict.values()))
else:
region_ndtuple[region_name].index_of_mesh_points = np.array([])
region_ndtuple[region_name].index_of_mesh_points = np.array(
[], dtype=int)
# Depends on the type of mesh used.
# There is no real need to return anything as reguin_ndtuple is
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment