Skip to content

Commit

Permalink
age
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchengtkc committed Feb 5, 2025
1 parent 78b7e88 commit 9e9df6a
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions warmth/mesh_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1355,16 +1355,12 @@ def rddms_upload_initial(self, tti):
if (i in self.p_to_keep):
point_original_to_cached[i]= count
count += 1
print(type(self.age_per_vertex_ts))
print(self.age_per_vertex_ts[0:50])
print(self.age_per_vertex_ts.shape)
print(self.T_per_vertex_ts.shape)
hexa_renumbered = [ [point_original_to_cached[i] for i in hexa] for hexa in hexa_to_keep ]
print("index map")
self.index_map_s = [self.mesh.topology.index_map(0).local_to_global(list(range(self.mesh.geometry.x.shape[0])))]
comm = MPI.COMM_WORLD
for i in range(1,comm.size):
self.index_map_s.append(comm.recv(source=i, tag=((i-1)*10)+21))
nv = np.amax(np.array( [np.amax(index_map) for index_map in self.index_map_s ] )) + 1 # no. vertices/nodes
self.age_per_vertex = np.ones( nv, dtype= np.int32) * -1
age_per_vertex_keep = np.array([ self.age_per_vertex[i] for i in range(n_vertices) if i in self.p_to_keep ])
print("age vertex")

faces_per_cell = []
nodes_per_face = []
faces_dict = {}
Expand Down Expand Up @@ -1401,7 +1397,7 @@ def rddms_upload_initial(self, tti):
cond_per_cell,
rhp_per_cell,
lid_per_cell,
age_per_vertex_keep,
self.age_per_vertex_ts,
hexa_renumbered,
[]
)
Expand Down

0 comments on commit 9e9df6a

Please sign in to comment.