Commit f1b22eac authored by POLCHER Jan's avatar POLCHER Jan 🚴🏾
Browse files

Added a function to get maximum over the entire domain.

parent 1639186a
......@@ -543,3 +543,8 @@ class partition :
ERROR("Unforessen rank for variable to summed over the core region.")
sys.exit()
return y
#
# Function to find max value over the entire domain
#
def domainmax(self, x) :
return max(self.comm.allgather(x))
......@@ -139,7 +139,7 @@ else :
#
nbpt = len(sub_index)
sub_pts = np.array(list(len(sub_index[i][0]) for i in range(len(sub_index))))
nbvmax = max(sub_pts)
nbvmax = part.domainmax(max(sub_pts))
print("nbpt : ", nbpt)
print("nbvmax : ", nbvmax)
print("nbasmax : ", nbasmax)
......
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