Optimize Z4C GPU runtime defaults
This commit is contained in:
@@ -808,10 +808,10 @@ def generate_ADMmass_plot( outdir, figure_outdir, detector_number_i ):
|
||||
|
||||
## Plot constraint violation for each grid level
|
||||
|
||||
def generate_constraint_check_plot( outdir, figure_outdir, input_level_number ):
|
||||
|
||||
# path to data file
|
||||
file0 = os.path.join(outdir, "bssn_constraint.dat")
|
||||
def generate_constraint_check_plot( outdir, figure_outdir, input_level_number ):
|
||||
|
||||
# path to data file
|
||||
file0 = os.path.join(outdir, "bssn_constraint.dat")
|
||||
|
||||
if ( input_level_number == 0 ):
|
||||
print( )
|
||||
@@ -819,13 +819,26 @@ def generate_constraint_check_plot( outdir, figure_outdir, input_level_number ):
|
||||
print( )
|
||||
print( " corresponding data file = ", file0 )
|
||||
print( )
|
||||
|
||||
print( " Begin the constraint violation plot for grid level number = ", input_level_number )
|
||||
|
||||
# load the full data file (assumed whitespace-separated floats)
|
||||
data = numpy.loadtxt(file0)
|
||||
|
||||
# extract columns from the constraint data file
|
||||
|
||||
print( " Begin the constraint violation plot for grid level number = ", input_level_number )
|
||||
|
||||
if (not os.path.exists(file0)) or os.path.getsize(file0) == 0:
|
||||
if ( input_level_number == 0 ):
|
||||
print( " Constraint data file is empty; skip constraint violation plots" )
|
||||
print( )
|
||||
return
|
||||
|
||||
# load the full data file (assumed whitespace-separated floats)
|
||||
data = numpy.loadtxt(file0)
|
||||
data = numpy.atleast_2d(data)
|
||||
|
||||
if data.shape[1] < 8:
|
||||
if ( input_level_number == 0 ):
|
||||
print( " Constraint data file has insufficient columns; skip constraint violation plots" )
|
||||
print( )
|
||||
return
|
||||
|
||||
# extract columns from the constraint data file
|
||||
time = data[:,0]
|
||||
Constraint_H = data[:,1]
|
||||
Constraint_Px = data[:,2]
|
||||
|
||||
Reference in New Issue
Block a user