def prepare(**kwargs): athena.configure('gtb', prob='gr_torus', coord='kerr-schild', flux='hlle', **kwargs) athena.make()
def prepare(**kwargs): athena.configure('gt', prob='gr_shock_tube', coord='minkowski', flux='llf', **kwargs) athena.make()
def prepare(**kwargs): athena.configure('s', prob='gr_linear_wave', coord='cartesian', flux='hllc', **kwargs) athena.make()
def prepare(**kwargs): logger.debug('Running test ' + __name__) athena.configure('bgt', prob='gr_shock_tube', coord='minkowski', flux='hlld', **kwargs) athena.make()
def prepare(**kwargs): athena.configure('gtb', prob='gr_bondi', coord='schwarzschild', flux='hlle', **kwargs) athena.make()
def prepare(**kwargs): athena.configure('s', prob='gr_shock_tube', coord='cartesian', flux='hllc', **kwargs) athena.make()
def prepare(**kwargs): logger.debug('Running test ' + __name__) # Configure and compile code athena.configure('b', 'hdf5', 'h5double', prob='from_array', **kwargs) athena.make() # Calculate initial field values b1 = np.empty((nx3, nx2, nb1 * nx1 + 1)) b1[...] = np.arange(nx2)[None, :, None] - np.arange(nx3)[:, None, None] b1_input = np.empty((nb1, nx3, nx2, nx1 + 1)) b2_input = np.zeros((nb1, nx3, nx2 + 1, nx1)) b3_input = np.zeros((nb1, nx3 + 1, nx2, nx1)) for n in range(nb1): b1_input[n, ...] = b1[:, :, n * nx1:(n + 1) * nx1 + 1] # (second-order accurate assumption) b1v = 0.5 * (b1_input[:, :, :, :-1] + b1_input[:, :, :, 1:]) # Calculate initial conserved values num_cells = nb1 * nx1 * nx2 * nx3 density = np.reshape(np.arange(1, num_cells + 1), (1, nb1, nx3, nx2, nx1)) momentum = np.zeros((3, nb1, nx3, nx2, nx1)) energy = np.ones( (1, nb1, nx3, nx2, nx1)) / (gamma - 1.0) + 0.5 * b1v[None, ...]**2 cons_input = np.vstack((density, momentum, energy)) # Write file to be loaded with h5py.File('bin/{0}'.format(filename_input), 'w') as f: f.create_dataset(dataset_cons, data=cons_input) f.create_dataset(dataset_b1, data=b1_input) f.create_dataset(dataset_b2, data=b2_input) f.create_dataset(dataset_b3, data=b3_input)
def prepare(**kwargs): logger.debug('Running test ' + __name__) athena.configure('sb', prob='gr_linear_wave', coord='cartesian', flux='hlld', **kwargs) athena.make()
def prepare(**kwargs): """ Configure and make the executable. This function is called first. It is responsible for calling the configure script and make to create an executable. It takes no inputs and produces no outputs. """ # Configure as though we ran # python configure.py -g -t --prob=shock_tube_gr --coord=minkowski # from the athena/ directory. Note that additional -<flag> command-line arguments can # be specified as additional '<flag>' arguments before the <key>='<value>' arguments # to athena.configure(). Any number of --<key>=<value> command-line arguments can also # be supplied. Note athena.configure() expects the values only to be quoted, e.g. # --<key>='<value>'. athena.configure('g', 't', prob='gr_shock_tube', coord='minkowski', **kwargs) # Call make as though we ran # make clean # make # from the athena/ directory. athena.make()
def prepare(**kwargs): logger.debug('Running test ' + __name__) athena.configure('b', 'shear', prob='hb3', flux='hlld', eos='isothermal', **kwargs) athena.make()
def prepare(*args, **kwargs): logger.debug('Running test ' + __name__) athena.configure(prob='visc', *args, eos='isothermal', flux='roe', **kwargs) athena.make()
def prepare(**kwargs): logger.debug('Running test ' + __name__) athena.configure('bs', prob='gr_shock_tube', coord='cartesian', flux='hlle', **kwargs) athena.make()
def prepare(*args, **kwargs): logger.debug('Running test ' + __name__) athena.configure(*args, prob='linear_wave', flux='hllc', eos='adiabatic', **kwargs) athena.make()
def prepare(**kwargs): logger.debug('Running test ' + __name__) athena.configure( nghost=4, # required for fourth-order configurations prob='linear_wave', coord='cartesian', flux='hllc', **kwargs) athena.make()
def prepare(**kwargs): athena.configure('b', 'shear', prob='hgb', flux='hlld', eos='isothermal', **kwargs) athena.make()
def prepare(**kwargs): logger.debug('Running test ' + __name__) athena.configure('b', prob='shock_tube', coord='cartesian', eos='general/hydrogen', **kwargs) athena.make()
def prepare(**kwargs): logger.debug('Running test ' + __name__) athena.configure('gtb', prob='gr_torus', coord='kerr-schild', flux='hlle', **kwargs) athena.make()
def prepare(**kwargs): athena.configure('radiation', 'mpi', 'hdf5', prob='beam', coord='cartesian', flux='hllc', nghost='4') athena.make()
def prepare(**kwargs): logger.debug('Running test ' + __name__) athena.configure('b', 'fft', prob='jgg', flux='hlld', eos='isothermal', nghost='4', **kwargs) athena.make()
def prepare(**kwargs): logger.debug('Running test ' + __name__) athena.configure('mpi', 'fft', prob='fft', **kwargs) athena.make() os.system('mv bin/athena bin/athena_mpi_fft') os.system('mv obj obj_mpi_fft') athena.configure('fft', prob='fft', **kwargs) athena.make() os.system('mv bin/athena bin/athena_fft') os.system('mv obj obj_fft')
def prepare(**kwargs): logger.debug('Running test ' + __name__) athena.configure( nghost=3, # required for PPM prob='mignone_advection', eos='isothermal', # flux='upwind', nscalars=1, coord='spherical_polar', **kwargs) athena.make()
def prepare(): for pgen in pgen_choices: if pgen[0:3] == 'gr_': print pgen # athena.configure('g',coord='minkowski',flux='hlle',prob=pgen) # athena.make() elif pgen == 'cpaw' or pgen == 'field_loop' or pgen == 'orszag_tang' or pgen == 'rotor': athena.configure('b', prob=pgen) athena.make() else: athena.configure(prob=pgen) athena.make()
def prepare(): athena.configure('b','mpi', prob='linear_wave', coord='cartesian', flux='hlld') athena.make() os.system('mv bin/athena bin/athena_mpi') athena.configure('b', prob='linear_wave', coord='cartesian', flux='hlld') athena.make()
def prepare(**kwargs): logger.debug('Running test ' + __name__) for coord_ in coords: athena.configure( nghost=3, # required for PPM prob='mignone_advection', eos='isothermal', # flux='upwind', nscalars=1, coord=coord_, **kwargs) athena.make() os.system('mv bin/athena bin/athena_{}'.format(coord_)) os.system('mv obj obj_{}'.format(coord_))
def prepare(**kwargs): logger.debug('Running test ' + __name__) global _fluxes for i in athena.global_config_args: tmp = i.split('=') if tmp[0] == '--flux' and len(tmp) == 2: _fluxes = [tmp[1]] for flux in _fluxes: athena.configure(prob='quirk', coord='cartesian', flux=flux, **kwargs) # to save time, reuse compiled .o files for all executables created in this test: athena.make(clean_first=False) move(_exec, _exec + '_' + flux) os.system('cp -r obj obj_' + flux) os.system('rm -rf obj')
def prepare(**kwargs): athena.configure('mpi', 'fft', prob='jeans', grav='fft', **kwargs) athena.make() os.system('mv bin/athena bin/athena_mpi_fft') # athena.configure('mpi', # prob='jeans', # grav='mg', **kwargs) # athena.make() # os.system('mv bin/athena bin/athena_mpi_mg') athena.configure('fft', prob='jeans', grav='fft', **kwargs) athena.make() os.system('mv bin/athena bin/athena_fft')
def prepare(**kwargs): logger.debug('Running test ' + __name__) global _nscalars for i in athena.global_config_args: tmp = i.split('=') if tmp[0] == '--nscalars' and len(tmp) == 2: _nscalars = [tmp[1]] for n in _nscalars: athena.configure(prob='shock_tube', coord='cartesian', nscalars=str(n), **kwargs) athena.make() move(_exec, _exec + '_' + str(n)) os.system('cp -r obj obj_' + str(n)) os.system('rm -rf obj')
def prepare(**kwargs): logger.debug('Running test ' + __name__) global _fluxes for i in athena.global_config_args: tmp = i.split('=') if tmp[0] == '--flux' and len(tmp) == 2: _fluxes = [tmp[1]] for flux in _fluxes: athena.configure(prob='shock_tube', coord='cartesian', flux=flux, **kwargs) # to save time, reuse compiled .o files for all executables created in this test: athena.make(clean_first=False) move(_exec, _exec + '_' + flux) os.system('cp -r obj obj_' + flux) # Resuing obj/*.o may cause issues with Lcov, due to files without any coverage data. # Monitor this. E.g. obj_roe/ will contain hlle.o and hllc.o, but only roe.o is linked os.system('rm -rf obj')
def prepare(**kwargs): # Check that code compiles all pgen files in single or double precision for single_precision in [True, False]: for pgen_set, args in zip( [gr_probs, mhd_probs, shear_probs, hydro_probs], [gr_args, mhd_args, shear_args, hydro_args]): if single_precision: args.extend(['float']) # "make clean" and link into executable only for the first problem # in the set that shares ./configure.py flags (except --pgen) pgen = pgen_set.pop() athena.configure(*args, prob=pgen, **kwargs) athena.make(clean_first=True, obj_only=False) for pgen in pgen_set: athena.configure(*args, prob=pgen, **kwargs) athena.make(clean_first=False, obj_only=True)
def prepare(**kwargs): logger.debug('Running test ' + __name__) athena.configure('b', 'omp', prob='linear_wave', coord='cartesian', flux='hlld', **kwargs) athena.make() os.system('mv bin/athena bin/athena_omp') os.system('mv obj obj_omp') athena.configure('b', prob='linear_wave', coord='cartesian', flux='hlld', **kwargs) athena.make()